Repository navigation
Align with the FISCO-BCOS 3.18.0 config cleanup: no feature_flags slot, [engine_rpc], split node configs - #13
Merged
Conversation
FISCO-BCOS no longer reads or verifies a feature-bitmap slot at genesis:
Features::toFlagsNumber and Ledger's verifyL2FeatureFlagsSlot are gone and
flags are persisted by name only. build-allocs.py therefore stops requiring
the feature_flags SystemConfig entry and now rejects it, since writing it
would only put a meaningless slot (keccak256("feature_flags" || be32(101)))
into the genesis state root.
- build-allocs.py: replace the "must carry feature_flags" check with a
"must not carry feature_flags" check (any predeploy's system_config);
drop the now-unused SYSTEM_CONFIG_PREDEPLOY constant and the docstring /
comments describing the verified slot.
- chain-config-c2.yaml, chain-config.template.yaml: remove the
feature_flags entries and their derivation comments.
- chain-config.yaml, README.md: remove the feature_flags descriptions.
- test_build_allocs.py: fixtures no longer carry feature_flags;
test_missing_feature_flags_rejected becomes
test_feature_flags_entry_rejected.
The only change to generated output is that slot disappearing from the
SystemConfig proxy 0x43...c0 (C2 and template layouts both diffed against
the previous generator).
Verification:
python3 -m pytest -q test_build_allocs.py test_gen_rollup_config.py \
test_mpt_state_root.py test_gen_eth_header_fixture.py # 53 passed
python3 build-allocs.py --config chain-config-c2.yaml ... # 2374 allocs
python3 build-allocs.py --config <template, owner filled> ... # 2374 allocs
A single FISCO-BCOS node (executor v3) built without the slot check
initializes from each alloc set; block 0 hash/stateRoot equal the
gen_eth_header_fixture.py header and eth_getStorageAt on the slot is 0.
…nfig.ini + config.genesis
FISCO-BCOS 3.18 removed or renamed several keys the harness still wrote; a
node now logs one "this key has no effect" WARN per such key. Write only
keys the node reads:
- [op_engine_rpc] enable=true -> [engine_rpc] (no enable key: the Engine API
listener runs whenever executor.version >= 2); port and jwt unchanged.
- drop [op_fork_schedule]; [op_fork_timestamps] alone carries the OP forks
(setup_c2.sh keeps the same jovian_time choice: rollup.json's value when
L2_JOVIAN_OFFSET is set, else 0).
- drop [consensus] enable_single_node_consensus / block_interval /
produce_empty_blocks / fee_recipient: an executor v3 node never
self-produces, these did nothing on the OP lane (B3a's
produce_empty_blocks sed goes too, as does the unused FEE_RECIPIENT).
- drop [web3] chain_id: v2/v3 read eth_chainId from the decimal
[chain] chain_id (11155111 / 914901, already numeric).
- drop [version]: v2/v3 ignore it.
- keep [web3_rpc] enable_miner_api: op-batcher calls miner_setMaxDASize on
the web3 listener.
The single merged file passed as both -c and -g also made the node WARN
"config.ini [chain]" (from compatibility 3.1 [chain] is read from
config.genesis only). setup_op_node.sh and setup_c2.sh therefore write
config.genesis (chain, consensus, tx, executor, forks, header, allocs) and
config.ini (listeners, storage, p2p, cert, security, log) separately, and
every launcher (B3a start.sh, restart_b3.sh, setup_c2.sh,
resilience_test.sh) runs "-c config.ini -g config.genesis". Readers of
[eth_genesis_header] (rpc_matrix.py B3_GENESIS) still point at
config.genesis.
Comments in setup_op_node.sh, rpc_matrix.py and predeploy_matrix.py, and
the opstack-genesis README (L2 mode = executor.version 3, forks by
[op_fork_timestamps]) now describe this surface.
Verification (PR-B binary, FISCO-BCOS feat/config-cleanup-pr-b a111f561d):
python3 -m pytest -q test_build_allocs.py test_gen_rollup_config.py \
test_mpt_state_root.py test_gen_eth_header_fixture.py # 53 passed
python3 -m pytest -q tools/op-e2e/tests # 9 passed
START=5 END=6 setup_op_node.sh; START=8 END=8 setup_op_node.sh
B3 and B3a start; Engine API 401 without JWT, 200 with JWT;
block 0 hash == [eth_genesis_header].hash (0x27ee3eab...);
eth_chainId 0xaa36a7; 0 "this key has no effect" lines
(the merged-file layout gave 2: config.ini [chain]);
restart_b3.sh restart reopens the same chain
START=4 END=4 setup_c2.sh (Jovian at 0, and L2_JOVIAN_OFFSET set)
node starts; Engine API 401/200; block 0 hash == header hash
(0xb98cd5a8...); eth_chainId 0xdf5d5; miner_setMaxDASize on the
web3 port -> true; 0 "this key has no effect" lines
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Aligns the harness with the FISCO-BCOS 3.18.0 config cleanup (FISCO-BCOS PR-B,
feat/config-cleanup-pr-b): the node no longer requires the SystemConfigfeature_flagsslot, and its v3 (OP lane) configs use the new config surface.Merge order: this PR first, then FISCO-BCOS PR-B bumps the pins in
workflow.ymlandc2-e2e.yml. Against the current FISCO-BCOS release-3.18.0 (before PR-B) the new configs do not start the Engine API, because that binary still needs[op_engine_rpc] enable=true.Commits
feat(opstack-genesis):build-allocs.pyno longer requiresfeature_flagson the SystemConfig predeploy (0x43…c0) and refuses asystem_configthat still carries it (the generator writes everysystem_configkey to storage, so an old config would otherwise keep the slot in genesis). Chain configs, README and tests drop the entry. Old and new allocs differ in exactly that one storage slot.feat(op-e2e):setup_c2.sh/setup_op_node.shwrite[engine_rpc](noenable; same port and JWT) instead of[op_engine_rpc]; drop[op_fork_schedule], the[consensus]self-production keys,[web3] chain_idand[version](v3 ignores them;[chain] chain_idwas already numeric). Each node now gets a separateconfig.iniandconfig.genesislaunched with-c config.ini -g config.genesis: from compatibility 3.1[chain]is read from the genesis only, and the single merged file made the node log a "key has no effect" warning.[web3_rpc] enable_miner_apistays (op-batcher callsminer_setMaxDASizeon the web3 port).Test
pyteston the opstack-genesis tests (53 passed) andtools/op-e2e/tests(9 passed);bash -non the changed scripts.[eth_genesis_header].hash; zero "this key has no effect" lines;miner_setMaxDASizeon the web3 port returns true.tools/.ci/ci_opnode_startup_check.shagainst this branch with op-node v1.19.2 (da197e45): PASS, op-node loads the L2 genesis over the JWT Engine API.🤖 Generated with Claude Code