Skip to content

chore(storage): improve storage cache metrics#79

Merged
nekomoto911 merged 1 commit intoGalxe:mainfrom
nekomoto911:perf_cache
Apr 16, 2025
Merged

chore(storage): improve storage cache metrics#79
nekomoto911 merged 1 commit intoGalxe:mainfrom
nekomoto911:perf_cache

Conversation

@nekomoto911
Copy link
Copy Markdown
Collaborator

No description provided.

@nekomoto911 nekomoto911 merged commit 7f5090d into Galxe:main Apr 16, 2025
9 of 43 checks passed
@nekomoto911 nekomoto911 deleted the perf_cache branch April 16, 2025 03:20
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.

1 participant