Skip to content
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

Capella -> to Deneb update #18

Closed
wants to merge 48 commits into from
Closed

Capella -> to Deneb update #18

wants to merge 48 commits into from

Conversation

Sidu28
Copy link
Contributor

@Sidu28 Sidu28 commented Jan 19, 2024

Upgrading proof gen from capella spec to deneb spec, with support for both capella and deneb spec proofs.

DO NOT MERGE

@Sidu28 Sidu28 changed the base branch from master to partial_withdrawal_related_changes January 19, 2024 00:47
Copy link
Contributor

@gpsanant gpsanant left a comment

Choose a reason for hiding this comment

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

lgtm

@Sidu28 Sidu28 requested a review from gpsanant January 19, 2024 23:42
@Sidu28 Sidu28 requested a review from bowenli86 January 23, 2024 02:25
beacon_constants.go Outdated Show resolved Hide resolved
@@ -15,7 +15,7 @@ type VerifyWithdrawalCredentialsCallParams struct {
ValidatorFields [][]Bytes32 `json:"validatorFields"`
}

func (epp *EigenPodProofs) ProveValidatorWithdrawalCredentials(oracleBlockHeader *phase0.BeaconBlockHeader, oracleBeaconState *capella.BeaconState, validatorIndices []uint64) (*VerifyWithdrawalCredentialsCallParams, error) {
func (epp *EigenPodProofs) ProveValidatorWithdrawalCredentials(oracleBlockHeader *phase0.BeaconBlockHeader, oracleBeaconState *deneb.BeaconState, validatorIndices []uint64) (*VerifyWithdrawalCredentialsCallParams, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

No i mean everywhere. If its for deneb, name it deneb. if it's for fork1 name it fork1

Copy link
Contributor

Choose a reason for hiding this comment

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

The other way (easier) is that you name them the same thing and just change argument types. let's not go halfway though

Copy link
Contributor Author

@Sidu28 Sidu28 Jan 23, 2024

Choose a reason for hiding this comment

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

hmm not sure about that, its a bit much. it makes more sense to me to have separate functions for where it matters. I don't mind having the same name and different types tho, although it might make it a little less explicit - tho I don't think go lang lets you delcare similarly named functions in the same package

@@ -39,7 +40,7 @@ func NewEigenPodProofs(chainID uint64, oracleStateCacheExpirySeconds int) (*Eige
}, nil
}

func (epp *EigenPodProofs) ComputeBeaconStateRoot(beaconState *capella.BeaconState) (phase0.Root, error) {
func (epp *EigenPodProofs) ComputeBeaconStateRoot(beaconState *deneb.BeaconState) (phase0.Root, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

can we just define new functions on *deneb.BeaconState? like

func (s *deneb.BeaconState) ComputeBeaconStateRoot() (phase0.Root, error) {

not sure if go allows it because its from another module

@@ -0,0 +1,162 @@
{
Copy link
Contributor

Choose a reason for hiding this comment

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

pls move these out of the top level folder

@Sidu28 Sidu28 changed the base branch from partial_withdrawal_related_changes to master January 25, 2024 22:55
@Sidu28 Sidu28 marked this pull request as draft January 29, 2024 22:23
@Sidu28 Sidu28 closed this Jan 31, 2024
@Sidu28 Sidu28 deleted the deneb branch January 31, 2024 23:54
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