Skip to content
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
4 changes: 2 additions & 2 deletions beacon-chain/node/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,9 @@ func configureExecutionSetting(cliCtx *cli.Context) {
c.TerminalBlockHashActivationEpoch = types.Epoch(cliCtx.Uint64(flags.TerminalBlockHashActivationEpochOverride.Name))
params.OverrideBeaconConfig(c)
}
if cliCtx.IsSet(flags.Coinbase.Name) {
if cliCtx.IsSet(flags.FeeRecipient.Name) {
c := params.BeaconConfig()
c.Coinbase = common.HexToAddress(cliCtx.String(flags.Coinbase.Name))
c.FeeRecipient = common.HexToAddress(cliCtx.String(flags.FeeRecipient.Name))
params.OverrideBeaconConfig(c)
}
}
6 changes: 3 additions & 3 deletions beacon-chain/node/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,19 +79,19 @@ func TestConfigureExecutionSetting(t *testing.T) {
set.Uint64(flags.TerminalTotalDifficultyOverride.Name, 0, "")
set.String(flags.TerminalBlockHashOverride.Name, "", "")
set.Uint64(flags.TerminalBlockHashActivationEpochOverride.Name, 0, "")
set.String(flags.Coinbase.Name, "", "")
set.String(flags.FeeRecipient.Name, "", "")
require.NoError(t, set.Set(flags.TerminalTotalDifficultyOverride.Name, strconv.Itoa(100)))
require.NoError(t, set.Set(flags.TerminalBlockHashOverride.Name, "0xA"))
require.NoError(t, set.Set(flags.TerminalBlockHashActivationEpochOverride.Name, strconv.Itoa(200)))
require.NoError(t, set.Set(flags.Coinbase.Name, "0xB"))
require.NoError(t, set.Set(flags.FeeRecipient.Name, "0xB"))
cliCtx := cli.NewContext(&app, set, nil)

configureExecutionSetting(cliCtx)

assert.Equal(t, uint64(100), params.BeaconConfig().TerminalTotalDifficulty)
assert.Equal(t, common.HexToHash("0xA"), params.BeaconConfig().TerminalBlockHash)
assert.Equal(t, types.Epoch(200), params.BeaconConfig().TerminalBlockHashActivationEpoch)
assert.Equal(t, common.HexToAddress("0xB"), params.BeaconConfig().Coinbase)
assert.Equal(t, common.HexToAddress("0xB"), params.BeaconConfig().FeeRecipient)
}

func TestConfigureNetwork(t *testing.T) {
Expand Down
6 changes: 3 additions & 3 deletions beacon-chain/rpc/eth/beacon/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ func TestGetSpec(t *testing.T) {
config.TerminalBlockHash = common.HexToHash("TerminalBlockHash")
config.TerminalBlockHashActivationEpoch = 72
config.TerminalTotalDifficulty = 73
config.Coinbase = common.HexToAddress("Coinbase")
config.FeeRecipient = common.HexToAddress("FeeRecipient")

var dbp [4]byte
copy(dbp[:], []byte{'0', '0', '0', '1'})
Expand Down Expand Up @@ -329,8 +329,8 @@ func TestGetSpec(t *testing.T) {
assert.Equal(t, common.HexToHash("TerminalBlockHash"), common.HexToHash(v))
case "TERMINAL_TOTAL_DIFFICULTY":
assert.Equal(t, "73", v)
case "COINBASE":
assert.Equal(t, common.HexToAddress("Coinbase"), v)
case "FeeRecipient":
assert.Equal(t, common.HexToAddress("FeeRecipient"), v)
default:
t.Errorf("Incorrect key: %s", k)
}
Expand Down
6 changes: 3 additions & 3 deletions cmd/beacon-chain/flags/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,9 @@ var (
"WARNING: This flag should be used only if you have a clear understanding that community has decided to override the terminal block hash activation epoch. " +
"Incorrect usage will result in your node experience consensus failure.",
}
// Coinbase specifies the fee recipient for the transaction fees.
Coinbase = &cli.StringFlag{
Name: "coinbase",
// FeeRecipient specifies the fee recipient for the transaction fees.
FeeRecipient = &cli.StringFlag{
Name: "fee-recipient",
Usage: "Post merge, this address will receive the transaction fees produced by any blocks from this node. Default to junk whilst merge is in development state.",
Value: hex.EncodeToString([]byte("0x0000000000000000000000000000000000000001")),
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/beacon-chain/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ var appFlags = []cli.Flag{
flags.TerminalTotalDifficultyOverride,
flags.TerminalBlockHashOverride,
flags.TerminalBlockHashActivationEpochOverride,
flags.Coinbase,
flags.FeeRecipient,
cmd.EnableBackupWebhookFlag,
cmd.BackupWebhookOutputDir,
cmd.MinimalConfigFlag,
Expand Down
2 changes: 1 addition & 1 deletion cmd/beacon-chain/usage.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ var appHelpFlagGroups = []flagGroup{
flags.TerminalTotalDifficultyOverride,
flags.TerminalBlockHashOverride,
flags.TerminalBlockHashActivationEpochOverride,
flags.Coinbase,
flags.FeeRecipient,
},
},
{
Expand Down
2 changes: 1 addition & 1 deletion config/params/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ type BeaconChainConfig struct {
TerminalBlockHash common.Hash `yaml:"TERMINAL_BLOCK_HASH" spec:"true"` // TerminalBlockHash of beacon chain.
TerminalBlockHashActivationEpoch types.Epoch `yaml:"TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH" spec:"true"` // TerminalBlockHashActivationEpoch of beacon chain.
TerminalTotalDifficulty uint64 `yaml:"TERMINAL_TOTAL_DIFFICULTY" spec:"true"` // TerminalTotalDifficulty is part of the experimental merge spec. This value is type is currently TBD: https://github.com/ethereum/consensus-specs/blob/dev/specs/merge/beacon-chain.md#transition-settings
Coinbase common.Address // Coinbase where the transaction fee goes to.
FeeRecipient common.Address // FeeRecipient where the transaction fee goes to.
}

// InitializeForkSchedule initializes the schedules forks baked into the config.
Expand Down
94 changes: 47 additions & 47 deletions proto/prysm/v1alpha1/beacon_block.pb.go

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

2 changes: 1 addition & 1 deletion proto/prysm/v1alpha1/beacon_block.proto
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ message BeaconBlockBodyMerge {

message ExecutionPayload {
bytes parent_hash = 1 [(ethereum.eth.ext.ssz_size) = "32"];
bytes coinbase = 2 [(ethereum.eth.ext.ssz_size) = "20"]; // 'beneficiary' in the yellow paper
bytes fee_recipient = 2 [(ethereum.eth.ext.ssz_size) = "20"]; // 'beneficiary' in the yellow paper
bytes state_root = 3 [(ethereum.eth.ext.ssz_size) = "32"];
bytes receipt_root = 4 [(ethereum.eth.ext.ssz_size) = "32"]; // 'receipts root' in the yellow paper
bytes logs_bloom = 5 [(ethereum.eth.ext.ssz_size) = "256"];
Expand Down
Loading