Skip to content

Align with the FISCO-BCOS 3.18.0 config cleanup: no feature_flags slot, [engine_rpc], split node configs - #13

Merged
kyonRay merged 2 commits into
FISCO-BCOS:mainfrom
kyonRay:feat/drop-feature-flags-slot
Oct 16, 2026
Merged

kyonRay merged 2 commits into
FISCO-BCOS:mainfrom
kyonRay:feat/drop-feature-flags-slot

Conversation

@kyonRay

@kyonRay kyonRay commented Oct 14, 2026

Copy link
Copy Markdown
Member

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 SystemConfig feature_flags slot, 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.yml and c2-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

  1. feat(opstack-genesis): build-allocs.py no longer requires feature_flags on the SystemConfig predeploy (0x43…c0) and refuses a system_config that still carries it (the generator writes every system_config key 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.
  2. feat(op-e2e): setup_c2.sh / setup_op_node.sh write [engine_rpc] (no enable; same port and JWT) instead of [op_engine_rpc]; drop [op_fork_schedule], the [consensus] self-production keys, [web3] chain_id and [version] (v3 ignores them; [chain] chain_id was already numeric). Each node now gets a separate config.ini and config.genesis launched 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_api stays (op-batcher calls miner_setMaxDASize on the web3 port).

Test

  • pytest on the opstack-genesis tests (53 passed) and tools/op-e2e/tests (9 passed); bash -n on the changed scripts.
  • With the FISCO-BCOS PR-B binary: setup_op_node layout (B3, B3a, B3 restart) and C2 layout each start; Engine API returns 401 without JWT and 200 with it; block 0 hash equals [eth_genesis_header].hash; zero "this key has no effect" lines; miner_setMaxDASize on the web3 port returns true.
  • FISCO-BCOS tools/.ci/ci_opnode_startup_check.sh against this branch with op-node v1.19.2 (da197e45): PASS, op-node loads the L2 genesis over the JWT Engine API.
  • Not run locally: the full c2-e2e pipeline (op-deployer, batcher, proposer, challenger).

🤖 Generated with Claude Code

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
Copilot AI balanced review requested due to automatic review settings October 14, 2026 09:34

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@kyonRay
kyonRay merged commit 2005d30 into FISCO-BCOS:main Oct 16, 2026
2 checks passed
@kyonRay
kyonRay deleted the feat/drop-feature-flags-slot branch October 16, 2026 08:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants