Skip to content

Commit

Permalink
Merge pull request #10 from alessandromazza98/ale/fix-fee-recipient
Browse files Browse the repository at this point in the history
fix: don't hard code fee recipient and withdrawals
  • Loading branch information
danyalprout authored Oct 3, 2024
2 parents fe7e0e4 + d9ae4ff commit c0cd86d
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 9 deletions.
1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ replace github.com/ethereum/go-ethereum v1.14.8 => github.com/ethereum-optimism/

require (
github.com/ethereum-optimism/optimism v1.9.3-0.20240924125057-0fee34b645ca
github.com/ethereum-optimism/optimism/op-bindings v0.10.14
github.com/ethereum/go-ethereum v1.14.8
github.com/minio/minio-go/v7 v7.0.76
github.com/urfave/cli/v2 v2.27.4
Expand Down
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,6 @@ github.com/ethereum-optimism/op-geth v1.101408.0-rc.4.0.20240827042333-110c433a2
github.com/ethereum-optimism/op-geth v1.101408.0-rc.4.0.20240827042333-110c433a2469/go.mod h1:Mk8AhvlqFbjI9oW2ymThSSoqc6kiEH0/tCmHGMEu6ac=
github.com/ethereum-optimism/optimism v1.9.3-0.20240924125057-0fee34b645ca h1:KT9pWgX0EXRzVNKLCoYolQxpOSpRYf4E0N9uKMJmeqU=
github.com/ethereum-optimism/optimism v1.9.3-0.20240924125057-0fee34b645ca/go.mod h1:hBy5DjWde0XP/berSXl16EMsKS2D2WDQ7us/yzd4PG0=
github.com/ethereum-optimism/optimism/op-bindings v0.10.14 h1:SMMnMdNb1QIhJDyvk7QMUv+crAP4UHHoSYBOASBDIjM=
github.com/ethereum-optimism/optimism/op-bindings v0.10.14/go.mod h1:9ZSUq/rjlzp3uYyBN4sZmhTc3oZgDVqJ4wrUja7vj6c=
github.com/ethereum-optimism/superchain-registry/superchain v0.0.0-20240910145426-b3905c89e8ac h1:hCIrLuOPV3FJfMDvXeOhCC3uQNvFoMIIlkT2mN2cfeg=
github.com/ethereum-optimism/superchain-registry/superchain v0.0.0-20240910145426-b3905c89e8ac/go.mod h1:XaVXL9jg8BcyOeugECgIUGa9Y3DjYJj71RHmb5qon6M=
github.com/ethereum/c-kzg-4844 v1.0.0 h1:0X1LBXxaEtYD9xsyj9B9ctQEZIpnvVDeoBx8aHEwTNA=
Expand Down
8 changes: 2 additions & 6 deletions packages/replayor/benchmark.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (
"github.com/danyalprout/replayor/packages/clients"
"github.com/danyalprout/replayor/packages/stats"
"github.com/danyalprout/replayor/packages/strategies"
"github.com/ethereum-optimism/optimism/op-bindings/predeploys"
"github.com/ethereum-optimism/optimism/op-node/rollup"
"github.com/ethereum-optimism/optimism/op-service/eth"
"github.com/ethereum-optimism/optimism/op-service/retry"
Expand Down Expand Up @@ -123,15 +122,12 @@ func (r *Benchmark) addBlock(ctx context.Context, currentBlock strategies.BlockC
attrs := &eth.PayloadAttributes{
Timestamp: currentBlock.Time,
NoTxPool: true,
SuggestedFeeRecipient: predeploys.SequencerFeeVaultAddr,
SuggestedFeeRecipient: currentBlock.FeeRecipient,
Transactions: txnData,
GasLimit: currentBlock.GasLimit,
PrevRandao: currentBlock.MixDigest,
ParentBeaconBlockRoot: currentBlock.BeaconRoot,
}

if r.rollupCfg.IsCanyon(uint64(currentBlock.Time)) {
attrs.Withdrawals = &types.Withdrawals{}
Withdrawals: &currentBlock.Withdrawals,
}

startTime := time.Now()
Expand Down
2 changes: 2 additions & 0 deletions packages/strategies/replay.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ func blockToCreationParams(input *types.Block) BlockCreationParams {
Time: eth.Uint64Quantity(input.Time()),
MixDigest: eth.Bytes32(input.MixDigest()),
BeaconRoot: input.BeaconRoot(),
FeeRecipient: input.Coinbase(),
Withdrawals: input.Withdrawals(),
validateInfo: input.Hash(),
}
}
Expand Down
2 changes: 2 additions & 0 deletions packages/strategies/strategy.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ type BlockCreationParams struct {
Time eth.Uint64Quantity
MixDigest eth.Bytes32
BeaconRoot *common.Hash
FeeRecipient common.Address
Withdrawals types.Withdrawals
validateInfo interface{}
}

Expand Down

0 comments on commit c0cd86d

Please sign in to comment.