Skip to content

feat(pipe): Support parallel state root in pipe execution#82

Merged
nekomoto911 merged 8 commits intoGalxe:mainfrom
Lchangliang:dev-0414-parral
Apr 27, 2025
Merged

feat(pipe): Support parallel state root in pipe execution#82
nekomoto911 merged 8 commits intoGalxe:mainfrom
Lchangliang:dev-0414-parral

Conversation

@Lchangliang
Copy link
Copy Markdown
Collaborator

No description provided.

@Lchangliang Lchangliang force-pushed the dev-0414-parral branch 2 times, most recently from 2cee6cf to 2532858 Compare April 23, 2025 02:57
@nekomoto911 nekomoto911 changed the title [improve] Support parallel_state_root feat(pipe): Support parallel_state_root Apr 27, 2025
Comment thread crates/gravity-storage/src/block_view_storage/mod.rs
@nekomoto911 nekomoto911 changed the title feat(pipe): Support parallel_state_root feat(pipe): Support parallel state root in pipe execution Apr 27, 2025
impl<Client: StateProviderFactory + 'static> GravityStorage for BlockViewStorage<Client> {
// Extract common function to get historical states
fn get_historical_states(
storage: &MutexGuard<'_, BlockViewStorageInner>,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

MutexGuard is redundant

@nekomoto911 nekomoto911 merged commit a6e246f into Galxe:main Apr 27, 2025
8 of 43 checks passed
ByteYue added a commit that referenced this pull request Apr 23, 2026
…torage patches

Zeta ships the v1.4 → v1.5 contract changes and the matching storage-side
bootstrapping that the new Solidity code requires.

Bytecode upgrades (ZETA_SYSTEM_UPGRADES + ZETA_EXTRA_UPGRADES):
  - Governance           (PR #83): initialize(address) + _initialized slot
  - StakingConfig        (PR #85): per-field setMinimumStakeForNextEpoch /
                                    setLockupDurationForNextEpoch /
                                    setUnbondingDelayForNextEpoch setters
  - ValidatorManagement  (PR #85): per-pool whitelist + permissionless-join flag
  - Reconfiguration      (PR #82): applyPendingConfig before DKG snapshot
  - JWKManager           (PR #79): non-empty JWK field validation on setPatches
  - StakePool            (PR #73): 2-step timelock for staker/operator/voter
                                    role changes (Gamma template is re-used;
                                    StakePool has no new immutables so the
                                    per-pool immutable patch still applies)

Storage patches (ZETA_STORAGE_PATCHES):
  - Governance slot 0 (_owner)        ← configured admin address
  - Governance slot 8 (_initialized)  ← 1 (locks out future initialize() calls)
  - ValidatorManagement._allowedPools[pool] = true for every active pool.
    _allowedPools lives at slot 7; the real per-pool slot is
    keccak256(pool_padded || slot7_padded). Those four keccak outputs are
    precomputed offline (no_std keccak can't run in const context) and
    committed as B256 literals with a regeneration hint in-source.

_permissionlessJoinEnabled (slot 8, one byte) stays at 0 intentionally —
the network launches permissioned and governance flips it later.

Wiring:
  - crates/chainspec/src/gravity.rs       : add Zeta to GravityHardfork enum
  - crates/chainspec/src/spec.rs          : parse zetaBlock from extra_fields
  - crates/ethereum/evm/src/hardfork/mod.rs : pub mod zeta
  - crates/ethereum/evm/src/parallel_execute.rs : dispatch at Zeta block

Validated with `cargo check --release` on the full workspace.
ByteYue added a commit that referenced this pull request Apr 26, 2026
…torage patches

Zeta ships the v1.4 → v1.5 contract changes and the matching storage-side
bootstrapping that the new Solidity code requires.

Bytecode upgrades (ZETA_SYSTEM_UPGRADES + ZETA_EXTRA_UPGRADES):
  - Governance           (PR #83): initialize(address) + _initialized slot
  - StakingConfig        (PR #85): per-field setMinimumStakeForNextEpoch /
                                    setLockupDurationForNextEpoch /
                                    setUnbondingDelayForNextEpoch setters
  - ValidatorManagement  (PR #85): per-pool whitelist + permissionless-join flag
  - Reconfiguration      (PR #82): applyPendingConfig before DKG snapshot
  - JWKManager           (PR #79): non-empty JWK field validation on setPatches
  - StakePool            (PR #73): 2-step timelock for staker/operator/voter
                                    role changes (Gamma template is re-used;
                                    StakePool has no new immutables so the
                                    per-pool immutable patch still applies)

Storage patches (ZETA_STORAGE_PATCHES):
  - Governance slot 0 (_owner)        ← configured admin address
  - Governance slot 8 (_initialized)  ← 1 (locks out future initialize() calls)
  - ValidatorManagement._allowedPools[pool] = true for every active pool.
    _allowedPools lives at slot 7; the real per-pool slot is
    keccak256(pool_padded || slot7_padded). Those four keccak outputs are
    precomputed offline (no_std keccak can't run in const context) and
    committed as B256 literals with a regeneration hint in-source.

_permissionlessJoinEnabled (slot 8, one byte) stays at 0 intentionally —
the network launches permissioned and governance flips it later.

Base fee floor activation (#337's schedule):
  - gravity_min_base_fee_activation_block is read from the same zetaBlock
    field used for the bytecode/storage dispatch above. So the consensus-
    level 50 Gwei floor (gravity_min_base_fee_at_block) and the contract
    upgrades transition at the exact same height — one ops knob, one
    rolling-upgrade window, one logical event.
  - Defaults to u64::MAX when zetaBlock is absent, e.g. a v1.5 binary
    pointed at a v1.4 chain config that predates Zeta. This disables the
    floor schedule and falls through to upstream EIP-1559, preserving
    v1.4 base fee semantics for re-syncing historical blocks. Defaulting
    to 0 there would silently enforce the 50 Gwei floor on historical v1.4
    blocks (whose base_fee may be < 50 Gwei) and break re-sync.

Wiring:
  - crates/chainspec/src/gravity.rs       : add Zeta to GravityHardfork enum
  - crates/chainspec/src/spec.rs          : parse zetaBlock from extra_fields,
                                            and use the same value as the
                                            gravity_min_base_fee schedule
                                            activation block
  - crates/ethereum/evm/src/hardfork/mod.rs : pub mod zeta
  - crates/ethereum/evm/src/parallel_execute.rs : dispatch at Zeta block

Validated with cargo check --release on the full workspace and
cargo test on reth-chainspec / reth-pipe-exec-layer-ext-v2 gravity_hardfork_test.
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