Skip to content

Add Deneb state#12375

Merged
terencechain merged 3 commits intodeneb-integrationfrom
deneb-state
May 9, 2023
Merged

Add Deneb state#12375
terencechain merged 3 commits intodeneb-integrationfrom
deneb-state

Conversation

@terencechain
Copy link
Collaborator

This PR adds deneb beacon state native type. It also uses native type hash tree root for spec test

@terencechain terencechain requested a review from a team as a code owner May 9, 2023 02:32
@terencechain terencechain self-assigned this May 9, 2023
@terencechain terencechain requested review from james-prysm, nisdas and rkapka and removed request for a team May 9, 2023 02:32
Copy link
Contributor

Choose a reason for hiding this comment

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

the error here should be StateDeneb I think

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// ProtobufBeaconStateDeneb transforms an input into beacon state Capella in the form of protobuf.
// ProtobufBeaconStateDeneb transforms an input into beacon state Deneb in the form of protobuf.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Comment on lines 275 to 290
// Next withdrawal index root.
nextWithdrawalIndexRoot := make([]byte, 32)
binary.LittleEndian.PutUint64(nextWithdrawalIndexRoot, state.nextWithdrawalIndex)
fieldRoots[types.NextWithdrawalIndex.RealPosition()] = nextWithdrawalIndexRoot

// Next partial withdrawal validator index root.
nextWithdrawalValidatorIndexRoot := make([]byte, 32)
binary.LittleEndian.PutUint64(nextWithdrawalValidatorIndexRoot, uint64(state.nextWithdrawalValidatorIndex))
fieldRoots[types.NextWithdrawalValidatorIndex.RealPosition()] = nextWithdrawalValidatorIndexRoot

// Historical summary root.
historicalSummaryRoot, err := stateutil.HistoricalSummariesRoot(state.historicalSummaries)
if err != nil {
return nil, errors.Wrap(err, "could not compute historical summary merkleization")
}
fieldRoots[types.HistoricalSummaries.RealPosition()] = historicalSummaryRoot[:]
Copy link
Contributor

Choose a reason for hiding this comment

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

this is duplicated

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
assert.Equal(t, true, ok, "inner state is a not a beacon state bellatrix proto")
assert.Equal(t, true, ok, "inner state is a not a beacon state deneb proto")

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Comment on lines 98 to 99
Copy link
Contributor

Choose a reason for hiding this comment

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

can you reorder the two?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@terencechain terencechain merged commit 45809a8 into deneb-integration May 9, 2023
@terencechain terencechain deleted the deneb-state branch May 9, 2023 21:38
terencechain added a commit that referenced this pull request May 11, 2023
terencechain added a commit that referenced this pull request May 11, 2023
terencechain added a commit that referenced this pull request May 16, 2023
terencechain added a commit that referenced this pull request May 17, 2023
terencechain added a commit that referenced this pull request May 18, 2023
kasey pushed a commit that referenced this pull request May 19, 2023
kasey pushed a commit that referenced this pull request May 22, 2023
terencechain added a commit that referenced this pull request May 23, 2023
terencechain added a commit that referenced this pull request May 26, 2023
terencechain added a commit that referenced this pull request May 31, 2023
terencechain added a commit that referenced this pull request Jun 7, 2023
terencechain added a commit that referenced this pull request Jun 12, 2023
terencechain added a commit that referenced this pull request Jun 12, 2023
terencechain added a commit that referenced this pull request Jun 16, 2023
terencechain added a commit that referenced this pull request Jun 27, 2023
terencechain added a commit that referenced this pull request Jul 7, 2023
terencechain added a commit that referenced this pull request Jul 9, 2023
terencechain added a commit that referenced this pull request Jul 10, 2023
kasey pushed a commit that referenced this pull request Jul 20, 2023
james-prysm pushed a commit that referenced this pull request Aug 4, 2023
terencechain added a commit that referenced this pull request Aug 16, 2023
kasey pushed a commit that referenced this pull request Aug 21, 2023
kasey pushed a commit that referenced this pull request Aug 22, 2023
kasey pushed a commit that referenced this pull request Aug 22, 2023
kasey pushed a commit that referenced this pull request Aug 22, 2023
kasey pushed a commit that referenced this pull request Aug 23, 2023
kasey pushed a commit that referenced this pull request Aug 23, 2023
kasey pushed a commit that referenced this pull request Aug 23, 2023
kasey pushed a commit that referenced this pull request Aug 24, 2023
kasey pushed a commit that referenced this pull request Aug 24, 2023
prestonvanloon pushed a commit that referenced this pull request Aug 24, 2023
prestonvanloon pushed a commit that referenced this pull request Aug 24, 2023
prestonvanloon pushed a commit that referenced this pull request Aug 30, 2023
prestonvanloon pushed a commit that referenced this pull request Aug 31, 2023
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.

3 participants

Comments