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

Revert checkpoint & Regen ssz files #1

Merged
merged 1 commit into from
Aug 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/attestantio/go-eth2-client
go 1.20

require (
github.com/ferranbt/fastssz v0.1.3
github.com/ferranbt/fastssz v0.1.4
github.com/goccy/go-yaml v1.9.2
github.com/golang/snappy v0.0.4
github.com/holiman/uint256 v1.2.4
Expand All @@ -26,6 +26,7 @@ require (
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/emicklei/dot v1.6.2 // indirect
github.com/fatih/color v1.16.0 // indirect
github.com/go-logr/logr v1.2.4 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
Expand Down
8 changes: 5 additions & 3 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@ github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ3
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/emicklei/dot v1.6.2 h1:08GN+DD79cy/tzN6uLCT84+2Wk9u+wvqP+Hkx/dIR8A=
github.com/emicklei/dot v1.6.2/go.mod h1:DeV7GvQtIw4h2u73RKBkkFdvVAz0D9fzeJrgPW6gy/s=
github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM=
github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM=
github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE=
github.com/ferranbt/fastssz v0.1.3 h1:ZI+z3JH05h4kgmFXdHuR1aWYsgrg7o+Fw7/NCzM16Mo=
github.com/ferranbt/fastssz v0.1.3/go.mod h1:0Y9TEd/9XuFlh7mskMPfXiI2Dkw4Ddg9EyXt1W7MRvE=
github.com/ferranbt/fastssz v0.1.4 h1:OCDB+dYDEQDvAgtAGnTSidK1Pe2tW3nFV40XyMkTeDY=
github.com/ferranbt/fastssz v0.1.4/go.mod h1:Ea3+oeoRGGLGm5shYAeDgu6PGUlcvQhE2fILyD9+tGg=
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ=
github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
Expand Down Expand Up @@ -81,6 +83,7 @@ github.com/prometheus/procfs v0.10.1 h1:kYK1Va/YMlutzCGazswoHKo//tZVlFpKYh+Pymzi
github.com/prometheus/procfs v0.10.1/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM=
github.com/prysmaticlabs/go-bitfield v0.0.0-20240328144219-a1caa50c3a1e h1:ATgOe+abbzfx9kCPeXIW4fiWyDdxlwHw07j8UGhdTd4=
github.com/prysmaticlabs/go-bitfield v0.0.0-20240328144219-a1caa50c3a1e/go.mod h1:wmuf/mdK4VMD+jA9ThwcUKjg3a2XWM9cVfFYjDyY4j4=
github.com/prysmaticlabs/gohashtree v0.0.4-beta h1:H/EbCuXPeTV3lpKeXGPpEV9gsUpkqOOVnWapUyeWro4=
github.com/r3labs/sse/v2 v2.10.0 h1:hFEkLLFY4LDifoHdiCN/LlGBAdVJYsANaLqNYa1l/v0=
github.com/r3labs/sse/v2 v2.10.0/go.mod h1:Igau6Whc+F17QUgML1fYe1VPZzTV6EMCnYktEmkNJ7I=
github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M=
Expand All @@ -93,7 +96,6 @@ github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81P
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/umbracle/gohashtree v0.0.2-alpha.0.20230207094856-5b775a815c10 h1:CQh33pStIp/E30b7TxDlXfM0145bn2e8boI30IxAhTg=
go.opentelemetry.io/otel v1.16.0 h1:Z7GVAX/UkAXPKsy94IU+i6thsQS4nb7LviLpnaNeW8s=
go.opentelemetry.io/otel v1.16.0/go.mod h1:vl0h9NUa1D5s1nv3A5vZOYWn8av4K8Ml6JDeHrT/bx4=
go.opentelemetry.io/otel/metric v1.16.0 h1:RbrpwVG1Hfv85LgnZ7+txXioPDoh6EdbZHo26Q3hqOo=
Expand Down
2 changes: 1 addition & 1 deletion spec/altair/bailout_ssz.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions spec/altair/beaconblock_ssz.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions spec/altair/beaconblockbody_ssz.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions spec/altair/beaconstate_ssz.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion spec/altair/contributionandproof_ssz.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions spec/altair/signedbeaconblock_ssz.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion spec/altair/signedcontributionandproof_ssz.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion spec/altair/syncaggregate_ssz.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion spec/altair/syncaggregatorselectiondata_ssz.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion spec/altair/synccommittee_ssz.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion spec/altair/synccommitteecontribution_ssz.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion spec/altair/synccommitteemessage_ssz.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions spec/bellatrix/beaconblock_ssz.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions spec/bellatrix/beaconblockbody_ssz.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions spec/bellatrix/beaconstate_ssz.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 0 additions & 14 deletions spec/bellatrix/executionpayload.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ type ExecutionPayload struct {
ParentHash phase0.Hash32 `ssz-size:"32"`
FeeRecipient ExecutionAddress `ssz-size:"20"`
StateRoot [32]byte `ssz-size:"32"`
CheckpointRoot [32]byte `ssz-size:"32"`
ReceiptsRoot [32]byte `ssz-size:"32"`
LogsBloom [256]byte `ssz-size:"256"`
PrevRandao [32]byte `ssz-size:"32"`
Expand All @@ -51,7 +50,6 @@ type executionPayloadJSON struct {
ParentHash string `json:"parent_hash"`
FeeRecipient string `json:"fee_recipient"`
StateRoot string `json:"state_root"`
CheckpointRoot string `json:"checkpoint_root"`
ReceiptsRoot string `json:"receipts_root"`
LogsBloom string `json:"logs_bloom"`
PrevRandao string `json:"prev_randao"`
Expand All @@ -70,7 +68,6 @@ type executionPayloadYAML struct {
ParentHash string `yaml:"parent_hash"`
FeeRecipient string `yaml:"fee_recipient"`
StateRoot string `yaml:"state_root"`
CheckpointRoot string `yaml:"checkpoint_root"`
ReceiptsRoot string `yaml:"receipts_root"`
LogsBloom string `yaml:"logs_bloom"`
PrevRandao string `yaml:"prev_randao"`
Expand Down Expand Up @@ -108,7 +105,6 @@ func (e *ExecutionPayload) MarshalJSON() ([]byte, error) {
ParentHash: fmt.Sprintf("%#x", e.ParentHash),
FeeRecipient: e.FeeRecipient.String(),
StateRoot: fmt.Sprintf("%#x", e.StateRoot),
CheckpointRoot: fmt.Sprintf("%#x", e.CheckpointRoot),
ReceiptsRoot: fmt.Sprintf("%#x", e.ReceiptsRoot),
LogsBloom: fmt.Sprintf("%#x", e.LogsBloom),
PrevRandao: fmt.Sprintf("%#x", e.PrevRandao),
Expand Down Expand Up @@ -171,15 +167,6 @@ func (e *ExecutionPayload) unpack(data *executionPayloadJSON) error {
}
copy(e.StateRoot[:], stateRoot)

if data.CheckpointRoot == "" {
return errors.New("checkpoint root missing")
}
checkpointRoot, err := hex.DecodeString(strings.TrimPrefix(data.CheckpointRoot, "0x"))
if err != nil {
return errors.Wrap(err, "invalid value for checkpoint root")
}
copy(e.CheckpointRoot[:], checkpointRoot)

if data.ReceiptsRoot == "" {
return errors.New("receipts root missing")
}
Expand Down Expand Up @@ -366,7 +353,6 @@ func (e *ExecutionPayload) MarshalYAML() ([]byte, error) {
ParentHash: fmt.Sprintf("%#x", e.ParentHash),
FeeRecipient: e.FeeRecipient.String(),
StateRoot: fmt.Sprintf("%#x", e.StateRoot),
CheckpointRoot: fmt.Sprintf("%#x", e.CheckpointRoot),
ReceiptsRoot: fmt.Sprintf("%#x", e.ReceiptsRoot),
LogsBloom: fmt.Sprintf("%#x", e.LogsBloom),
PrevRandao: fmt.Sprintf("%#x", e.PrevRandao),
Expand Down
Loading
Loading