Skip to content

Unable to Determine Correct BSC Hard Fork Sequence and Override Flags for Local Geth Network after Shanghai #3504

@AlirezaEthDev

Description

@AlirezaEthDev

I launched a local BSC network on Windows using multiple Geth clients. I plan to apply a hard fork to one node and see whether the network can synchronize again or not. My plan is: First, I run all nodes with the Shanghai hard fork enabled, then after some time I upgrade one node to the Cancun hard fork. After that, I check whether all nodes still synchronize correctly and what happens in terms of consensus. All nodes are initialized with the same genesis configuration.

I start the validator node with:

.\geth.exe `
  --config node1\config1.toml `
  --datadir node1 `
  --http `
  --http.addr 127.0.0.1 `
  --http.port 8545 `
  --http.api "eth,net,web3,txpool" `
  --unlock 0xc68503025add457fb35cbcbd7272c1b88fbdbdef `
  --password node1\pass.txt `
  --miner.etherbase 0xc68503025add457fb35cbcbd7272c1b88fbdbdef `
  --mine `
  --allow-insecure-unlock `
  --verbosity 3

I start the listener node with:

.\geth.exe `
  --config config1.toml `
  --datadir node2 `
  --http `
  --http.addr 0.0.0.0 `
  --http.port 8546 `
  --http.api "eth,net,web3,txpool" `
  --ws `
  --ws.addr 0.0.0.0 `
  --ws.port 8547 `
  --ws.api "eth,net,web3" `
  --syncmode full `
  --verbosity 3 `
  --allow-insecure-unlock

All nodes are peered by adding each other’s enode URLs. Now I want to upgrade the validator to Cancun, but I am not sure how to do that. According to geth --help, these flags might be relevant:

    --override.fermi value              (default: 0)
          Manually specify the Fermi fork timestamp, overriding the bundled setting

    --override.fixedturnlength value    (default: 0)
          Use fixed or random values for turn length instead of reading from the
          contract, only for testing purposes

    --override.immutabilitythreshold value (default: 600000)
          Number of blocks after which a chain segment is considered immutable,
          only for testing purposes

    --override.lorentz value            (default: 0)
          Manually specify the Lorentz fork timestamp, overriding the bundled setting

    --override.maxwell value            (default: 0)
          Manually specify the Maxwell fork timestamp, overriding the bundled setting

    --override.mendel value             (default: 0)
          Manually specify the Mendel fork timestamp, overriding the bundled setting

    --override.minforblobrequest value  (default: 3494400)
          Keep blob data available for at least this many blocks locally,
          only for testing purposes

    --override.osaka value              (default: 0)
          Manually specify the Osaka fork timestamp, overriding the bundled setting

    --override.passedforktime value     (default: 0)
          Manually specify the hard-fork timestamps that have already passed
          on mainnet, overriding the bundled setting

    --override.verkle value             (default: 0)
          Manually specify the Verkle fork timestamp, overriding the bundled setting
  1. According to the Geth help text, what hardfork flag (I mean --override.whathardfork) must I try after Shanghai?
  2. Is Shanghai an appropriate starting point for my local BSC network, or should I begin from a different hard fork?
  3. What is the chronological order of BSC hard forks, so that I know which fork should be applied after which?

genesis:

{
  "config": {
    "chainId": 714,
    "homesteadBlock": 0,
    "eip150Block": 0,
    "eip155Block": 0,
    "eip158Block": 0,
    "byzantiumBlock": 0,
    "constantinopleBlock": 0,
    "petersburgBlock": 0,
    "istanbulBlock": 0,
    "muirGlacierBlock": 0,
    "ramanujanBlock": 0,
    "nielsBlock": 0,
    "mirrorSyncBlock":1,
    "brunoBlock": 1,
    "eulerBlock": 2,
    "nanoBlock": 3,
    "moranBlock": 3,
    "gibbsBlock": 4,
    "planckBlock": 5,
    "lubanBlock": 6,
    "platoBlock": 7,
    "berlinBlock": 8,
    "londonBlock": 8,
    "hertzBlock": 8,
    "hertzfixBlock": 8,
    "shanghaiTime": 0,
    "keplerTime": 0,
    "feynmanTime": 0,
    "feynmanFixTime": 0,
    "cancunTime": 9999999999,
    "haberTime": 9999999999,
    "haberFixTime": 9999999999,
    "bohrTime": 9999999999,
    "pascalTime": 9999999999,
    "pragueTime": 9999999999,
    "lorentzTime": 9999999999,
    "depositContractAddress": "0x0000000000000000000000000000000000000000",
    "parlia": {},
    "blobSchedule": {
      "cancun": {
        "target": 3,
        "max": 6,
        "baseFeeUpdateFraction": 3338477
      },
      "prague": {
        "target": 3,
        "max": 6,
        "baseFeeUpdateFraction": 3338477
      }
    }
  },
  "nonce": "0x0",
  "timestamp": "0x5e9da7ce",
  "extraData": "0x0000000000000000000000000000000000000000000000000000000000000000c68503025add457fb35cbcbd7272c1b88fbdbdef0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
  "gasLimit": "0x2625a00",
  "difficulty": "0x1",
  "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "coinbase": "0xffffFFFfFFffffffffffffffFfFFFfffFFFfFFfE",
  "alloc": {...},
  "number": "0x0",
  "gasUsed": "0x0",
  "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000"
}

config1.toml (For validator):

[Eth]
NetworkId = 714
TrieTimeout = 150000000000

[Eth.Miner]
GasCeil = 70000000
GasPrice = 100000000

[Eth.TxPool]
Locals = []
NoLocals = true
Journal = "transactions.rlp"
Rejournal = 3600000000000
PriceLimit = 100000000
PriceBump = 10
AccountSlots = 200
GlobalSlots = 8000
AccountQueue = 200
GlobalQueue = 4000

[Eth.GPO]
Blocks = 20
Percentile = 60
OracleThreshold = 1000

[Node]
IPCPath = "geth1.ipc"                    # ← UNIQUE for each node
HTTPHost = "localhost"
InsecureUnlockAllowed = false
HTTPPort = 8550                          # ← UNIQUE (8546, 8547, 8548, 8549 for others)
HTTPVirtualHosts = ["localhost"]
HTTPModules = ["eth", "net", "web3", "txpool", "parlia"]
WSPort = 8551                            # ← UNIQUE (8547, 8548, 8549, 8550 for others)
WSModules = ["net", "web3", "eth"]

[Node.P2P]
MaxPeers = 200
NoDiscovery = true
StaticNodes = [
	"enode://e65956292d9293c771a6f492cf03c072c3503cf349f795f7b07b6b011d89b85b63f74a99c1b65b0c1ae33f0fbc33d4a8f0835738e0d3e0f46dd42180e8205765@127.0.0.1:30312",
	"enode://f59fb2d60a4c408bcb7906c93fd170931399faa2a7b04d9d45d26290d7a40b938b53c54c627ad71f738927d4cb3a6feb96bcf6c75bd5291208ae4d073df365e9@127.0.0.1:30313",
	"enode://b54cec5202ffcc66f83f88e781caca63f5be97d57f642ac6d1d981577e4e8a4402c6f5441bc773caf173b497030e665f612d4f6b334c912fd00847dec2b20549@127.0.0.1:30314",
	"enode://ec588572739ff62297265d2ab5e8b4f682aea72b1442034536132ff7f4f9878160e906a0084d16df589e26accf7c1c251f31668d1f829030b4991b93e06fe017@127.0.0.1:30315"
]
ListenAddr = ":30311"                   # ← UNIQUE (30312, 30313, 30314, 30315 for others)
EnableMsgEvents = false

config2.toml (For listener):

[Eth]
NetworkId = 714
TrieTimeout = 150000000000

[Eth.Miner]
GasCeil = 70000000
GasPrice = 100000000

[Eth.TxPool]
Locals = []
NoLocals = true
Journal = "transactions.rlp"
Rejournal = 3600000000000
PriceLimit = 100000000
PriceBump = 10
AccountSlots = 200
GlobalSlots = 8000
AccountQueue = 200
GlobalQueue = 4000

[Eth.GPO]
Blocks = 20
Percentile = 60
OracleThreshold = 1000

[Node]
IPCPath = "geth2.ipc"                    # ← UNIQUE for each node
HTTPHost = "localhost"
InsecureUnlockAllowed = false
HTTPPort = 8552                          # ← UNIQUE (8546, 8547, 8548, 8549 for others)
HTTPVirtualHosts = ["localhost"]
HTTPModules = ["eth", "net", "web3", "txpool", "parlia"]
WSPort = 8553                            # ← UNIQUE (8547, 8548, 8549, 8550 for others)
WSModules = ["net", "web3", "eth"]

[Node.P2P]
MaxPeers = 200
NoDiscovery = true
StaticNodes = [
	"enode://bce5f92fa0954b6a13679dc6a09e1e83c266af0bbada2debe13cc96c98ec5ae272db25d5626c2c1c16ce6fb5e93a82300240141160429b1a39c5fded474df8d7@127.0.0.1:30311",
	"enode://f59fb2d60a4c408bcb7906c93fd170931399faa2a7b04d9d45d26290d7a40b938b53c54c627ad71f738927d4cb3a6feb96bcf6c75bd5291208ae4d073df365e9@127.0.0.1:30313",
	"enode://b54cec5202ffcc66f83f88e781caca63f5be97d57f642ac6d1d981577e4e8a4402c6f5441bc773caf173b497030e665f612d4f6b334c912fd00847dec2b20549@127.0.0.1:30314",
	"enode://ec588572739ff62297265d2ab5e8b4f682aea72b1442034536132ff7f4f9878160e906a0084d16df589e26accf7c1c251f31668d1f829030b4991b93e06fe017@127.0.0.1:30315"
]
ListenAddr = ":30312"                   # ← UNIQUE (30312, 30313, 30314, 30315 for others)
EnableMsgEvents = false

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions