Skip to content

Commit

Permalink
set proposer payment to 26k (ethereum#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
dvush authored and avalonche committed Feb 6, 2023
1 parent 8e7dde2 commit 75edca8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions eth/block-validation/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ func TestValidateBuilderSubmissionV1(t *testing.T) {
}
blockRequest.Message.Value = boostTypes.IntToU256(190526394825529)
require.ErrorContains(t, api.ValidateBuilderSubmissionV1(blockRequest), "inaccurate payment")
blockRequest.Message.Value = boostTypes.IntToU256(190277920613530)
blockRequest.Message.Value = boostTypes.IntToU256(190215802060530)
require.NoError(t, api.ValidateBuilderSubmissionV1(blockRequest))

// TODO: test with contract calling blacklisted address
Expand Down Expand Up @@ -142,7 +142,7 @@ func TestValidateBuilderSubmissionV1(t *testing.T) {
invalidPayload.LogsBloom = boostTypes.Bloom{}
copy(invalidPayload.ReceiptsRoot[:], hexutil.MustDecode("0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421")[:32])
blockRequest.ExecutionPayload = invalidPayload
copy(blockRequest.Message.BlockHash[:], hexutil.MustDecode("0xbcefd7caec3624eb917a0a7055d6a6d5c2aeb71111adef5cc733577f7e6dd985")[:32])
copy(blockRequest.Message.BlockHash[:], hexutil.MustDecode("0x65cded68b85277f489f22497731d8cece9e42f0429a250a5022a9417408f3998")[:32])
require.ErrorContains(t, api.ValidateBuilderSubmissionV1(blockRequest), "could not apply tx 3", "insufficient funds for gas * price + value")
}

Expand Down
4 changes: 2 additions & 2 deletions miner/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ const (
// staleThreshold is the maximum depth of the acceptable stale block.
staleThreshold = 7

paymentTxGas = 25000
paymentTxGas = 26000
)

var (
Expand Down Expand Up @@ -1832,6 +1832,6 @@ func (w *worker) createProposerPayoutTx(env *environment, recipient *common.Addr
gasPrice := new(big.Int).Set(env.header.BaseFee)
chainId := w.chainConfig.ChainID
log.Debug("createProposerPayoutTx", "sender", sender, "chainId", chainId.String(), "nonce", nonce, "amount", amount.String(), "baseFee", env.header.BaseFee.String(), "fee", fee)
tx := types.NewTransaction(nonce, *recipient, amount, 25000, gasPrice, nil)
tx := types.NewTransaction(nonce, *recipient, amount, paymentTxGas, gasPrice, nil)
return types.SignTx(tx, types.LatestSignerForChainID(chainId), w.config.BuilderTxSigningKey)
}

0 comments on commit 75edca8

Please sign in to comment.