Skip to content

Commit

Permalink
Helper for Payload Attestation Signing (#13901)
Browse files Browse the repository at this point in the history
  • Loading branch information
potuz committed Apr 24, 2024
1 parent bee5f2f commit 628fcc7
Show file tree
Hide file tree
Showing 20 changed files with 1,088 additions and 766 deletions.
12 changes: 11 additions & 1 deletion beacon-chain/rpc/eth/config/handlers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ import (
"github.com/prysmaticlabs/prysm/v5/testing/require"
)

// Variables defined in the placeholderFields will not be tested in `TestGetSpec`.
// These are variables that we don't use in Prysm. (i.e. future hardfork, light client... etc)
var placeholderFields = []string{"DOMAIN_BEACON_BUILDER", "DOMAIN_PTC_ATTESTER"}

func TestGetDepositContract(t *testing.T) {
params.SetupTestConfigCleanup(t)
config := params.BeaconConfig().Copy()
Expand Down Expand Up @@ -172,7 +176,7 @@ func TestGetSpec(t *testing.T) {
data, ok := resp.Data.(map[string]interface{})
require.Equal(t, true, ok)

assert.Equal(t, 136, len(data))
assert.Equal(t, 138, len(data))
for k, v := range data {
t.Run(k, func(t *testing.T) {
switch k {
Expand Down Expand Up @@ -472,6 +476,12 @@ func TestGetSpec(t *testing.T) {
case "MAX_REQUEST_DATA_COLUMN_SIDECARS":
assert.Equal(t, "16384", v)
default:
for _, pf := range placeholderFields {
if k == pf {
t.Logf("Skipping placeholder field: %s", k)
return
}
}
t.Errorf("Incorrect key: %s", k)
}
})
Expand Down
2 changes: 1 addition & 1 deletion config/params/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ type BeaconChainConfig struct {
DomainApplicationMask [4]byte `yaml:"DOMAIN_APPLICATION_MASK" spec:"true"` // DomainApplicationMask defines the BLS signature domain for application mask.
DomainApplicationBuilder [4]byte `yaml:"DOMAIN_APPLICATION_BUILDER" spec:"true"` // DomainApplicationBuilder defines the BLS signature domain for application builder.
DomainBLSToExecutionChange [4]byte `yaml:"DOMAIN_BLS_TO_EXECUTION_CHANGE" spec:"true"` // DomainBLSToExecutionChange defines the BLS signature domain to change withdrawal addresses to ETH1 prefix
DomainBeaconBuilder [4]byte `yaml:"DOMAIN_BEACON_BULDER" spec:"false"` // DomainBeaconBuilder defines the BLS signature domain used by builders [New in ePBS]
DomainBeaconBuilder [4]byte `yaml:"DOMAIN_BEACON_BUILDER" spec:"false"` // DomainBeaconBuilder defines the BLS signature domain used by builders [New in ePBS]
DomainPTCAttester [4]byte `yaml:"DOMAIN_PTC_ATTESTER" spec:"false"` // DomainPTCAttester defines the BLS signature domain used by PTC members [New in ePBS]

// Prysm constants.
Expand Down
3 changes: 0 additions & 3 deletions proto/engine/v1/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@ ssz_gen_marshal(
"ExecutionPayloadHeaderCapella",
"ExecutionPayloadHeaderDeneb",
"ExecutionPayloadDeneb",
"PayloadAttestationData",
"PayloadAttestation",
"PayloadAttestationMessage",
"InclusionListSummaryEntry",
"InclusionListSummary",
"SignedInclusionListSummary",
Expand Down
Loading

0 comments on commit 628fcc7

Please sign in to comment.