Skip to content

Extract CHAIN_ID and CHAIN_METADATA into separate file#3028

Draft
citizen-stig wants to merge 6 commits into
devfrom
nikolai/constants-recompilation-improvements
Draft

Extract CHAIN_ID and CHAIN_METADATA into separate file#3028
citizen-stig wants to merge 6 commits into
devfrom
nikolai/constants-recompilation-improvements

Conversation

@citizen-stig

@citizen-stig citizen-stig commented Jul 3, 2026

Copy link
Copy Markdown
Member

Description

And stop compiling them into sov-modules-api

Baseline measured by repetitive changing of chain id and chain name in constants.toml compiling rollup starter:

## test 1, incremental, same feature set

RESULT: incremental build default features #1: 0m55s (55s)
RESULT: incremental build default features #2: 0m54s (54s)
RESULT: incremental build default features #3: 0m54s (54s)


RESULT: incremental build celestia_da #1: 0m58s (58s)
RESULT: incremental build celestia_da #2: 0m57s (57s)
RESULT: incremental build celestia_da #3: 0m57s (57s)

## test 2, incremental, alternating feature set
RESULT: alternating build default features #1: 0m55s (55s)
RESULT: alternating build celestia_da #1: 0m57s (57s)
RESULT: alternating build default features #2: 0m54s (54s)
RESULT: alternating build celestia_da #2: 0m58s (58s)
RESULT: alternating build default features #3: 0m54s (54s)
RESULT: alternating build celestia_da #3: 0m57s (57s)

And here is a single output showing all crates being recompiled:

==> incremental build celestia_da #3
   Compiling sov-modules-macros v0.3.0 (https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=878ac1de06ffe337a984fcd03c0196223b3faed6#878ac1de)
   Compiling sov-modules-api v0.3.0 (https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=878ac1de06ffe337a984fcd03c0196223b3faed6#878ac1de)
   Compiling sov-celestia-adapter v0.3.0 (https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=878ac1de06ffe337a984fcd03c0196223b3faed6#878ac1de)
   Compiling sov-bank v0.3.0 (https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=878ac1de06ffe337a984fcd03c0196223b3faed6#878ac1de)
   Compiling sov-chain-state v0.3.0 (https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=878ac1de06ffe337a984fcd03c0196223b3faed6#878ac1de)
   Compiling sov-uniqueness v0.3.0 (https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=878ac1de06ffe337a984fcd03c0196223b3faed6#878ac1de)
   Compiling sov-address v0.3.0 (https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=878ac1de06ffe337a984fcd03c0196223b3faed6#878ac1de)
   Compiling sov-rpc-eth-types v0.3.0 (https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=878ac1de06ffe337a984fcd03c0196223b3faed6#878ac1de)
   Compiling sov-operator-incentives v0.3.0 (https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=878ac1de06ffe337a984fcd03c0196223b3faed6#878ac1de)
   Compiling sov-accounts v0.3.0 (https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=878ac1de06ffe337a984fcd03c0196223b3faed6#878ac1de)
   Compiling sov-api-spec v0.3.0 (https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=878ac1de06ffe337a984fcd03c0196223b3faed6#878ac1de)
   Compiling sov-modules-stf-blueprint v0.3.0 (https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=878ac1de06ffe337a984fcd03c0196223b3faed6#878ac1de)
   Compiling sov-test-state-consistency v0.3.0 (https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=878ac1de06ffe337a984fcd03c0196223b3faed6#878ac1de)
   Compiling sov-build v0.3.0 (https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=878ac1de06ffe337a984fcd03c0196223b3faed6#878ac1de)
   Compiling sov-blob-sender v0.3.0 (https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=878ac1de06ffe337a984fcd03c0196223b3faed6#878ac1de)
   Compiling sov-ledger-apis v0.3.0 (https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=878ac1de06ffe337a984fcd03c0196223b3faed6#878ac1de)
   Compiling sov-eip712-auth v0.3.0 (https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=878ac1de06ffe337a984fcd03c0196223b3faed6#878ac1de)
   Compiling sov-sequencer-registry v0.3.0 (https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=878ac1de06ffe337a984fcd03c0196223b3faed6#878ac1de)
   Compiling sov-attester-incentives v0.3.0 (https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=878ac1de06ffe337a984fcd03c0196223b3faed6#878ac1de)
   Compiling sov-paymaster v0.3.0 (https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=878ac1de06ffe337a984fcd03c0196223b3faed6#878ac1de)
   Compiling sov-prover-incentives v0.3.0 (https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=878ac1de06ffe337a984fcd03c0196223b3faed6#878ac1de)
   Compiling sov-hyperlane-integration v0.3.0 (https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=878ac1de06ffe337a984fcd03c0196223b3faed6#878ac1de)
   Compiling value-setter v0.3.0 (/home/nikolai/workspace/rollup-starter-main/examples/value-setter)
   Compiling sov-rollup-apis v0.3.0 (https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=878ac1de06ffe337a984fcd03c0196223b3faed6#878ac1de)
   Compiling sov-blob-storage v0.3.0 (https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=878ac1de06ffe337a984fcd03c0196223b3faed6#878ac1de)
   Compiling sov-revenue-share v0.3.0 (https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=878ac1de06ffe337a984fcd03c0196223b3faed6#878ac1de)
   Compiling sov-capabilities v0.3.0 (https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=878ac1de06ffe337a984fcd03c0196223b3faed6#878ac1de)
   Compiling sov-kernels v0.3.0 (https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=878ac1de06ffe337a984fcd03c0196223b3faed6#878ac1de)
   Compiling sov-evm v0.3.0 (https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=878ac1de06ffe337a984fcd03c0196223b3faed6#878ac1de)
   Compiling sov-node-client v0.3.0 (https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=878ac1de06ffe337a984fcd03c0196223b3faed6#878ac1de)
   Compiling sov-cli v0.3.0 (https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=878ac1de06ffe337a984fcd03c0196223b3faed6#878ac1de)
   Compiling sov-sequencer v0.3.0 (https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=878ac1de06ffe337a984fcd03c0196223b3faed6#878ac1de)
   Compiling stf-starter-declaration v0.3.0 (/home/nikolai/workspace/rollup-starter-main/crates/stf/stf-declaration)
   Compiling stf-starter v0.3.0 (/home/nikolai/workspace/rollup-starter-main/crates/stf)
   Compiling sov-ethereum v0.3.0 (https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=878ac1de06ffe337a984fcd03c0196223b3faed6#878ac1de)
   Compiling sov-modules-rollup-blueprint v0.3.0 (https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=878ac1de06ffe337a984fcd03c0196223b3faed6#878ac1de)
   Compiling rollup-starter v0.3.0 (/home/nikolai/workspace/rollup-starter-main/crates/rollup)
    Finished `release` profile [optimized] target(s) in 57.29s
RESULT: incremental build celestia_da #3: 0m57s (57s)

After

RESULT: incremental build default features #1: 0m17s (17s)
RESULT: incremental build default features #2: 0m16s (16s)
RESULT: incremental build default features #3: 0m16s (16s)

RESULT: incremental build celestia_da #1: 0m14s (14s)
RESULT: incremental build celestia_da #2: 0m13s (13s)
RESULT: incremental build celestia_da #3: 0m14s (14s)

And single output now:

==> incremental build celestia_da #1
   Compiling sov-rollup-apis v0.3.0 (https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=6225bef0f806729129a0cc70c2ac6226c3c93f0d#6225bef0)
   Compiling sov-eip712-auth v0.3.0 (https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=6225bef0f806729129a0cc70c2ac6226c3c93f0d#6225bef0)
   Compiling sov-evm v0.3.0 (https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=6225bef0f806729129a0cc70c2ac6226c3c93f0d#6225bef0)
   Compiling sov-modules-rollup-blueprint v0.3.0 (https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=6225bef0f806729129a0cc70c2ac6226c3c93f0d#6225bef0)
   Compiling stf-starter-declaration v0.3.0 (/home/nikolai/workspace/rollup-starter/crates/stf/stf-declaration)
   Compiling stf-starter v0.3.0 (/home/nikolai/workspace/rollup-starter/crates/stf)
   Compiling sov-ethereum v0.3.0 (https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=6225bef0f806729129a0cc70c2ac6226c3c93f0d#6225bef0)
   Compiling rollup-starter v0.3.0 (/home/nikolai/workspace/rollup-starter/crates/rollup)
    Finished `release` profile [optimized] target(s) in 13.38s
  • I have updated CHANGELOG.md with a new entry if my PR makes any breaking changes or fixes a bug. If my PR removes a feature or changes its behavior, I provide help for users on how to migrate to the new behavior.
  • I have carefully reviewed all my Cargo.toml changes before opening the PRs. (Are all new dependencies necessary? Is any module dependency leaked into the full-node (hint: it shouldn't)?)

Testing

New tests have been added

Docs

No updates

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.

1 participant