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

Protobufs for Electra devnet-0 #13905

Merged
merged 12 commits into from
Apr 24, 2024
Merged

Conversation

terencechain
Copy link
Member

@terencechain terencechain commented Apr 22, 2024

To run spec test:

Mainnet: bazel test //testing/spectest/mainnet/electra/ssz_static:go_default_test
Minimal: bazel test //testing/spectest/mainnet/electra/ssz_static:go_default_test

Spec test result:

container mainnet minimal note
DepositReceipt EIP6110
PendingBalanceDeposit EIP7251
PendingPartialWithdrawal EIP7251
ExecutionLayerWithdrawalRequest EIP7251, EIP7002
Consolidation EIP7251
SignedConsolidation EIP7251
PendingConsolidation EIP7251
AttesterSlashing EIP7549
IndexedAttestation EIP7549
Attestation EIP7549
BeaconBlockBody EIP7549, EIP7002, EIP6110, EIP7251
ExecutionPayload EIP7002, EIP6110, EIP7251
ExecutionPayloadHeader EIP7002, EIP6110, EIP7251
BeaconState No hash tree root EIP7002, EIP6110, EIP7251
AggregateAttestationAndProof EIP7549
SignedAggregateAttestationAndProof EIP7549

@terencechain terencechain force-pushed the electra-devnet-0-protobuf branch 2 times, most recently from e1cf4ea to b18f937 Compare April 22, 2024 21:00
@james-prysm james-prysm force-pushed the electra-devnet-0-protobuf branch 2 times, most recently from 020927b to 54caecc Compare April 23, 2024 04:38
@terencechain terencechain marked this pull request as ready for review April 23, 2024 13:40
@terencechain terencechain force-pushed the electra-devnet-0-protobuf branch 2 times, most recently from 5d49735 to d7d4524 Compare April 23, 2024 14:27
james-prysm
james-prysm previously approved these changes Apr 24, 2024
@james-prysm james-prysm dismissed their stale review April 24, 2024 21:01

preston has feedback

Comment on lines 297 to 301
bytes pubkey = 1 [(ethereum.eth.ext.ssz_size) = "48", (ethereum.eth.ext.spec_name) = "pubkey"];
bytes withdrawal_credentials = 2 [(ethereum.eth.ext.ssz_size) = "32"];
uint64 amount = 3;
bytes signature = 4 [(ethereum.eth.ext.ssz_size) = "96", (ethereum.eth.ext.spec_name) = "signature"];
uint64 index = 5;
Copy link
Member

Choose a reason for hiding this comment

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

Do you need spec_name when the name is identical?

Suggested change
bytes pubkey = 1 [(ethereum.eth.ext.ssz_size) = "48", (ethereum.eth.ext.spec_name) = "pubkey"];
bytes withdrawal_credentials = 2 [(ethereum.eth.ext.ssz_size) = "32"];
uint64 amount = 3;
bytes signature = 4 [(ethereum.eth.ext.ssz_size) = "96", (ethereum.eth.ext.spec_name) = "signature"];
uint64 index = 5;
bytes pubkey = 1 [(ethereum.eth.ext.ssz_size) = "48"];
bytes withdrawal_credentials = 2 [(ethereum.eth.ext.ssz_size) = "32"];
uint64 amount = 3;
bytes signature = 4 [(ethereum.eth.ext.ssz_size) = "96"];
uint64 index = 5;

uint64 withdrawable_epoch = 3;
}

// ExecutionLayerWithdrawalRequest is in proto/engine/execution_engine.proto
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
// ExecutionLayerWithdrawalRequest is in proto/engine/execution_engine.proto

// The amount of the withdrawal (gwei).
uint64 amount = 2;

// TODO: document this field
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
// TODO: document this field
// A partial withdrawal is valid at this epoch or later.

Comment on lines 53 to 54
// TODO: document this field.
// TODO: Is this the target epoch? Minimum epoch? Why does it exist?
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
// TODO: document this field.
// TODO: Is this the target epoch? Minimum epoch? Why does it exist?
// A consolidation is valid at this epoch or later.

bytes source_address = 1 [(ethereum.eth.ext.ssz_size) = "20"];

// 48 byte BLS public key of the validator.
bytes validator_pubkey = 2 [(ethereum.eth.ext.ssz_size) = "48", (ethereum.eth.ext.spec_name) = "pubkey"];
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
bytes validator_pubkey = 2 [(ethereum.eth.ext.ssz_size) = "48", (ethereum.eth.ext.spec_name) = "pubkey"];
bytes validator_pubkey = 2 [(ethereum.eth.ext.ssz_size) = "48"];

This is wrong? Spec has the name as validator_pubkey.

class ExecutionLayerWithdrawalRequest(Container):
    source_address: ExecutionAddress
    validator_pubkey: BLSPubkey
    amount: Gwei

@prestonvanloon prestonvanloon added this pull request to the merge queue Apr 24, 2024
Merged via the queue into develop with commit a9862f3 Apr 24, 2024
16 of 17 checks passed
@prestonvanloon prestonvanloon deleted the electra-devnet-0-protobuf branch April 24, 2024 21:44
prestonvanloon pushed a commit that referenced this pull request Apr 25, 2024
* block protos

* proto and ssz

* stubs

* Enable Electra spec test

* Pull in EIP-7251 protobuf changes

From: #13903

* All EIP7549 containers are passing

* All EIP7251 containers passing

* including changes from eip7002

* Everything passing except for beacon state hash tree root

* fixing eletra state to use electra payload

* Fix minimal test. Skip beacon state test

* Perston's feedback

---------

Co-authored-by: rkapka <[email protected]>
Co-authored-by: james-prysm <[email protected]>
rkapka added a commit that referenced this pull request Apr 30, 2024
* GET

* POST

* Revert "Auxiliary commit to revert individual files from 615feb1"

This reverts commit 55cf071c684019f3d6124179154c10b2277fda49.

* comment fix

* deepsource

config values

block protos

get_committee_indices

proto and ssz

attestation interface

Revert "Auxiliary commit to revert individual files from deadb21"

This reverts commit 32ad5009537bc5ec0e6caf9f52143d380d00be85.

todos

get_attesting_indices

Revert "Auxiliary commit to revert individual files from dd27897"

This reverts commit f39644ed3cb6f3964fc6c86fdf4bd5de2a9668c8.

beacon spec changes

Fix pending attestation. Build ok

Don't return error that can be internally handled (#13887)

Co-authored-by: Kasey Kirkham <[email protected]>

consistent auth token for validator apis (#13747)

* wip

* fixing tests

* adding more tests especially to handle legacy

* fixing linting

* fixing deepsource issues and flags

* fixing some deepsource issues,pathing issues, and logs

* some review items

* adding additional review feedback

* updating to follow updates from ethereum/keymanager-APIs#74

* adjusting functions to match changes in keymanagers PR

* Update validator/rpc/auth_token.go

Co-authored-by: Radosław Kapka <[email protected]>

* Update validator/rpc/auth_token.go

Co-authored-by: Radosław Kapka <[email protected]>

* Update validator/rpc/auth_token.go

Co-authored-by: Radosław Kapka <[email protected]>

* review feedback

---------

Co-authored-by: Radosław Kapka <[email protected]>

Use correct port for health check in Beacon API e2e evaluator (#13892)

Change example.org DNS record (#13904)

DNS Changed for this record causing tests to fail

Co-authored-by: Radosław Kapka <[email protected]>

Electra beacon config (#13907)

* Update spectests to v1.5.0

* Add electra config

* Fix tests in beacon-chain/rpc/eth/config

* gofmt

Simplify prune invalid by reusing existing fork choice store call (#13878)

Do not remove blobs DB in slasher. (#13881)

Refactor beacon-chain/core/helpers tests to be black box (#13906)

spectests: fail hard on missing test folders (#13913)

Revert "zig: Update zig to recent main branch commit (#13142)" (#13908)

This reverts commit b24b60d.

Remove EnableEIP4881 flag (#13826)

* Remove EnableEIP4881 flag

* Gaz

* Fix missing error handler

* Remove old tree and fix tests

* Gaz

* Fix build import

* Replace depositcache

* Add pendingDeposit tests

* Nishant's fix

* Fix unsafe uint64 to int

* Fix other unsafe uint64 to int

* Remove: RemovePendingDeposit

* Deprecate and remove DisableEIP4881 flag

* Check: index not greater than deposit count

* Move index check

Protobufs for Electra devnet-0  (#13905)

* block protos

* proto and ssz

* stubs

* Enable Electra spec test

* Pull in EIP-7251 protobuf changes

From: #13903

* All EIP7549 containers are passing

* All EIP7251 containers passing

* including changes from eip7002

* Everything passing except for beacon state hash tree root

* fixing eletra state to use electra payload

* Fix minimal test. Skip beacon state test

* Perston's feedback

---------

Co-authored-by: rkapka <[email protected]>
Co-authored-by: james-prysm <[email protected]>

use [32]byte keys in the filesystem cache (#13885)

Co-authored-by: Kasey Kirkham <[email protected]>

Electra: full beacon config (#13918)

* Electra: full beacon config

Fix TestGetSpec

* Fix beacon config spec compliance test so that it properly loads the config from spec tests. Tests failing for now.

* fix tests and comply with spec presets

beacon-chain/cache: Convert tests to cache_test blackbox testing (#13920)

* beacon-chain/cache: convert to blackbox tests (package cache_test)

* Move balanceCacheKey to its own file to satisify go fuzz build

Electra: Minor proto changes, cloner additions (#13923)

* Electra: more proto changes

* Roundtrip test for cloners

Electra: HTR util for DepositReceipt and ExecutionLayerWithdrawalRequest (#13924)

* Electra: HTR utils for DepositReceipts and ExecutionLayerWithdrawalRequests

* Tests for HTR utils

Electra: beacon-chain/core/helpers  (#13921)

* Electra helpers

* Electra helper tests and other fixes

* @terencechain feedback

Electra: add electra version

Electra: consensus types

gocognit exclusion

@potuz's suggestion

build fix

interfaces for indexed att and slashing

indexed att usage

BuildSignedBeaconBlockFromExecutionPayload

slashing usage

grpc stubs

remove unused methods

Electra attestation interfaces
rkapka added a commit that referenced this pull request Apr 30, 2024
* block protos

* proto and ssz

* stubs

* Enable Electra spec test

* Pull in EIP-7251 protobuf changes

From: #13903

* All EIP7549 containers are passing

* All EIP7251 containers passing

* including changes from eip7002

* Everything passing except for beacon state hash tree root

* fixing eletra state to use electra payload

* Fix minimal test. Skip beacon state test

* Perston's feedback

---------

Co-authored-by: rkapka <[email protected]>
Co-authored-by: james-prysm <[email protected]>
nisdas pushed a commit that referenced this pull request Jul 4, 2024
* block protos

* proto and ssz

* stubs

* Enable Electra spec test

* Pull in EIP-7251 protobuf changes

From: #13903

* All EIP7549 containers are passing

* All EIP7251 containers passing

* including changes from eip7002

* Everything passing except for beacon state hash tree root

* fixing eletra state to use electra payload

* Fix minimal test. Skip beacon state test

* Perston's feedback

---------

Co-authored-by: rkapka <[email protected]>
Co-authored-by: james-prysm <[email protected]>
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.

4 participants