-
Notifications
You must be signed in to change notification settings - Fork 0
[wip] feat: main stf #30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
spiral-ladder
merged 91 commits into
te/naive_state_transition
from
bing/state-transition-fn
Sep 8, 2025
Merged
[wip] feat: main stf #30
spiral-ladder
merged 91 commits into
te/naive_state_transition
from
bing/state-transition-fn
Sep 8, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bf76cb8
to
73e0263
Compare
* fix: wrong type for `ExecutionPayloadHeader` methods * add usage to confirm
Adds support for `BlindedBeaconBlock` and `BlindedBeaconBlockBody` with a sanity test.
feat(types): add support for blinded block variants
73e0263
to
24bf479
Compare
24bf479
to
951ac04
Compare
a869a2a
to
9657926
Compare
This was referenced Aug 5, 2025
For 2 reasons: 1. we're about to reuse the same `ArrayList` again, so there's no reason to `deinit` 2. we can assume (at the very least) the capacity of the 2 arraylists are the same because `resize` was called in `beforeProcessEpoch`.
3f718af
to
08c1029
Compare
…hing penalty quotient
twoeths
approved these changes
Sep 6, 2025
Performance Report✔️ no performance regression detected Full benchmark results
|
76c85f5
to
38109bf
Compare
`test_utils` rely on `state_transition`, so importing both of them in unit tests result in a circular dependency. It makes more sense to put `test_utils` in `state_transition` and reuse it that way.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains major changes that overhaul how base branch implements state transition, which mainly is a direct lift of the TS version.
Proposed changes in this PR
No getters/setters in types
Most of what getters/setters accomplish can be accomplished similar with a pointer to the type, eg.
*Type
. In this PR, I propose having 'getter's of 2 variants. As an example:We use
slot()
for immutable access tostate.slot
, andslotPtr()
if we want to change its value. I think realistically, using only 1 function that returns a pointer to the variable (in this case, only supportingslotPtr()
) should have negligible overhead, but isn't aesthetic to deref every time we need to access the value. Having a separate*Ptr()
function also implies that the value is subject to change.Simplifying types
In the base branch, we have a separate
types.zig
that imports some ssz types such asssz.primitive.Root
,ssz.primitive.Epoch
and so on, and reexports them. I think this is unnecessary. We can import them directly from theconsensus_types
module.Breaking up
utils
I'm personally not a fan of naming things
utils
because they usually could 100% be better named, eg. if the functions in the utils have to do with block processing, just call itblock_processing.zig
or at the very leastblock_utils.zig
. Otherwise, they just end up as a dumping ground for functions that should belong in other files that we don't know how to name, and we end up with a file/directory with a random assortment of things. Another advantage of not naming thingsutils
is that at first glance we know what code lives in a file by its filename.