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

Validator client builder support #10749

Merged
merged 112 commits into from
Jun 6, 2022
Merged
Show file tree
Hide file tree
Changes from 108 commits
Commits
Show all changes
112 commits
Select commit Hold shift + click to select a range
fabd6f2
Startinb builder service and interface
terencechain May 10, 2022
0973e08
Get header from builder
terencechain May 10, 2022
0a834ef
Add get builder block
terencechain May 12, 2022
ffb3ef2
Single validator registration
terencechain May 13, 2022
e4dcbc4
Add mev-builder http cli flag
terencechain May 14, 2022
81a6c3f
Add method to verify registration signature
terencechain May 14, 2022
d1fc816
Merge branch 'develop' of github.com:prysmaticlabs/prysm into builder-1
terencechain May 16, 2022
ca71dc0
Add builder registration
terencechain May 16, 2022
e2aa4b1
Add submit validator registration
terencechain May 16, 2022
253c773
suporting yaml
james-prysm May 17, 2022
fb8f064
fix yaml unmarshaling
kasey May 17, 2022
4935b1d
rolling back some changes from unmarshal from file
james-prysm May 17, 2022
8340c01
Merge branch 'develop' of github.com:prysmaticlabs/prysm into builder-1
terencechain May 17, 2022
288f338
adding yaml support
james-prysm May 18, 2022
e566041
Merge branch 'builder-1' into validator-client-builder-support
james-prysm May 18, 2022
5205f9b
adding register validator support
james-prysm May 18, 2022
9d29280
Merge branch 'develop' into validator-client-builder-support
james-prysm May 18, 2022
50b4244
added new validator requests into client/validator
james-prysm May 18, 2022
bd09469
Merge branch 'develop' into builder-1
james-prysm May 18, 2022
3cfa2de
Merge branch 'builder-1' into validator-client-builder-support
james-prysm May 18, 2022
449d12d
fixing gofmt
james-prysm May 18, 2022
1e7785e
updating flags and including gas limit, unit tests are still broken
james-prysm May 19, 2022
4961971
fixing bazel
james-prysm May 19, 2022
73cdbb4
more name changes and fixing unit tests
james-prysm May 20, 2022
fdd8848
fixing unit tests and renaming functions
james-prysm May 20, 2022
1a06daa
Merge branch 'develop' into builder-1
james-prysm May 20, 2022
8c9b1f6
Merge branch 'builder-1' into validator-client-builder-support
james-prysm May 20, 2022
bdc2d81
fixing unit tests and renaming to match changes
james-prysm May 20, 2022
9e16452
adding new test for yaml
james-prysm May 20, 2022
8e59afc
fixing bazel linter
james-prysm May 20, 2022
14c412e
reverting change on validator service proto
james-prysm May 20, 2022
e242eb0
Merge branch 'develop' into builder-1
james-prysm May 20, 2022
37193be
Merge branch 'develop' into builder-1
james-prysm May 20, 2022
a4981f0
adding clarifying logs
james-prysm May 20, 2022
399f216
renaming function name to be more descriptive
james-prysm May 23, 2022
b2ef039
Merge branch 'develop' into builder-1
james-prysm May 23, 2022
b47fd56
Merge branch 'builder-1' into validator-client-builder-support
james-prysm May 23, 2022
6da4f35
renaming variable
james-prysm May 24, 2022
e54dd78
Merge branch 'develop' into validator-client-builder-support
james-prysm May 24, 2022
5612b2f
Merge branch 'develop' into validator-client-builder-support
james-prysm May 24, 2022
e5792ea
rolling back some files that will be added from the builder-1 branch
james-prysm May 24, 2022
174cacb
reverting more
james-prysm May 24, 2022
34e6dc2
more reverting
james-prysm May 24, 2022
eb9ef3b
need placeholder
james-prysm May 24, 2022
dc49906
need placeholder
james-prysm May 24, 2022
eb37daa
Merge branch 'develop' into validator-client-builder-support
james-prysm May 24, 2022
8e4499d
fixing unit test
james-prysm May 24, 2022
3e1b328
Merge branch 'develop' into validator-client-builder-support
james-prysm May 24, 2022
108c9c8
fixing unit test
james-prysm May 24, 2022
3c9ce71
fixing unit test
james-prysm May 24, 2022
50abab8
fixing unit test
james-prysm May 24, 2022
0721273
fixing more unit tests
james-prysm May 24, 2022
f9b6815
fixing more unit tests
james-prysm May 24, 2022
bb31852
Merge branch 'develop' into validator-client-builder-support
james-prysm May 31, 2022
d6df7b4
Merge branch 'develop' into validator-client-builder-support
james-prysm May 31, 2022
2382712
Merge branch 'develop' into validator-client-builder-support
james-prysm May 31, 2022
57bb6e6
rolling back mockgen
james-prysm May 31, 2022
35c4311
Merge branch 'develop' into validator-client-builder-support
james-prysm May 31, 2022
0b932fe
Merge branch 'develop' into validator-client-builder-support
james-prysm Jun 1, 2022
91efa80
fixing bazel
james-prysm Jun 1, 2022
e005b4a
rolling back changes
james-prysm Jun 1, 2022
ca02322
removing duplicate function
james-prysm Jun 1, 2022
575408d
fixing client mock
james-prysm Jun 1, 2022
a89317f
removing unused type
james-prysm Jun 1, 2022
5f4836c
fixing missing brace
james-prysm Jun 1, 2022
fc5abb0
Merge branch 'develop' into validator-client-builder-support
james-prysm Jun 1, 2022
e6eed94
fixing bad field name
james-prysm Jun 1, 2022
e1b9e43
fixing bazel
james-prysm Jun 1, 2022
a8b9937
updating naming
james-prysm Jun 1, 2022
db80ef1
fixing bazel
james-prysm Jun 1, 2022
2aba632
Merge branch 'develop' into validator-client-builder-support
james-prysm Jun 1, 2022
5867cf8
fixing unit test
james-prysm Jun 1, 2022
a93a8d7
Merge branch 'develop' into validator-client-builder-support
james-prysm Jun 1, 2022
a37f4cb
fixing bazel linting
james-prysm Jun 1, 2022
90a5f73
unhandled err
james-prysm Jun 1, 2022
0c74cdd
fixing gofmt
james-prysm Jun 1, 2022
a3b167b
simplifying name based on feedback
james-prysm Jun 2, 2022
eb841aa
using corrected function
james-prysm Jun 2, 2022
4372811
moving default fee recipient and gaslimit to beaconconfig
james-prysm Jun 2, 2022
5cd4d6a
missing a few constant changes
james-prysm Jun 2, 2022
1aec13a
fixing bazel
james-prysm Jun 2, 2022
2cd333f
fixing more missed default renames
james-prysm Jun 2, 2022
6d634d5
fixing more constants in tests
james-prysm Jun 2, 2022
e24f6db
fixing bazel
james-prysm Jun 2, 2022
74f1ed3
Merge branch 'develop' into validator-client-builder-support
james-prysm Jun 2, 2022
992f89f
adding update proposer setting per epoch
james-prysm Jun 2, 2022
c41ca76
refactoring to reduce complexity
james-prysm Jun 2, 2022
4778b7c
adding unit test for proposer settings
james-prysm Jun 2, 2022
c3699d9
Update validator/client/validator.go
james-prysm Jun 2, 2022
263f5ac
trying out renaming based on feedback
james-prysm Jun 2, 2022
60e36d6
adjusting based on review comments
james-prysm Jun 2, 2022
baa79b9
Merge branch 'develop' into validator-client-builder-support
james-prysm Jun 2, 2022
701e09a
making tests more appropriate
james-prysm Jun 3, 2022
98962ee
fixing bazel
james-prysm Jun 3, 2022
178f441
Merge branch 'develop' into validator-client-builder-support
james-prysm Jun 3, 2022
3a2326d
updating flag description based on review feedback
james-prysm Jun 3, 2022
e971034
Merge branch 'develop' into validator-client-builder-support
james-prysm Jun 3, 2022
49c07b1
addressing review feedback
james-prysm Jun 3, 2022
3209082
Merge branch 'develop' into validator-client-builder-support
james-prysm Jun 3, 2022
2609a21
switching to pushing at start of epoch for more time
james-prysm Jun 3, 2022
fc1b0b6
Merge branch 'develop' into validator-client-builder-support
james-prysm Jun 3, 2022
6b2630a
Merge branch 'develop' into validator-client-builder-support
james-prysm Jun 4, 2022
64f4a57
Merge branch 'develop' into validator-client-builder-support
james-prysm Jun 6, 2022
a8d1082
Merge branch 'develop' into validator-client-builder-support
james-prysm Jun 6, 2022
7e943a5
Merge branch 'develop' into validator-client-builder-support
james-prysm Jun 6, 2022
5c570e5
adding new unit test and properly throwing error
james-prysm Jun 6, 2022
321d57e
switching keys in error to count
james-prysm Jun 6, 2022
b120c33
Merge branch 'develop' into validator-client-builder-support
james-prysm Jun 6, 2022
f33dfba
fixing log variable
james-prysm Jun 6, 2022
eb09781
resolving conflict
james-prysm Jun 6, 2022
82ba338
resolving more conflicts
james-prysm Jun 6, 2022
c2ef93d
adjusting error message
james-prysm Jun 6, 2022
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
2 changes: 1 addition & 1 deletion api/client/builder/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ go_test(
data = glob(["testdata/**"]),
embed = [":go_default_library"],
deps = [
"//config/fieldparams:go_default_library",
"//config/params:go_default_library",
"//consensus-types/primitives:go_default_library",
"//encoding/bytesutil:go_default_library",
"//proto/engine/v1:go_default_library",
Expand Down
4 changes: 2 additions & 2 deletions api/client/builder/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"testing"

"github.com/prysmaticlabs/go-bitfield"
fieldparams "github.com/prysmaticlabs/prysm/config/fieldparams"
"github.com/prysmaticlabs/prysm/config/params"
types "github.com/prysmaticlabs/prysm/consensus-types/primitives"
"github.com/prysmaticlabs/prysm/encoding/bytesutil"
eth "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1"
Expand Down Expand Up @@ -98,7 +98,7 @@ func TestClient_RegisterValidator(t *testing.T) {
}
reg := &eth.SignedValidatorRegistrationV1{
Message: &eth.ValidatorRegistrationV1{
FeeRecipient: ezDecode(t, fieldparams.EthBurnAddressHex),
FeeRecipient: ezDecode(t, params.BeaconConfig().EthBurnAddressHex),
GasLimit: 23,
Timestamp: 42,
Pubkey: ezDecode(t, "0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1cfe39b56f43611df74a"),
Expand Down
5 changes: 2 additions & 3 deletions beacon-chain/blockchain/execution_engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import (
"github.com/prysmaticlabs/prysm/beacon-chain/db/kv"
"github.com/prysmaticlabs/prysm/beacon-chain/powchain"
"github.com/prysmaticlabs/prysm/beacon-chain/state"
fieldparams "github.com/prysmaticlabs/prysm/config/fieldparams"
"github.com/prysmaticlabs/prysm/config/params"
"github.com/prysmaticlabs/prysm/consensus-types/interfaces"
types "github.com/prysmaticlabs/prysm/consensus-types/primitives"
Expand Down Expand Up @@ -270,10 +269,10 @@ func (s *Service) getPayloadAttribute(ctx context.Context, st state.BeaconState,
recipient, err := s.cfg.BeaconDB.FeeRecipientByValidatorID(ctx, proposerID)
switch {
case errors.Is(err, kv.ErrNotFoundFeeRecipient):
if feeRecipient.String() == fieldparams.EthBurnAddressHex {
if feeRecipient.String() == params.BeaconConfig().EthBurnAddressHex {
logrus.WithFields(logrus.Fields{
"validatorIndex": proposerID,
"burnAddress": fieldparams.EthBurnAddressHex,
"burnAddress": params.BeaconConfig().EthBurnAddressHex,
Copy link
Contributor

Choose a reason for hiding this comment

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

per our conversation on fieldparams vs BeaconConfig etc, we talked about the gas limit being in BeaconConfig because it is likely to vary per-chain, but EthBurnAddress seems different because we probably want to use the same EthBurnAddress everywhere, right? So maybe we can just yeet this over to a package-level constant, maybe in the blockchain package (because that's where a bunch of the execution engine code lives).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was thinking about this as well but heard that there could be other addresses as the burn address ( not sure if totally correct). open to do either or.

}).Warn("Fee recipient is currently using the burn address, " +
"you will not be rewarded transaction fees on this setting. " +
"Please set a different eth address as the fee recipient. " +
Expand Down
2 changes: 1 addition & 1 deletion beacon-chain/blockchain/execution_engine_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -806,7 +806,7 @@ func Test_GetPayloadAttribute(t *testing.T) {
require.NoError(t, err)
require.Equal(t, true, hasPayload)
require.Equal(t, suggestedVid, vId)
require.Equal(t, fieldparams.EthBurnAddressHex, common.BytesToAddress(attr.SuggestedFeeRecipient).String())
require.Equal(t, params.BeaconConfig().EthBurnAddressHex, common.BytesToAddress(attr.SuggestedFeeRecipient).String())
require.LogsContain(t, hook, "Fee recipient is currently using the burn address")

// Cache hit, advance state, has fee recipient
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,10 @@ func (vs *Server) getExecutionPayload(ctx context.Context, slot types.Slot, vIdx
case errors.As(err, kv.ErrNotFoundFeeRecipient):
// If fee recipient is not found in DB and not set from beacon node CLI,
// use the burn address.
if feeRecipient.String() == fieldparams.EthBurnAddressHex {
if feeRecipient.String() == params.BeaconConfig().EthBurnAddressHex {
logrus.WithFields(logrus.Fields{
"validatorIndex": vIdx,
"burnAddress": fieldparams.EthBurnAddressHex,
"burnAddress": params.BeaconConfig().EthBurnAddressHex,
}).Warn("Fee recipient is currently using the burn address, " +
"you will not be rewarded transaction fees on this setting. " +
"Please set a different eth address as the fee recipient. " +
Expand Down
1 change: 0 additions & 1 deletion cmd/beacon-chain/flags/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ go_library(
],
deps = [
"//cmd:go_default_library",
"//config/fieldparams:go_default_library",
"//config/params:go_default_library",
"@com_github_sirupsen_logrus//:go_default_library",
"@com_github_urfave_cli_v2//:go_default_library",
Expand Down
3 changes: 1 addition & 2 deletions cmd/beacon-chain/flags/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ package flags
import (
"strings"

fieldparams "github.com/prysmaticlabs/prysm/config/fieldparams"
"github.com/prysmaticlabs/prysm/config/params"
"github.com/urfave/cli/v2"
)
Expand Down Expand Up @@ -215,7 +214,7 @@ var (
SuggestedFeeRecipient = &cli.StringFlag{
Name: "suggested-fee-recipient",
Usage: "Post bellatrix, this address will receive the transaction fees produced by any blocks from this node. Default to junk whilst bellatrix is in development state. Validator client can override this value through the preparebeaconproposer api.",
Value: fieldparams.EthBurnAddressHex,
Value: params.BeaconConfig().EthBurnAddressHex,
}
// TerminalTotalDifficultyOverride specifies the total difficulty to manual overrides the `TERMINAL_TOTAL_DIFFICULTY` parameter.
TerminalTotalDifficultyOverride = &cli.StringFlag{
Expand Down
2 changes: 1 addition & 1 deletion cmd/validator/flags/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ go_library(
"//validator:__subpackages__",
],
deps = [
"//config/fieldparams:go_default_library",
"//config/params:go_default_library",
"//io/file:go_default_library",
"@com_github_urfave_cli_v2//:go_default_library",
],
Expand Down
27 changes: 21 additions & 6 deletions cmd/validator/flags/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"runtime"
"time"

field_params "github.com/prysmaticlabs/prysm/config/fieldparams"
"github.com/prysmaticlabs/prysm/config/params"
"github.com/prysmaticlabs/prysm/io/file"
"github.com/urfave/cli/v2"
)
Expand Down Expand Up @@ -327,21 +327,36 @@ var (
// FeeRecipientConfigFileFlag defines the path or URL to a file with proposer config.
FeeRecipientConfigFileFlag = &cli.StringFlag{
Name: "fee-recipient-config-file",
Usage: "Set path to a JSON file containing validator mappings to ETH addresses for receiving transaction fees when proposing blocks (i.e. --fee-recipient-config-file=/path/to/proposer.json). File format found in docs",
Usage: "DEPRECATED, please use proposer-settings-file",
Value: "",
}
// FeeRecipientConfigURLFlag defines the path or URL to a file with proposer config.
FeeRecipientConfigURLFlag = &cli.StringFlag{
Name: "fee-recipient-config-url",
Usage: "Set URL to a REST endpoint containing validator mappings to ETH addresses for receiving transaction fees when proposing blocks (i.e. --fee-recipient-config-url=https://example.com/api/getConfig). File format found in docs",
Usage: "DEPRECATED, please use proposer-settings-url",
Value: "",
}

// ProposerSettingsFlag defines the path or URL to a file with proposer config.
ProposerSettingsFlag = &cli.StringFlag{
Name: "proposer-settings-file",
Usage: "Set path to a YAML or JSON file containing validator settings used when proposing blocks such as (fee recipient and gas limit) (i.e. --proposer-settings-file=/path/to/proposer.json). File format found in docs",
Value: "",
}
// ProposerSettingsURLFlag defines the path or URL to a file with proposer config.
ProposerSettingsURLFlag = &cli.StringFlag{
Name: "proposer-settings-url",
Usage: "Set URL to a REST endpoint containing validator settings used when proposing blocks such as (fee recipient) (i.e. --proposer-settings-url=https://example.com/api/getConfig). File format found in docs",
Value: "",
}

// SuggestedFeeRecipientFlag defines the address of the fee recipient.
SuggestedFeeRecipientFlag = &cli.StringFlag{
Name: "suggested-fee-recipient",
Usage: "Sets ALL validators' mapping to a suggested an eth address to receive gas fees when proposing a block. This is a fall back setting and will be overridden by other flags that update the proposer settings. ",
Value: field_params.EthBurnAddressHex,
Name: "suggested-fee-recipient",
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we call this suggested-fee-recipient and not just fee-recipient because the builder will likely change it? Thinking about the UX of help text, This setting is used for both the prepare_beacon_proposer api as well as the register_validator api. seems like it could leave users who don't know the underlying APIs without an understanding of what this value is for. Could we instead explain that this value will be communicated to the Builder, and that it is only a suggestion, because the Builder may pick a different value?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it is only a suggestion because by the definitions of the APIs they don't "guarantee" that the execution client will use it 😓 was wording from Jim

Copy link
Contributor

Choose a reason for hiding this comment

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

My main point was that I think the help text should be more user-centric; talking about which API calls this is used in isn't as helpful as explaining the big picture effect. I'm suggesting we should say something like "suggested-fee-recipient specifies the eth address to receive gas fees when proposing a block. note that this is only a suggestion when integrating with a Builder API, which may choose to specify a different fee recipient as payment for the blocks it builds".

Usage: "Sets ALL validators' mapping to a suggested an eth address to receive gas fees when proposing a block." +
" note that this is only a suggestion when integrating with a Builder API, which may choose to specify a different fee recipient as payment for the blocks it builds." +
" For additional setting overrides use the --" + ProposerSettingsFlag.Name + " or --" + ProposerSettingsURLFlag.Name + " Flags. ",
Value: params.BeaconConfig().EthBurnAddressHex,
}
)

Expand Down
2 changes: 2 additions & 0 deletions cmd/validator/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ var appFlags = []cli.Flag{
flags.FeeRecipientConfigFileFlag,
flags.FeeRecipientConfigURLFlag,
flags.SuggestedFeeRecipientFlag,
flags.ProposerSettingsURLFlag,
flags.ProposerSettingsFlag,
////////////////////
cmd.DisableMonitoringFlag,
cmd.MonitoringHostFlag,
Expand Down
2 changes: 2 additions & 0 deletions cmd/validator/usage.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ var appHelpFlagGroups = []flagGroup{
flags.Web3SignerPublicValidatorKeysFlag,
flags.FeeRecipientConfigFileFlag,
flags.FeeRecipientConfigURLFlag,
flags.ProposerSettingsFlag,
flags.ProposerSettingsURLFlag,
flags.SuggestedFeeRecipientFlag,
},
},
Expand Down
37 changes: 18 additions & 19 deletions config/fieldparams/mainnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,22 @@ package field_params

const (
Preset = "mainnet"
BlockRootsLength = 8192 // SLOTS_PER_HISTORICAL_ROOT
StateRootsLength = 8192 // SLOTS_PER_HISTORICAL_ROOT
RandaoMixesLength = 65536 // EPOCHS_PER_HISTORICAL_VECTOR
HistoricalRootsLength = 16777216 // HISTORICAL_ROOTS_LIMIT
ValidatorRegistryLimit = 1099511627776 // VALIDATOR_REGISTRY_LIMIT
Eth1DataVotesLength = 2048 // SLOTS_PER_ETH1_VOTING_PERIOD
PreviousEpochAttestationsLength = 4096 // MAX_ATTESTATIONS * SLOTS_PER_EPOCH
CurrentEpochAttestationsLength = 4096 // MAX_ATTESTATIONS * SLOTS_PER_EPOCH
SlashingsLength = 8192 // EPOCHS_PER_SLASHINGS_VECTOR
SyncCommitteeLength = 512 // SYNC_COMMITTEE_SIZE
RootLength = 32 // RootLength defines the byte length of a Merkle root.
BLSSignatureLength = 96 // BLSSignatureLength defines the byte length of a BLSSignature.
BLSPubkeyLength = 48 // BLSPubkeyLength defines the byte length of a BLSSignature.
MaxTxsPerPayloadLength = 1048576 // MaxTxsPerPayloadLength defines the maximum number of transactions that can be included in a payload.
MaxBytesPerTxLength = 1073741824 // MaxBytesPerTxLength defines the maximum number of bytes that can be included in a transaction.
FeeRecipientLength = 20 // FeeRecipientLength defines the byte length of a fee recipient.
LogsBloomLength = 256 // LogsBloomLength defines the byte length of a logs bloom.
VersionLength = 4 // VersionLength defines the byte length of a fork version number.
EthBurnAddressHex = "0x0000000000000000000000000000000000000000" // EthBurnAddressHex defines the hex encoded address of the eth1.0 burn contract.
BlockRootsLength = 8192 // SLOTS_PER_HISTORICAL_ROOT
StateRootsLength = 8192 // SLOTS_PER_HISTORICAL_ROOT
RandaoMixesLength = 65536 // EPOCHS_PER_HISTORICAL_VECTOR
HistoricalRootsLength = 16777216 // HISTORICAL_ROOTS_LIMIT
ValidatorRegistryLimit = 1099511627776 // VALIDATOR_REGISTRY_LIMIT
Eth1DataVotesLength = 2048 // SLOTS_PER_ETH1_VOTING_PERIOD
PreviousEpochAttestationsLength = 4096 // MAX_ATTESTATIONS * SLOTS_PER_EPOCH
CurrentEpochAttestationsLength = 4096 // MAX_ATTESTATIONS * SLOTS_PER_EPOCH
SlashingsLength = 8192 // EPOCHS_PER_SLASHINGS_VECTOR
SyncCommitteeLength = 512 // SYNC_COMMITTEE_SIZE
RootLength = 32 // RootLength defines the byte length of a Merkle root.
BLSSignatureLength = 96 // BLSSignatureLength defines the byte length of a BLSSignature.
BLSPubkeyLength = 48 // BLSPubkeyLength defines the byte length of a BLSSignature.
MaxTxsPerPayloadLength = 1048576 // MaxTxsPerPayloadLength defines the maximum number of transactions that can be included in a payload.
MaxBytesPerTxLength = 1073741824 // MaxBytesPerTxLength defines the maximum number of bytes that can be included in a transaction.
FeeRecipientLength = 20 // FeeRecipientLength defines the byte length of a fee recipient.
LogsBloomLength = 256 // LogsBloomLength defines the byte length of a logs bloom.
VersionLength = 4 // VersionLength defines the byte length of a fork version number.
)
37 changes: 18 additions & 19 deletions config/fieldparams/minimal.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,22 @@ package field_params

const (
Preset = "minimal"
BlockRootsLength = 64 // SLOTS_PER_HISTORICAL_ROOT
StateRootsLength = 64 // SLOTS_PER_HISTORICAL_ROOT
RandaoMixesLength = 64 // EPOCHS_PER_HISTORICAL_VECTOR
HistoricalRootsLength = 16777216 // HISTORICAL_ROOTS_LIMIT
ValidatorRegistryLimit = 1099511627776 // VALIDATOR_REGISTRY_LIMIT
Eth1DataVotesLength = 32 // SLOTS_PER_ETH1_VOTING_PERIOD
PreviousEpochAttestationsLength = 1024 // MAX_ATTESTATIONS * SLOTS_PER_EPOCH
CurrentEpochAttestationsLength = 1024 // MAX_ATTESTATIONS * SLOTS_PER_EPOCH
SlashingsLength = 64 // EPOCHS_PER_SLASHINGS_VECTOR
SyncCommitteeLength = 32 // SYNC_COMMITTEE_SIZE
RootLength = 32 // RootLength defines the byte length of a Merkle root.
BLSSignatureLength = 96 // BLSSignatureLength defines the byte length of a BLSSignature.
BLSPubkeyLength = 48 // BLSPubkeyLength defines the byte length of a BLSSignature.
MaxTxsPerPayloadLength = 1048576 // MaxTxsPerPayloadLength defines the maximum number of transactions that can be included in a payload.
MaxBytesPerTxLength = 1073741824 // MaxBytesPerTxLength defines the maximum number of bytes that can be included in a transaction.
FeeRecipientLength = 20 // FeeRecipientLength defines the byte length of a fee recipient.
LogsBloomLength = 256 // LogsBloomLength defines the byte length of a logs bloom.
VersionLength = 4 // VersionLength defines the byte length of a fork version number.
EthBurnAddressHex = "0x0000000000000000000000000000000000000000" // EthBurnAddressHex defines the hex encoded address of the eth1.0 burn contract.
BlockRootsLength = 64 // SLOTS_PER_HISTORICAL_ROOT
StateRootsLength = 64 // SLOTS_PER_HISTORICAL_ROOT
RandaoMixesLength = 64 // EPOCHS_PER_HISTORICAL_VECTOR
HistoricalRootsLength = 16777216 // HISTORICAL_ROOTS_LIMIT
ValidatorRegistryLimit = 1099511627776 // VALIDATOR_REGISTRY_LIMIT
Eth1DataVotesLength = 32 // SLOTS_PER_ETH1_VOTING_PERIOD
PreviousEpochAttestationsLength = 1024 // MAX_ATTESTATIONS * SLOTS_PER_EPOCH
CurrentEpochAttestationsLength = 1024 // MAX_ATTESTATIONS * SLOTS_PER_EPOCH
SlashingsLength = 64 // EPOCHS_PER_SLASHINGS_VECTOR
SyncCommitteeLength = 32 // SYNC_COMMITTEE_SIZE
RootLength = 32 // RootLength defines the byte length of a Merkle root.
BLSSignatureLength = 96 // BLSSignatureLength defines the byte length of a BLSSignature.
BLSPubkeyLength = 48 // BLSPubkeyLength defines the byte length of a BLSSignature.
MaxTxsPerPayloadLength = 1048576 // MaxTxsPerPayloadLength defines the maximum number of transactions that can be included in a payload.
MaxBytesPerTxLength = 1073741824 // MaxBytesPerTxLength defines the maximum number of bytes that can be included in a transaction.
FeeRecipientLength = 20 // FeeRecipientLength defines the byte length of a fee recipient.
LogsBloomLength = 256 // LogsBloomLength defines the byte length of a logs bloom.
VersionLength = 4 // VersionLength defines the byte length of a fork version number.
)
2 changes: 2 additions & 0 deletions config/params/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,8 @@ type BeaconChainConfig struct {
TerminalBlockHashActivationEpoch types.Epoch `yaml:"TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH" spec:"true"` // TerminalBlockHashActivationEpoch of beacon chain.
TerminalTotalDifficulty string `yaml:"TERMINAL_TOTAL_DIFFICULTY" spec:"true"` // TerminalTotalDifficulty is part of the experimental Bellatrix spec. This value is type is currently TBD.
DefaultFeeRecipient common.Address // DefaultFeeRecipient where the transaction fee goes to.
EthBurnAddressHex string // EthBurnAddressHex is the constant eth address written in hex format to burn fees in that network. the default is 0x0
DefaultBuilderGasLimit uint64 // DefaultBuilderGasLimit is the default used to set the gaslimit for the Builder APIs, typically at around 30M wei.
}

// InitializeForkSchedule initializes the schedules forks baked into the config.
Expand Down
2 changes: 2 additions & 0 deletions config/params/mainnet_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,8 @@ var mainnetBeaconConfig = &BeaconChainConfig{
TerminalBlockHashActivationEpoch: 18446744073709551615,
TerminalBlockHash: [32]byte{},
TerminalTotalDifficulty: "115792089237316195423570985008687907853269984665640564039457584007913129638912",
EthBurnAddressHex: "0x0000000000000000000000000000000000000000",
DefaultBuilderGasLimit: uint64(30000000),
}

// MainnetTestConfig provides a version of the mainnet config that has a different name
Expand Down
2 changes: 1 addition & 1 deletion config/validator/service/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ load("@prysm//tools/go:def.bzl", "go_library")

go_library(
name = "go_default_library",
srcs = ["fee-recipient-config.go"],
srcs = ["proposer-settings.go"],
importpath = "github.com/prysmaticlabs/prysm/config/validator/service",
visibility = ["//visibility:public"],
deps = [
Expand Down
Loading