From 92116605035eec3a9a6d7dc431dfabfb5cabfbce Mon Sep 17 00:00:00 2001 From: WayToFuture Date: Thu, 22 Dec 2022 12:39:36 +0800 Subject: [PATCH] comments: add comments to clarify flags and byte codes (#1245) --- core/systemcontracts/upgrade.go | 6 ++++++ eth/ethconfig/config.go | 11 +++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/core/systemcontracts/upgrade.go b/core/systemcontracts/upgrade.go index e378987384..486798f1f3 100644 --- a/core/systemcontracts/upgrade.go +++ b/core/systemcontracts/upgrade.go @@ -52,6 +52,12 @@ var ( ) func init() { + + // For contract upgrades, the following information is from `bsc-genesis-contract`, to be specifically, + // 1) `CommitUrl` is the specific git commit, based on which the byte code is compiled from; + // 2) `Code` is the byte code of the contract, which is generated by compiling `bsc-genesis-contract`. + // You can refer to `https://github.com/bnb-chain/bsc-genesis-contract` to compile the smart contracts and do the verification. + ramanujanUpgrade[rialtoNet] = &Upgrade{ UpgradeName: "ramanujan", Configs: []*UpgradeConfig{ diff --git a/eth/ethconfig/config.go b/eth/ethconfig/config.go index 03104c6109..00717bcfba 100644 --- a/eth/ethconfig/config.go +++ b/eth/ethconfig/config.go @@ -128,8 +128,15 @@ type Config struct { Genesis *core.Genesis `toml:",omitempty"` // Protocol options - NetworkId uint64 // Network ID to use for selecting peers to connect to - SyncMode downloader.SyncMode + NetworkId uint64 // Network ID to use for selecting peers to connect to + SyncMode downloader.SyncMode + + // DisablePeerTxBroadcast is an optional config and disabled by default, and usually you do not need it. + // When this flag is enabled, you are requesting remote peers to stop broadcasting new transactions to you, and + // it does not mean that your node will stop broadcasting transactions to remote peers. + // If your node does care about new mempool transactions (e.g., running rpc services without the need of mempool + // transactions) or is continuously under high pressure (e.g., mempool is always full), then you can consider + // to turn it on. DisablePeerTxBroadcast bool // This can be set to list of enrtree:// URLs which will be queried for