diff --git a/packages/all-packages.nix b/packages/all-packages.nix index 87bd8ddb..1d92f3f9 100644 --- a/packages/all-packages.nix +++ b/packages/all-packages.nix @@ -108,6 +108,7 @@ rec { cosmos-theta-testnet = callPackage ./cosmos-theta-testnet {}; blst = callPackage ./blst {}; + bnb-beacon-node = callPackage ./bnb-beacon-node {}; circom = callPackage ./circom/default.nix {}; circ = callPackage ./circ/default.nix {}; diff --git a/packages/bnb-beacon-node/config/gentxs/node0.json b/packages/bnb-beacon-node/config/gentxs/node0.json new file mode 100644 index 00000000..94b15202 --- /dev/null +++ b/packages/bnb-beacon-node/config/gentxs/node0.json @@ -0,0 +1,50 @@ +{ + "type": "auth/StdTx", + "value": { + "msg": [ + { + "type": "cosmos-sdk/MsgCreateValidatorProposal", + "value": { + "MsgCreateValidator": { + "Description": { + "moniker": "node0", + "identity": "", + "website": "", + "details": "" + }, + "Commission": { + "rate": "0", + "max_rate": "0", + "max_change_rate": "0" + }, + "delegator_address": "bnb16sju6kxjcz7sxa2g3kf6kp3zvzf4g84jwvjh0h", + "validator_address": "bva16sju6kxjcz7sxa2g3kf6kp3zvzf4g84jwsn83n", + "pubkey": { + "type": "tendermint/PubKeyEd25519", + "value": "UaSCGHI+ZgEU+HPpPjtoWzro9k05g0UIdI8G/QrPFDs=" + }, + "delegation": { + "denom": "BNB", + "amount": "9000000000000" + } + }, + "proposal_id": "0" + } + } + ], + "signatures": [ + { + "pub_key": { + "type": "tendermint/PubKeySecp256k1", + "value": "A/oj5bQgZ8GduPeclMYVH4ARYtg7cBQWnDLL8oTSwDDv" + }, + "signature": "kNT3hPTKMUhEqOS7F6VjQSZY8w5zTfmSM1merVgMOcIEoeqXYiWUSxWUzwBcIL7FfI2LOWHbUnrj5i4nZWR8pQ==", + "account_number": "0", + "sequence": "0" + } + ], + "memo": "be338514882979ae579208fe61485499f3e75b0a@172.20.0.2:26656", + "source": "0", + "data": null + } +} \ No newline at end of file diff --git a/packages/bnb-beacon-node/config/node0/gaiacli/key_seed.json b/packages/bnb-beacon-node/config/node0/gaiacli/key_seed.json new file mode 100644 index 00000000..d36893cd --- /dev/null +++ b/packages/bnb-beacon-node/config/node0/gaiacli/key_seed.json @@ -0,0 +1 @@ +{"secret":"paddle bullet neck stage bottom link require hawk rough consider fold zebra tissue wreck cake produce subway double cram cereal open ice element salt"} \ No newline at end of file diff --git a/packages/bnb-beacon-node/config/node0/gaiad/config/app.toml b/packages/bnb-beacon-node/config/node0/gaiad/config/app.toml new file mode 100644 index 00000000..89510dcb --- /dev/null +++ b/packages/bnb-beacon-node/config/node0/gaiad/config/app.toml @@ -0,0 +1,208 @@ +# This is a TOML config file. +# For more information, see https://github.com/toml-lang/toml + +[base] +# Interval blocks of breathe block, if breatheBlockInterval is 0, breathe block will be created every day. +breatheBlockInterval = 0 +# Size of account cache +accountCacheSize = 30000 +# Size of signature cache +signatureCacheSize = 30000 +# Running mode when start up, 0: Normal, 1: TransferOnly, 2: RecoverOnly +startMode = 0 +# Concurrency of OrderKeeper, should be power of 2 +orderKeeperConcurrency = 2 +# Days count back for breathe block +breatheBlockDaysCountBack = 7 + +[upgrade] +# Block height of BEP6 upgrade +BEP6Height = 1 +# Block height of BEP9 upgrade +BEP9Height = 1 +# Block height of BEP10 upgrade +BEP10Height = 1 +# Block height of BEP19 upgrade +BEP19Height = 1 +# Block height of BEP12 upgrade +BEP12Height = 1 +# Block height of BEP3 upgrade +BEP3Height = 1 +# Block height of FixSignBytesOverflow upgrade +FixSignBytesOverflowHeight = 1 +# Block height of LotSizeOptimization upgrade +LotSizeUpgradeHeight = 1 +# Block height of changing listing rule upgrade +ListingRuleUpgradeHeight = 1 +# Block height of FixZeroBalanceHeight upgrade +FixZeroBalanceHeight = 1 +# Block height of smart chain upgrade +LaunchBscUpgradeHeight = 1 +# Block height of BEP8 upgrade +BEP8Height = 1 +# Block height of BEP67 upgrade +BEP67Height = 1 +# Block height of BEP70 upgrade +BEP70Height = 1 +# Block height of BEP82 upgrade +BEP82Height = 9223372036854775807 +# Block height of BEP84 upgrade +BEP84Height = 9223372036854775807 +# Block height of BEP87 upgrade +BEP87Height = 9223372036854775807 +# Block height of FixFailAckPackage upgrade +FixFailAckPackageHeight = 9223372036854775807 +# Block height of EnableAccountScriptsForCrossChainTransferHeight upgrade +EnableAccountScriptsForCrossChainTransferHeight = 9223372036854775807 +# Block height of BEP128 upgrade +BEP128Height = 9223372036854775807 +# Block height of BEP151 upgrade +BEP151Height = 9223372036854775807 +# Block height of BEP153 upgrade +BEP153Height = 9223372036854775807 +# Block height of BEP159 upgrade +BEP159Height = 9223372036854775807 +# Block height of BEP159Phase2 upgrade +BEP159Phase2Height = 9223372036854775807 +# Block height of LimitConsAddrUpdateInterval upgrade +LimitConsAddrUpdateIntervalHeight = 9223372036854775807 +# Block height of BEP173 upgrade +BEP173Height = 9223372036854775807 +# Block height of FixDoubleSignChainIdHeight upgrade +FixDoubleSignChainIdHeight = 9223372036854775807 +# Block height of BEP126 upgrade +BEP126Height = 9223372036854775807 +# Block height of BEP255 upgrade +BEP255Height = 9223372036854775807 + +[query] +# ABCI query interface black list, suggested value: ["custom/gov/proposals", "custom/timelock/timelocks", "custom/atomicSwap/swapcreator", "custom/atomicSwap/swaprecipient"] +ABCIQueryBlackList = [] + +[addr] +# Bech32PrefixAccAddr defines the Bech32 prefix of an account's address +bech32PrefixAccAddr = "bnb" +# Bech32PrefixAccPub defines the Bech32 prefix of an account's public key +bech32PrefixAccPub = "bnbp" +# Bech32PrefixValAddr defines the Bech32 prefix of a validator's operator address +bech32PrefixValAddr = "bva" +# Bech32PrefixValPub defines the Bech32 prefix of a validator's operator public key +bech32PrefixValPub = "bvap" +# Bech32PrefixConsAddr defines the Bech32 prefix of a consensus node address +bech32PrefixConsAddr = "bca" +# Bech32PrefixConsPub defines the Bech32 prefix of a consensus node public key +bech32PrefixConsPub = "bcap" + +##### publication related configurations ##### +[publication] +# configurations ends with Kafka can be a semi-colon separated host-port list +# Whether we want publish market data (this includes trades and order) +publishOrderUpdates = false +orderUpdatesTopic = "orders" +orderUpdatesKafka = "127.0.0.1:9092" + +# Whether we want publish account balance to notify browser db indexer persist latest account balance change +publishAccountBalance = false +accountBalanceTopic = "accounts" +accountBalanceKafka = "127.0.0.1:9092" + +# Whether we want publish order book changes +publishOrderBook = false +orderBookTopic = "orders" +orderBookKafka = "127.0.0.1:9092" + +# Whether we want publish block fee changes +publishBlockFee = false +blockFeeTopic = "accounts" +blockFeeKafka = "127.0.0.1:9092" + +# Whether we want publish transfers +publishTransfer = false +transferTopic = "transfers" +transferKafka = "127.0.0.1:9092" + +# Whether we want publish block +publishBlock = false +blockTopic = "block" +blockKafka = "127.0.0.1:9092" + +# Whether we want publish distribution +publishDistributeReward = false +distributeRewardTopic = "distribution" +distributeRewardKafka = "127.0.0.1:9092" + +# Whether we want publish staking +publishStaking = false +stakingTopic = "staking" +stakingKafka = "127.0.0.1:9092" + +# Whether we want publish slashing +publishSlashing = false +slashingTopic = "slashing" +slashingKafka = "127.0.0.1:9092" + +# Whether we want publish cross transfer +publishCrossTransfer = false +crossTransferTopic = "crossTransfer" +crossTransferKafka = "127.0.0.1:9092" + +# Whether we want publish mirror events +publishMirror = false +mirrorTopic = "mirror" +mirrorKafka = "127.0.0.1:9092" + +# Whether we want publish side proposals +publishSideProposal = false +sideProposalTopic = "sideProposal" +sideProposalKafka = "127.0.0.1:9092" + +# Whether we want publish breatheBlock +publishBreatheBlock = false +breatheBlockTopic = "breatheBlock" +breatheBlockKafka = "127.0.0.1:9092" + +# Global setting +publicationChannelSize = 10000 +publishKafka = false +publishLocal = false +# max size in megabytes of marketdata json file before rotate +localMaxSize = 1024 +# max days of marketdata json files to keep before deleted +localMaxAge = 7 + +# whether the kafka open SASL_PLAINTEXT auth +auth = false +kafkaUserName = "" +kafkaPassword = "" + +# stop process when publish to Kafka failed +stopOnKafkaFail = false + +# please modify the default value into the version of Kafka you are using +# kafka broker version, default (and most recommended) is 2.1.0. Minimal supported version could be 0.8.2.0 +kafkaVersion = "2.1.0" + +[log] + +# Write logs to console instead of file +logToConsole = true + +## The below parameters take effect only when logToConsole is false +# Log file root, if not set, use home path +logFileRoot = "" +# Log file path relative to log file root path +logFilePath = "bnc.log" +# Number of logs keep in memory before writing to file +logBuffSize = 10000 + +[cross_chain] +# IBC chain-id for current chain +ibcChainId = 1 +# chain-id for bsc chain +bscChainId = "bsc" +# IBC chain-id for bsc chain +bscIbcChainId = 2 + +[dex] +# The suffixed symbol of BUSD +BUSDSymbol = "" diff --git a/packages/bnb-beacon-node/config/node0/gaiad/config/config.toml b/packages/bnb-beacon-node/config/node0/gaiad/config/config.toml new file mode 100644 index 00000000..0784ca5e --- /dev/null +++ b/packages/bnb-beacon-node/config/node0/gaiad/config/config.toml @@ -0,0 +1,406 @@ +# This is a TOML config file. +# For more information, see https://github.com/toml-lang/toml + +##### main base config options ##### + +# TCP or UNIX socket address of the ABCI application, +# or the name of an ABCI application compiled in with the Tendermint binary +proxy_app = "tcp://127.0.0.1:26658" + +# A custom human readable name for this node +moniker = "node0" + +# If this node is many blocks behind the tip of the chain, FastSync +# allows them to catchup quickly by downloading blocks in parallel +# and verifying their commits +fast_sync = true + +# Only take effect when HotSyncReactor is true. +# If true, will sync blocks use hot sync protocol +# If false, still use tendermint consensus protocol, but can still handle other peers sync request. +hot_sync = false + +# The max wait time for subscribe a block. +# Only take effect when hot_sync is true +hot_sync_timeout = "3s" + +# It will benefit fullnode and witness who do not need consensus by saving network and cpu resources. +# Recommend the node that is not validator to turn on. +hot_sync_reactor = false + +# As state sync is an experimental feature, this switch can totally disable it on core network nodes (validator, witness) +state_sync_reactor = true + +# If this node is many days behind the tip of the chain, StateSyncHeight +# allows them to catchup quickly by downloading app state (without historical blocks) +# in parallel and start syncing block afterwards +# <0 - turn off state sync +# =0 - sync from peer's latest height +# >0 - sync from that height +state_sync_height = -1 + +# Database backend: goleveldb | cleveldb | boltdb +# * goleveldb (github.com/syndtr/goleveldb - most popular implementation) +# - pure go +# - stable +# * cleveldb (uses levigo wrapper) +# - fast +# - requires gcc +# - use cleveldb build tag (go build -tags cleveldb) +# * boltdb (uses etcd's fork of bolt - github.com/etcd-io/bbolt) +# - EXPERIMENTAL +# - may be faster is some use-cases (random reads - indexer) +# - use boltdb build tag (go build -tags boltdb) +db_backend = "goleveldb" + +# Database directory +db_dir = "data" + +# Output level for logging, including package level options +log_level = "main:info,state:info,*:error" + +# Output format: 'plain' (colored text) or 'json' +log_format = "plain" + +##### additional base config options ##### + +# Path to the JSON file containing the initial validator set and other meta data +genesis_file = "config/genesis.json" + +# Path to the JSON file containing the private key to use as a validator in the consensus protocol +priv_validator_key_file = "config/priv_validator_key.json" + +# Path to the JSON file containing the last sign state of a validator +priv_validator_state_file = "data/priv_validator_state.json" + +# TCP or UNIX socket address for Tendermint to listen on for +# connections from an external PrivValidator process +priv_validator_laddr = "" + +# Path to the JSON file containing the private key to use for node authentication in the p2p protocol +node_key_file = "config/node_key.json" + +# Mechanism to connect to the ABCI application: socket | grpc +abci = "socket" + +# TCP or UNIX socket address for the profiling server to listen on +prof_laddr = "" + +# If true, query the ABCI app on connecting to a new peer +# so the app can decide if we should keep the connection or not +filter_peers = false + +# If false, will not check appHash when apply block +with_app_stat = true + +##### advanced configuration options ##### + +##### rpc server configuration options ##### +[rpc] + +# TCP or UNIX socket address for the RPC server to listen on +laddr = "tcp://0.0.0.0:26657" + +# A list of origins a cross-domain request can be executed from +# Default value '[]' disables cors support +# Use '["*"]' to allow any origin +cors_allowed_origins = [] + +# A list of methods the client is allowed to use with cross-domain requests +cors_allowed_methods = ["HEAD", "GET", "POST", ] + +# A list of non simple headers the client is allowed to use with cross-domain requests +cors_allowed_headers = ["Origin", "Accept", "Content-Type", "X-Requested-With", "X-Server-Time", ] + +# TCP or UNIX socket address for the gRPC server to listen on +# NOTE: This server only supports /broadcast_tx_commit +grpc_laddr = "" + +# Maximum number of simultaneous connections. +# Does not include RPC (HTTP&WebSocket) connections. See max_open_connections +# If you want to accept a larger number than the default, make sure +# you increase your OS limits. +# 0 - unlimited. +# Should be < {ulimit -Sn} - {MaxNumInboundPeers} - {MaxNumOutboundPeers} - {N of wal, db and other open files} +# 1024 - 40 - 10 - 50 = 924 = ~900 +grpc_max_open_connections = 900 + +# Activate unsafe RPC commands like /dial_seeds and /unsafe_flush_mempool +unsafe = false + +# Maximum number of simultaneous connections (including WebSocket). +# Does not include gRPC connections. See grpc_max_open_connections +# If you want to accept a larger number than the default, make sure +# you increase your OS limits. +# 0 - unlimited. +# Should be < {ulimit -Sn} - {MaxNumInboundPeers} - {MaxNumOutboundPeers} - {N of wal, db and other open files} +# 1024 - 40 - 10 - 50 = 924 = ~900 +max_open_connections = 900 + +# Websocket handler will be disabled if set true +disable_websocket = false + +# Maximum number of go routine to process websocket request. +# 1 - process websocket request synchronously. +# 10 - default size. +# Should be {WebsocketPoolSpawnSize} =< {WebsocketPoolMaxSize} +websocket_pool_size = 10 + +# The queued buffer for workers to process requests. +# 10 -default +websocket_pool_queue_size = 10 + +# The initial size of goroutines in pool. +# 1 - process websocket request synchronously. +# 5 - default size +# Should be {WebsocketPoolSpawnSize} =< {WebsocketPoolMaxSize} +websocket_pool_spawn_size = 5 + +# Maximum number of unique clientIDs that can /subscribe +# If you're using /broadcast_tx_commit, set to the estimated maximum number +# of broadcast_tx_commit calls per block. +max_subscription_clients = 100 + +# Maximum number of unique queries a given client can /subscribe to +# If you're using GRPC (or Local RPC client) and /broadcast_tx_commit, set to +# the estimated # maximum number of broadcast_tx_commit calls per block. +max_subscriptions_per_client = 5 + +# How long to wait for a tx to be committed during /broadcast_tx_commit. +# WARNING: Using a value larger than 10s will result in increasing the +# global HTTP write timeout, which applies to all connections and endpoints. +# See https://github.com/tendermint/tendermint/issues/3435 +timeout_broadcast_tx_commit = "10s" + +# Maximum size of request body, in bytes +max_body_bytes = 1000000 + +# Maximum size of request header, in bytes +max_header_bytes = 1048576 + +# The path to a file containing certificate that is used to create the HTTPS server. +# Migth be either absolute path or path related to tendermint's config directory. +# If the certificate is signed by a certificate authority, +# the certFile should be the concatenation of the server's certificate, any intermediates, +# and the CA's certificate. +# NOTE: both tls_cert_file and tls_key_file must be present for Tendermint to create HTTPS server. Otherwise, HTTP server is run. +tls_cert_file = "" + +# The path to a file containing matching private key that is used to create the HTTPS server. +# Migth be either absolute path or path related to tendermint's config directory. +# NOTE: both tls_cert_file and tls_key_file must be present for Tendermint to create HTTPS server. Otherwise, HTTP server is run. +tls_key_file = "" + +##### peer to peer configuration options ##### +[p2p] + +# Address to listen for incoming connections +laddr = "tcp://0.0.0.0:26656" + +# Address to advertise to peers for them to dial +# If empty, will use the same port as the laddr, +# and will introspect on the listener or use UPnP +# to figure out the address. +external_address = "" + +# Comma separated list of seed nodes to connect to +seeds = "" + +# Comma separated list of nodes to keep persistent connections to +persistent_peers = "" + +# UPNP port forwarding +upnp = false + +# Path to address book +addr_book_file = "config/addrbook.json" + +# Set true for strict address routability rules +# Set false for private or local networks +addr_book_strict = true + +# Maximum number of inbound peers +max_num_inbound_peers = 40 + +# Maximum number of outbound peers to connect to, excluding persistent peers +max_num_outbound_peers = 10 + +# Time to wait before flushing messages out on the connection +flush_throttle_timeout = "10ms" + +# Maximum size of a message packet payload, in bytes +max_packet_msg_payload_size = 1048576 + +# Maximum num of keys a state sync request ask for +keys_per_request = 2500 + +# Rate at which packets can be sent, in bytes/second +send_rate = 52428800 + +# Rate at which packets can be received, in bytes/second +recv_rate = 52428800 + +# Interval to send pings +ping_interval = "1m0s" + +# Maximum wait time for pongs +pong_timeout = "45s" + +# Set true to enable the peer-exchange reactor +pex = true + +# Seed mode, in which node constantly crawls the network and looks for +# peers. If another node asks it for addresses, it responds and disconnects. +# +# Does not work if the peer-exchange reactor is disabled. +seed_mode = false + +# Comma separated list of peer IDs to keep private (will not be gossiped to other peers) +private_peer_ids = "" + +# Toggle to disable guard against peers connecting from the same ip. +allow_duplicate_ip = false + +# Peer connection configuration. +handshake_timeout = "20s" +dial_timeout = "3s" + +##### dbcache configuration options ##### +[dbcache] +# OpenFilesCacheCapacity defines the capacity of the open files caching. +open_files_cache_capacity = 1024 + +# BlockCacheCapacity defines the capacity of the 'sorted table' block caching. +block_cache_capacity = 8388608 + +# WriteBuffer defines maximum size of a 'memdb' before flushed to 'sorted table'. +write_buffer = 4194304 + +# Filter defines an 'effective filter' to use. An 'effective filter' +# if defined will be used to generate per-table filter block. +# Greater than 0 would creates a new initialized bloom filter for given bitsPerKey. +bits_per_key = 10 + +##### mempool configuration options ##### +[mempool] + +recheck = true +broadcast = true +wal_dir = "" + +# If set true, will only broadcast transactions to persistent peers. +only_to_persistent = false + +# If set true, only the transaction from none persistent peer will broadcast. +skip_tx_from_persistent = false + +# Maximum number of transactions in the mempool +size = 5000 + +# Limit the total size of all txs in the mempool. +# This only accounts for raw transactions (e.g. given 1MB transactions and +# max_txs_bytes=5MB, mempool will only accept 5 transactions). +max_txs_bytes = 1073741824 + +# Size of the cache (used to filter transactions we saw earlier) in transactions +cache_size = 10000 + +# Maximum size of a single transaction. +# NOTE: the max size of a tx transmitted over the network is {max_tx_bytes} + {amino overhead}. +max_tx_bytes = 1048576 + +##### fast sync configuration options ##### +[fastsync] + +# Fast Sync version to use: +# 1) "v0" (default) - the legacy fast sync implementation +# 2) "v1" - refactor of v0 version for better testability +version = "v0" + +##### consensus configuration options ##### +[consensus] + +wal_file = "data/cs.wal/wal" + +timeout_propose = "3s" +timeout_propose_delta = "500ms" +timeout_prevote = "1s" +timeout_prevote_delta = "500ms" +timeout_precommit = "1s" +timeout_precommit_delta = "500ms" +timeout_commit = "1s" + +# Make progress as soon as we have all the precommits (as if TimeoutCommit = 0) +skip_timeout_commit = false + +# EmptyBlocks mode and possible interval between empty blocks +create_empty_blocks = true +create_empty_blocks_interval = "0s" + +# Reactor sleep duration parameters +peer_gossip_sleep_duration = "10ms" +peer_query_maj23_sleep_duration = "2s" + +# Block time parameters. Corresponds to the minimum time increment between consecutive blocks. +blocktime_iota = "0s" + +##### transactions indexer configuration options ##### +[tx_index] + +# What indexer to use for transactions +# +# Options: +# 1) "null" +# 2) "kv" (default) - the simplest possible indexer, backed by key-value storage (defaults to levelDB; see DBBackend). +indexer = "kv" + +# Operator ["<", ">", ">=", "<="] belongs to range query operator. +# Notice: only enable it in trust environment. +enable_range_query = false + +# Comma-separated list of tags to index (by default the only tag is "tx.hash") +# +# You can also index transactions by height by adding "tx.height" tag here. +# +# It's recommended to index only a subset of tags due to possible memory +# bloat. This is, of course, depends on the indexer's DB and the volume of +# transactions. +index_tags = "" + +# When set to true, tells indexer to index all tags (predefined tags: +# "tx.hash", "tx.height" and all tags from DeliverTx responses). +# +# Note this may be not desirable (see the comment above). IndexTags has a +# precedence over IndexAllTags (i.e. when given both, IndexTags will be +# indexed). +index_all_tags = false + +##### block indexer configuration options ##### +[block_index] + +# What indexer to use for blocks +# +# Options: +# 1) "null" +# 2) "kv" (default) - the simplest possible indexer, backed by key-value storage (defaults to levelDB; see DBBackend). +indexer = "null" + +##### instrumentation configuration options ##### +[instrumentation] + +# When true, Prometheus metrics are served under /metrics on +# PrometheusListenAddr. +# Check out the documentation for the list of available metrics. +prometheus = false + +# Address to listen for Prometheus collector(s) connections +prometheus_listen_addr = ":26660" + +# Maximum number of simultaneous connections. +# If you want to accept a larger number than the default, make sure +# you increase your OS limits. +# 0 - unlimited. +max_open_connections = 3 + +# Instrumentation namespace +namespace = "tendermint" diff --git a/packages/bnb-beacon-node/config/node0/gaiad/config/genesis.json b/packages/bnb-beacon-node/config/node0/gaiad/config/genesis.json new file mode 100644 index 00000000..555dc542 --- /dev/null +++ b/packages/bnb-beacon-node/config/node0/gaiad/config/genesis.json @@ -0,0 +1,278 @@ +{ + "genesis_time": "2023-10-09T15:38:07.032580273Z", + "chain_id": "chain-OtXu2u", + "consensus_params": { + "block_size": { + "max_bytes": "1048576", + "max_gas": "-1" + }, + "evidence": { + "max_age": "100000" + }, + "validator": { + "pub_key_types": [ + "ed25519" + ] + } + }, + "app_hash": "", + "app_state": { + "tokens": [ + { + "name": "Binance Chain Native Token", + "symbol": "BNB", + "total_supply": "20000000000000000", + "owner": "bnb16sju6kxjcz7sxa2g3kf6kp3zvzf4g84jwvjh0h", + "mintable": false + } + ], + "accounts": [ + { + "name": "node0", + "address": "bnb16sju6kxjcz7sxa2g3kf6kp3zvzf4g84jwvjh0h", + "consensus_addr": "4BA4A42EA90C887F058FE536459E5812B1173545" + } + ], + "dex": {}, + "param": { + "fees": [ + { + "type": "params/FixedFeeParams", + "value": { + "msg_type": "submit_proposal", + "fee": "1000000000", + "fee_for": 1 + } + }, + { + "type": "params/FixedFeeParams", + "value": { + "msg_type": "deposit", + "fee": "125000", + "fee_for": 1 + } + }, + { + "type": "params/FixedFeeParams", + "value": { + "msg_type": "vote", + "fee": "0", + "fee_for": 3 + } + }, + { + "type": "params/FixedFeeParams", + "value": { + "msg_type": "create_validator", + "fee": "1000000000", + "fee_for": 1 + } + }, + { + "type": "params/FixedFeeParams", + "value": { + "msg_type": "remove_validator", + "fee": "100000000", + "fee_for": 1 + } + }, + { + "type": "params/FixedFeeParams", + "value": { + "msg_type": "dexList", + "fee": "200000000000", + "fee_for": 2 + } + }, + { + "type": "params/FixedFeeParams", + "value": { + "msg_type": "orderNew", + "fee": "0", + "fee_for": 3 + } + }, + { + "type": "params/FixedFeeParams", + "value": { + "msg_type": "orderCancel", + "fee": "0", + "fee_for": 3 + } + }, + { + "type": "params/FixedFeeParams", + "value": { + "msg_type": "issueMsg", + "fee": "100000000000", + "fee_for": 2 + } + }, + { + "type": "params/FixedFeeParams", + "value": { + "msg_type": "mintMsg", + "fee": "20000000000", + "fee_for": 2 + } + }, + { + "type": "params/FixedFeeParams", + "value": { + "msg_type": "tokensBurn", + "fee": "100000000", + "fee_for": 1 + } + }, + { + "type": "params/FixedFeeParams", + "value": { + "msg_type": "tokensFreeze", + "fee": "1000000", + "fee_for": 1 + } + }, + { + "type": "params/TransferFeeParams", + "value": { + "fixed_fee_params": { + "msg_type": "send", + "fee": "62500", + "fee_for": 1 + }, + "multi_transfer_fee": "50000", + "lower_limit_as_multi": "2" + } + }, + { + "type": "params/DexFeeParam", + "value": { + "dex_fee_fields": [ + { + "fee_name": "ExpireFee", + "fee_value": "50000" + }, + { + "fee_name": "ExpireFeeNative", + "fee_value": "10000" + }, + { + "fee_name": "CancelFee", + "fee_value": "50000" + }, + { + "fee_name": "CancelFeeNative", + "fee_value": "10000" + }, + { + "fee_name": "FeeRate", + "fee_value": "1000" + }, + { + "fee_name": "FeeRateNative", + "fee_value": "400" + }, + { + "fee_name": "IOCExpireFee", + "fee_value": "25000" + }, + { + "fee_name": "IOCExpireFeeNative", + "fee_value": "5000" + } + ] + } + } + ] + }, + "stake": { + "pool": { + "loose_tokens": "20000000000000000", + "bonded_tokens": "0" + }, + "params": { + "unbonding_time": "604800000000000", + "max_validators": 21, + "bond_denom": "BNB", + "min_self_delegation": "1000000000000", + "min_delegation_change": "100000000", + "reward_distribution_batch_size": "1000", + "max_stake_snapshots": 30, + "base_proposer_reward_ratio": "1000000", + "bonus_proposer_reward_ratio": "4000000", + "fee_from_bsc_to_bc_ratio": "10000000" + }, + "validators": null, + "bonds": null + }, + "gov": { + "starting_proposalID": "1", + "deposit_params": { + "min_deposit": [ + { + "denom": "BNB", + "amount": "100000000000" + } + ], + "max_deposit_period": "172800000000000" + }, + "tally_params": { + "quorum": "50000000", + "threshold": "50000000", + "veto": "33400000" + } + }, + "gentxs": [ + { + "type": "auth/StdTx", + "value": { + "msg": [ + { + "type": "cosmos-sdk/MsgCreateValidatorProposal", + "value": { + "MsgCreateValidator": { + "Description": { + "moniker": "node0", + "identity": "", + "website": "", + "details": "" + }, + "Commission": { + "rate": "0", + "max_rate": "0", + "max_change_rate": "0" + }, + "delegator_address": "bnb16sju6kxjcz7sxa2g3kf6kp3zvzf4g84jwvjh0h", + "validator_address": "bva16sju6kxjcz7sxa2g3kf6kp3zvzf4g84jwsn83n", + "pubkey": { + "type": "tendermint/PubKeyEd25519", + "value": "UaSCGHI+ZgEU+HPpPjtoWzro9k05g0UIdI8G/QrPFDs=" + }, + "delegation": { + "denom": "BNB", + "amount": "9000000000000" + } + }, + "proposal_id": "0" + } + } + ], + "signatures": [ + { + "pub_key": { + "type": "tendermint/PubKeySecp256k1", + "value": "A/oj5bQgZ8GduPeclMYVH4ARYtg7cBQWnDLL8oTSwDDv" + }, + "signature": "kNT3hPTKMUhEqOS7F6VjQSZY8w5zTfmSM1merVgMOcIEoeqXYiWUSxWUzwBcIL7FfI2LOWHbUnrj5i4nZWR8pQ==", + "account_number": "0", + "sequence": "0" + } + ], + "memo": "be338514882979ae579208fe61485499f3e75b0a@172.20.0.2:26656", + "source": "0", + "data": null + } + } + ] + } +} \ No newline at end of file diff --git a/packages/bnb-beacon-node/config/node0/gaiad/config/node_key.json b/packages/bnb-beacon-node/config/node0/gaiad/config/node_key.json new file mode 100644 index 00000000..133010ee --- /dev/null +++ b/packages/bnb-beacon-node/config/node0/gaiad/config/node_key.json @@ -0,0 +1 @@ +{"priv_key":{"type":"tendermint/PrivKeyEd25519","value":"n37n154ohDEZb9bQoCHvZ3TWdDjMgu149V3vPhG4k/GG29WbI01SFqwhWUO9q1FOWQ2iPQNTBNnsJ4xKReGCdA=="}} \ No newline at end of file diff --git a/packages/bnb-beacon-node/config/node0/gaiad/config/priv_validator_key.json b/packages/bnb-beacon-node/config/node0/gaiad/config/priv_validator_key.json new file mode 100644 index 00000000..54d6213c --- /dev/null +++ b/packages/bnb-beacon-node/config/node0/gaiad/config/priv_validator_key.json @@ -0,0 +1,11 @@ +{ + "address": "4BA4A42EA90C887F058FE536459E5812B1173545", + "pub_key": { + "type": "tendermint/PubKeyEd25519", + "value": "UaSCGHI+ZgEU+HPpPjtoWzro9k05g0UIdI8G/QrPFDs=" + }, + "priv_key": { + "type": "tendermint/PrivKeyEd25519", + "value": "tol2TFACZYJNM+UxlbJ2Y+/xlxj7j8uaQFff91TxLyBRpIIYcj5mART4c+k+O2hbOuj2TTmDRQh0jwb9Cs8UOw==" + } +} \ No newline at end of file diff --git a/packages/bnb-beacon-node/config/node0/gaiad/data/priv_validator_state.json b/packages/bnb-beacon-node/config/node0/gaiad/data/priv_validator_state.json new file mode 100644 index 00000000..ca3ad2f7 --- /dev/null +++ b/packages/bnb-beacon-node/config/node0/gaiad/data/priv_validator_state.json @@ -0,0 +1,5 @@ +{ + "height": "0", + "round": "0", + "step": 0 +} \ No newline at end of file diff --git a/packages/bnb-beacon-node/default.nix b/packages/bnb-beacon-node/default.nix new file mode 100644 index 00000000..c2b65bbc --- /dev/null +++ b/packages/bnb-beacon-node/default.nix @@ -0,0 +1,46 @@ +{ + lib, + buildGoModule, + fetchFromGitHub, + libpcap, +}: +buildGoModule rec { + pname = "bnb-beacon-node"; + version = "1.0.0"; + + src = fetchFromGitHub { + owner = "bnb-chain"; + repo = "node"; + rev = "13bb81c70a49e55e296ed2b59c680ff9a85db8f5"; + hash = "sha256-wW2KJf6W4vyBLcqcZ0Efb1oEzmztRJtCPdg3GOnoVCc="; + }; + + vendorHash = "sha256-DQis6uG6E+2KK8gViudIpDTxRO2zRoufuQlkyFXqO7s="; + + proxyVendor = true; + + subPackages = [ + "cmd/bnbcli" + "cmd/bnbchaind" + ]; + + buildInputs = [ + libpcap + ]; + + ldflags = ["-s" "-w"]; + + meta = with lib; { + description = ""; + homepage = "https://github.com/bnb-chain/node"; + changelog = "https://github.com/bnb-chain/node/blob/${src.rev}/CHANGELOG.md"; + license = licenses.mpl20; + maintainers = with maintainers; []; + mainProgram = "bnb-beacon-node"; + }; + + postInstall = '' + mkdir $out/data + cp -r ${./config}/* $out/data + ''; +} diff --git a/shell.nix b/shell.nix index 24396498..5ea92643 100644 --- a/shell.nix +++ b/shell.nix @@ -24,6 +24,7 @@ in # Packages defined in this repo metacraft-labs.cosmos-theta-testnet + metacraft-labs.bnb-beacon-node metacraft-labs.circom metacraft-labs.circ