Repository navigation
Conversation
|
The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## claude/giga-staking-docs-simplify #4727 +/- ##
=====================================================================
+ Coverage 61.40% 61.43% +0.02%
=====================================================================
Files 2066 2067 +1
Lines 160953 160999 +46
=====================================================================
+ Hits 98841 98903 +62
+ Misses 62107 62091 -16
Partials 5 5
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
PR SummaryMedium Risk Overview The new Layout and harness testdata are updated so Go slot layout and compiler-written values stay pinned; gov’s “change every param” test is limited to gov keys only. Reviewed by Cursor Bugbot for commit 3bf68ef. Bugbot is set up for automated code reviews on this repo. Configure here. |
There was a problem hiding this comment.
Adds a staking subspace at slot 16 of the giga params precompile's storage, with typed read, write and validate functions, new uint32 and Int kinds, and regenerated layout and harness testdata. The layout, packing offsets, bit-width checks in decode and validate, and the whole-struct check that stops a gov change before genesis writes staking all hold, so nothing blocks; codex reported nothing, which matches this review, and codex added no findings of its own.
Non-blocking
1 finding on the changed lines, as inline comments.
1 nit, not posted on the code
giga/evmonly/precompiles/params/testdata/ParamsStorageHarness.bin-runtime:1— The CBOR metadata in the regenerated bytecode records solc 0.8.28 (0x00081c). The harness andParamsStorage.solboth pinpragma solidity 0.8.30, so the 0.8.28 compiler would reject them. Following the rebuild steps in the test comment will not reproduce this artifact as committed.
seidroid review · decision approve · session b5841916f62e4b9e9f9b84dfde426be7 · turn resp_claude_d4d8ca6120fbe286e02065f402250020 · item 4a01abd2899b5fa3bdf439cc1ad56053
Findings: 0 blocking | 1 non-blocking | 1 posted inline
Draft storage layouts for the EVM-only staking, distribution and slashing precompiles, and the rationale behind them, taken from ffd15bb, which is not merged on its own. - staking-design-rationale.md: the proposal, built from three principles (Solidity slot layout, V2 structures for migration, rewards undesigned) - StakingStorage, DistributionStorage, SlashingStorage: draft layouts - Sets.sol: dependency-free AddressSet/UintSet with EnumerableSet's layout
… reads - Drop the consensus address: validators are keyed by operator in staking, distribution and slashing. 0x22 is keyed by the ed25519 key, for the duplicate-key check and key lookups; slashing's 0x03 relation is dropped. - Drop the enumeration sets read only by queries (0x37, unbonding and redelegations by delegator) or by entry slashing (0x33, 0x35). - Keep redelegation entries in the redelegation queue, with a per-triple count for maxEntries. - Store the bonded set as one ValidatorPower array instead of a mapping and a set. - Update the rationale doc to match, including which queue entries the FIFO clamp delays. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A mapping value grows at its end and needs no reserved slots. A struct inside another, a top-level struct with variables after it, and an array element cannot grow at their end; say what each can do instead, and add an open question on validatorSlashEvents, the one array of structs kept for good. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Validator is a mapping value, so it grows at its end and needs no __gap. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…alues and sets in the growth rule Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Only queries walk signing infos, so the slashing layout keeps no enumeration of them, as the rule for enumerations says. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Add a Staking struct to ParamsStorage at slot 16: unbondingTime, maxValidators, maxEntries, maxVotingPowerRatio and maxVotingPowerEnforcementThreshold. - ReadStaking, HasStaking and WriteStaking, which writes them once at genesis; later changes go through gov. - Bound them so a change cannot wedge staking: unbonding time within the period bounds, 1..100 bonded validators (an autobahn committee's limit), at least one entry, and a ratio in (0, 1]. - Regenerate the harness and layout testdata, and keep the gov param-change test to gov's own keys. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
5a5dda3 to
edf0390
Compare
90fa425 to
717798f
Compare
The harness and ParamsStorage declare pragma solidity 0.8.30, and the committed binary came from 0.8.28. Rebuild it with 0.8.30 and name the command that reproduces it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
717798f to
01eba02
Compare
…king-params-subspace Main now gives every param a Kind, which seid's param-change and query commands parse and format by. Staking's integer params get KindInt: the CLI reads a whole number and writes it back as V2 does, a uint32 as a JSON number and an sdk.Int as a string. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…king-params-subspace
Summary
Adds staking's params to the giga params precompile's storage, for the staking precompile to read.
Stakingstruct inParamsStorageat slot 16:unbondingTime,maxValidators,maxEntries,maxVotingPowerRatioandmaxVotingPowerEnforcementThreshold.ReadStaking,HasStakingandWriteStaking. They are written once at genesis; later changes go through gov.Test plan
go test -race ./giga/evmonly/precompiles/...Stack
Replaces #4713. Each PR's base is the one above it; review and merge from the top.
🤖 Generated with Claude Code