Skip to content

Commit

Permalink
chore: adjust PR reviews - 3
Browse files Browse the repository at this point in the history
  • Loading branch information
kangsorang committed Dec 12, 2024
1 parent 905ac77 commit 939d473
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 15 deletions.
19 changes: 9 additions & 10 deletions op-node/rollup/derive/fuzz_parsers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,17 +101,16 @@ func FuzzL1InfoEcotoneRoundTrip(f *testing.F) {

// FuzzL1InfoKromaMPTRoundTrip checks that our Kroma MPT encoder round trips properly
func FuzzL1InfoKromaMPTRoundTrip(f *testing.F) {
f.Fuzz(func(t *testing.T, number, time uint64, baseFee, blobBaseFee, hash []byte, seqNumber uint64, baseFeeScalar, blobBaseFeeScalar uint32, validatorRewardScalar []byte) {
f.Fuzz(func(t *testing.T, number, time uint64, baseFee, blobBaseFee, hash []byte, seqNumber uint64, baseFeeScalar, blobBaseFeeScalar uint32) {
in := L1BlockInfo{
Number: number,
Time: time,
BaseFee: BytesToBigInt(baseFee),
BlockHash: common.BytesToHash(hash),
SequenceNumber: seqNumber,
BlobBaseFee: BytesToBigInt(blobBaseFee),
BaseFeeScalar: baseFeeScalar,
BlobBaseFeeScalar: blobBaseFeeScalar,
ValidatorRewardScalar: eth.Bytes32(common.BytesToHash(validatorRewardScalar)),
Number: number,
Time: time,
BaseFee: BytesToBigInt(baseFee),
BlockHash: common.BytesToHash(hash),
SequenceNumber: seqNumber,
BlobBaseFee: BytesToBigInt(blobBaseFee),
BaseFeeScalar: baseFeeScalar,
BlobBaseFeeScalar: blobBaseFeeScalar,
}
enc, err := in.marshalBinaryKromaMPT()
if err != nil {
Expand Down
9 changes: 4 additions & 5 deletions op-node/rollup/derive/kromampt_upgrade_transactions.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
"github.com/ethereum/go-ethereum/crypto"

oppredeploys "github.com/ethereum-optimism/optimism/op-bindings/predeploys"
"github.com/kroma-network/kroma/kroma-bindings/bindings"
)

var (
Expand All @@ -32,10 +31,10 @@ var (
deployL1BlockMPTSource = UpgradeDepositSource{Intent: "KromaMPT: L1 Block Deployment"}
updateL1BlockMPTProxySource = UpgradeDepositSource{Intent: "KromaMPT: L1 Block Proxy Update"}

l1BlockMPTDeploymentBytecode = common.FromHex(bindings.L1BlockMetaData.Bin)
sequencerFeeVaultDeploymentBytecode = common.FromHex(bindings.ProtocolVaultMetaData.Bin)
baseFeeVaultDeploymentBytecode = common.FromHex(bindings.ProtocolVaultMetaData.Bin)
l1FeeVaultDeploymentBytecode = common.FromHex(bindings.L1FeeVaultMetaData.Bin)
l1BlockMPTDeploymentBytecode = common.FromHex("0x608060405234801561001057600080fd5b50610624806100206000396000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c80639e8c496611610097578063e81b2c6d11610066578063e81b2c6d14610281578063ed579ad31461028a578063efc674eb14610293578063f8206140146102a657600080fd5b80639e8c4966146101f8578063b80777ea14610201578063c598591814610221578063e591b2821461024157600080fd5b806364ca23ef116100d357806364ca23ef1461017d57806368d5dca6146101aa5780638381f58a146101db5780638b239f73146101ef57600080fd5b806309bd5a6014610105578063440a5e201461012157806354fd4d501461012b5780635cf2496914610174575b600080fd5b61010e60025481565b6040519081526020015b60405180910390f35b6101296102af565b005b6101676040518060400160405280600581526020017f312e312e3000000000000000000000000000000000000000000000000000000081525081565b604051610118919061050b565b61010e60015481565b6003546101919067ffffffffffffffff1681565b60405167ffffffffffffffff9091168152602001610118565b6003546101c69068010000000000000000900463ffffffff1681565b60405163ffffffff9091168152602001610118565b6000546101919067ffffffffffffffff1681565b61010e60055481565b61010e60065481565b6000546101919068010000000000000000900467ffffffffffffffff1681565b6003546101c6906c01000000000000000000000000900463ffffffff1681565b61025c73deaddeaddeaddeaddeaddeaddeaddeaddead000181565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610118565b61010e60045481565b61010e60075481565b6101296102a136600461059b565b61030a565b61010e60085481565b3373deaddeaddeaddeaddeaddeaddeaddeaddead0001146102d857633cc50b456000526004601cfd5b60043560801c60035560143560801c60005560243560015560443560085560643560025560843560045560a435600755565b3373deaddeaddeaddeaddeaddeaddeaddeaddead0001146103b2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603b60248201527f4c31426c6f636b3a206f6e6c7920746865206465706f7369746f72206163636f60448201527f756e742063616e20736574204c3120626c6f636b2076616c756573000000000060648201526084015b60405180910390fd5b61271081111561046a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604360248201527f4c31426c6f636b3a20746865206d61782076616c7565206f662076616c69646160448201527f746f7220726577617264207363616c617220686173206265656e20657863656560648201527f6465640000000000000000000000000000000000000000000000000000000000608482015260a4016103a9565b6000805467ffffffffffffffff998a1668010000000000000000027fffffffffffffffffffffffffffffffff000000000000000000000000000000009091169a8a169a909a179990991790985560019590955560029390935560038054929095167fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000009290921691909117909355600492909255600591909155600655600755565b600060208083528351808285015260005b818110156105385785810183015185820160400152820161051c565b8181111561054a576000604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016929092016040019392505050565b803567ffffffffffffffff8116811461059657600080fd5b919050565b60008060008060008060008060006101208a8c0312156105ba57600080fd5b6105c38a61057e565b98506105d160208b0161057e565b975060408a0135965060608a013595506105ed60808b0161057e565b989b979a50959894979660a0860135965060c08601359560e081013595506101000135935091505056fea164736f6c634300080f000a")
sequencerFeeVaultDeploymentBytecode = common.FromHex("0x60c060405234801561001057600080fd5b5060405161081638038061081683398101604081905261002f91610045565b60006080526001600160a01b031660a052610075565b60006020828403121561005757600080fd5b81516001600160a01b038116811461006e57600080fd5b9392505050565b60805160a0516107536100c3600039600081816087015281816101c5015281816102db015281816103550152818161041501526105b401526000818161018b01526104bc01526107536000f3fe6080604052600436106100695760003560e01c80636ed39f62116100435780636ed39f621461014057806384411d6514610155578063d3e5792b1461017957600080fd5b80630d9019e1146100755780633ccfd60b146100d357806354fd4d50146100ea57600080fd5b3661007057005b600080fd5b34801561008157600080fd5b506100a97f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b3480156100df57600080fd5b506100e86101ad565b005b3480156100f657600080fd5b506101336040518060400160405280600581526020017f312e302e3100000000000000000000000000000000000000000000000000000081525081565b6040516100ca91906106a9565b34801561014c57600080fd5b506100e861033d565b34801561016157600080fd5b5061016b60005481565b6040519081526020016100ca565b34801561018557600080fd5b5061016b7f000000000000000000000000000000000000000000000000000000000000000081565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610277576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c00000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b60006102816104b8565b604080516020810182526000815290517fe11013dd0000000000000000000000000000000000000000000000000000000081529192507342000000000000000000000000000000000000099163e11013dd918491610308917f0000000000000000000000000000000000000000000000000000000000000000916188b891906004016106c3565b6000604051808303818588803b15801561032157600080fd5b505af1158015610335573d6000803e3d6000fd5b505050505050565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610402576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c000000000000000000000000000000000000000000000000000000606482015260840161026e565b600061040c6104b8565b9050600061044b7f00000000000000000000000000000000000000000000000000000000000000005a8460405180602001604052806000815250610624565b9050806104b4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4665655661756c743a20455448207472616e73666572206661696c6564000000604482015260640161026e565b5050565b60007f0000000000000000000000000000000000000000000000000000000000000000471015610590576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f4665655661756c743a207769746864726177616c20616d6f756e74206d75737460448201527f2062652067726561746572207468616e206d696e696d756d207769746864726160648201527f77616c20616d6f756e7400000000000000000000000000000000000000000000608482015260a40161026e565b6000479050806000808282546105a69190610707565b9091555050604080518281527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166020820152338183015290517fc8a211cc64b6ed1b50595a9fcb1932b6d1e5a6e8ef15b60e5b1f988ea9086bba9181900360600190a1919050565b600080600080845160208601878a8af19695505050505050565b6000815180845260005b8181101561066457602081850181015186830182015201610648565b81811115610676576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006106bc602083018461063e565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff8416815263ffffffff831660208201526060604082015260006106fe606083018461063e565b95945050505050565b60008219821115610741577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b50019056fea164736f6c634300080f000a")
baseFeeVaultDeploymentBytecode = common.FromHex("0x60c060405234801561001057600080fd5b5060405161081638038061081683398101604081905261002f91610045565b60006080526001600160a01b031660a052610075565b60006020828403121561005757600080fd5b81516001600160a01b038116811461006e57600080fd5b9392505050565b60805160a0516107536100c3600039600081816087015281816101c5015281816102db015281816103550152818161041501526105b401526000818161018b01526104bc01526107536000f3fe6080604052600436106100695760003560e01c80636ed39f62116100435780636ed39f621461014057806384411d6514610155578063d3e5792b1461017957600080fd5b80630d9019e1146100755780633ccfd60b146100d357806354fd4d50146100ea57600080fd5b3661007057005b600080fd5b34801561008157600080fd5b506100a97f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b3480156100df57600080fd5b506100e86101ad565b005b3480156100f657600080fd5b506101336040518060400160405280600581526020017f312e302e3100000000000000000000000000000000000000000000000000000081525081565b6040516100ca91906106a9565b34801561014c57600080fd5b506100e861033d565b34801561016157600080fd5b5061016b60005481565b6040519081526020016100ca565b34801561018557600080fd5b5061016b7f000000000000000000000000000000000000000000000000000000000000000081565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610277576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c00000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b60006102816104b8565b604080516020810182526000815290517fe11013dd0000000000000000000000000000000000000000000000000000000081529192507342000000000000000000000000000000000000099163e11013dd918491610308917f0000000000000000000000000000000000000000000000000000000000000000916188b891906004016106c3565b6000604051808303818588803b15801561032157600080fd5b505af1158015610335573d6000803e3d6000fd5b505050505050565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610402576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c000000000000000000000000000000000000000000000000000000606482015260840161026e565b600061040c6104b8565b9050600061044b7f00000000000000000000000000000000000000000000000000000000000000005a8460405180602001604052806000815250610624565b9050806104b4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4665655661756c743a20455448207472616e73666572206661696c6564000000604482015260640161026e565b5050565b60007f0000000000000000000000000000000000000000000000000000000000000000471015610590576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f4665655661756c743a207769746864726177616c20616d6f756e74206d75737460448201527f2062652067726561746572207468616e206d696e696d756d207769746864726160648201527f77616c20616d6f756e7400000000000000000000000000000000000000000000608482015260a40161026e565b6000479050806000808282546105a69190610707565b9091555050604080518281527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166020820152338183015290517fc8a211cc64b6ed1b50595a9fcb1932b6d1e5a6e8ef15b60e5b1f988ea9086bba9181900360600190a1919050565b600080600080845160208601878a8af19695505050505050565b6000815180845260005b8181101561066457602081850181015186830182015201610648565b81811115610676576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006106bc602083018461063e565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff8416815263ffffffff831660208201526060604082015260006106fe606083018461063e565b95945050505050565b60008219821115610741577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b50019056fea164736f6c634300080f000a")
l1FeeVaultDeploymentBytecode = common.FromHex("0x60c060405234801561001057600080fd5b5060405161081638038061081683398101604081905261002f91610045565b60006080526001600160a01b031660a052610075565b60006020828403121561005757600080fd5b81516001600160a01b038116811461006e57600080fd5b9392505050565b60805160a0516107536100c3600039600081816087015281816101c5015281816102db015281816103550152818161041501526105b401526000818161018b01526104bc01526107536000f3fe6080604052600436106100695760003560e01c80636ed39f62116100435780636ed39f621461014057806384411d6514610155578063d3e5792b1461017957600080fd5b80630d9019e1146100755780633ccfd60b146100d357806354fd4d50146100ea57600080fd5b3661007057005b600080fd5b34801561008157600080fd5b506100a97f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b3480156100df57600080fd5b506100e86101ad565b005b3480156100f657600080fd5b506101336040518060400160405280600581526020017f312e302e3200000000000000000000000000000000000000000000000000000081525081565b6040516100ca91906106a9565b34801561014c57600080fd5b506100e861033d565b34801561016157600080fd5b5061016b60005481565b6040519081526020016100ca565b34801561018557600080fd5b5061016b7f000000000000000000000000000000000000000000000000000000000000000081565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610277576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c00000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b60006102816104b8565b604080516020810182526000815290517fe11013dd0000000000000000000000000000000000000000000000000000000081529192507342000000000000000000000000000000000000099163e11013dd918491610308917f0000000000000000000000000000000000000000000000000000000000000000916188b891906004016106c3565b6000604051808303818588803b15801561032157600080fd5b505af1158015610335573d6000803e3d6000fd5b505050505050565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610402576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c000000000000000000000000000000000000000000000000000000606482015260840161026e565b600061040c6104b8565b9050600061044b7f00000000000000000000000000000000000000000000000000000000000000005a8460405180602001604052806000815250610624565b9050806104b4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4665655661756c743a20455448207472616e73666572206661696c6564000000604482015260640161026e565b5050565b60007f0000000000000000000000000000000000000000000000000000000000000000471015610590576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f4665655661756c743a207769746864726177616c20616d6f756e74206d75737460448201527f2062652067726561746572207468616e206d696e696d756d207769746864726160648201527f77616c20616d6f756e7400000000000000000000000000000000000000000000608482015260a40161026e565b6000479050806000808282546105a69190610707565b9091555050604080518281527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166020820152338183015290517fc8a211cc64b6ed1b50595a9fcb1932b6d1e5a6e8ef15b60e5b1f988ea9086bba9181900360600190a1919050565b600080600080845160208601878a8af19695505050505050565b6000815180845260005b8181101561066457602081850181015186830182015201610648565b81811115610676576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006106bc602083018461063e565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff8416815263ffffffff831660208201526060604082015260006106fe606083018461063e565b95945050505050565b60008219821115610741577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b50019056fea164736f6c634300080f000a")
)

func KromaMPTNetworkUpgradeTransactions() ([]hexutil.Bytes, error) {
Expand Down

0 comments on commit 939d473

Please sign in to comment.