Commit f1dda46e authored by mergify[bot]'s avatar mergify[bot] Committed by GitHub

Merge branch 'develop' into jg/split_batcher_start_v2

parents b5e8ffcb 927b4321
...@@ -8,12 +8,12 @@ import ( ...@@ -8,12 +8,12 @@ import (
"strings" "strings"
"github.com/ethereum/go-ethereum/core/rawdb" "github.com/ethereum/go-ethereum/core/rawdb"
"github.com/ethereum/go-ethereum/core/state"
"github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/log"
"github.com/ethereum-optimism/optimism/op-bindings/hardhat" "github.com/ethereum-optimism/optimism/op-bindings/hardhat"
"github.com/ethereum-optimism/optimism/op-chain-ops/genesis" "github.com/ethereum-optimism/optimism/op-chain-ops/genesis"
"github.com/ethereum-optimism/optimism/op-chain-ops/genesis/migration"
"github.com/ethereum/go-ethereum/ethclient" "github.com/ethereum/go-ethereum/ethclient"
"github.com/mattn/go-isatty" "github.com/mattn/go-isatty"
...@@ -84,28 +84,28 @@ func main() { ...@@ -84,28 +84,28 @@ func main() {
return err return err
} }
ovmAddresses, err := genesis.NewAddresses(ctx.String("ovm-addresses")) ovmAddresses, err := migration.NewAddresses(ctx.String("ovm-addresses"))
if err != nil { if err != nil {
return err return err
} }
evmAddresess, err := genesis.NewAddresses(ctx.String("evm-addresses")) evmAddresess, err := migration.NewAddresses(ctx.String("evm-addresses"))
if err != nil { if err != nil {
return err return err
} }
ovmAllowances, err := genesis.NewAllowances(ctx.String("ovm-allowances")) ovmAllowances, err := migration.NewAllowances(ctx.String("ovm-allowances"))
if err != nil { if err != nil {
return err return err
} }
ovmMessages, err := genesis.NewSentMessage(ctx.String("ovm-messages")) ovmMessages, err := migration.NewSentMessage(ctx.String("ovm-messages"))
if err != nil { if err != nil {
return err return err
} }
evmMessages, err := genesis.NewSentMessage(ctx.String("evm-messages")) evmMessages, err := migration.NewSentMessage(ctx.String("evm-messages"))
if err != nil { if err != nil {
return err return err
} }
migrationData := genesis.MigrationData{ migrationData := migration.MigrationData{
OvmAddresses: ovmAddresses, OvmAddresses: ovmAddresses,
EvmAddresses: evmAddresess, EvmAddresses: evmAddresess,
OvmAllowances: ovmAllowances, OvmAllowances: ovmAllowances,
...@@ -143,18 +143,6 @@ func main() { ...@@ -143,18 +143,6 @@ func main() {
return err return err
} }
hash := rawdb.ReadHeadHeaderHash(ldb)
if err != nil {
return err
}
num := rawdb.ReadHeaderNumber(ldb, hash)
header := rawdb.ReadHeader(ldb, hash, *num)
sdb, err := state.New(header.Root, state.NewDatabase(ldb), nil)
if err != nil {
return err
}
// Get the addresses from the hardhat deploy artifacts // Get the addresses from the hardhat deploy artifacts
l1StandardBridgeProxyDeployment, err := hh.GetDeployment("Proxy__OVM_L1StandardBridge") l1StandardBridgeProxyDeployment, err := hh.GetDeployment("Proxy__OVM_L1StandardBridge")
if err != nil { if err != nil {
...@@ -176,20 +164,10 @@ func main() { ...@@ -176,20 +164,10 @@ func main() {
L1ERC721BridgeProxy: l1ERC721BridgeProxyDeployment.Address, L1ERC721BridgeProxy: l1ERC721BridgeProxyDeployment.Address,
} }
if err := genesis.MigrateDB(sdb, config, block, &l2Addrs, &migrationData); err != nil { dryRun := ctx.Bool("dry-run")
return err if err := genesis.MigrateDB(ldb, config, block, &l2Addrs, &migrationData, !dryRun); err != nil {
}
if ctx.Bool("dry-run") {
log.Info("Dry run complete")
return nil
}
root, err := sdb.Commit(true)
if err != nil {
return err return err
} }
log.Info("Migration complete", "root", root)
return nil return nil
}, },
......
...@@ -8,8 +8,8 @@ import ( ...@@ -8,8 +8,8 @@ import (
"io" "io"
"strings" "strings"
l2grawdb "github.com/ethereum-optimism/optimism/l2geth/core/rawdb"
"github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/rawdb"
"github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/ethdb"
) )
...@@ -31,8 +31,8 @@ type AllowanceCB func(owner, spender common.Address) error ...@@ -31,8 +31,8 @@ type AllowanceCB func(owner, spender common.Address) error
// IterateDBAddresses iterates over each address in Geth's address // IterateDBAddresses iterates over each address in Geth's address
// preimage database, calling the callback with the address. // preimage database, calling the callback with the address.
func IterateDBAddresses(inDB ethdb.Database, cb AddressCB) error { func IterateDBAddresses(db ethdb.Database, cb AddressCB) error {
iter := inDB.NewIterator(AddressPreimagePrefix, nil) iter := db.NewIterator(AddressPreimagePrefix, nil)
for iter.Next() { for iter.Next() {
if iter.Error() != nil { if iter.Error() != nil {
return iter.Error() return iter.Error()
...@@ -98,10 +98,10 @@ func IterateAllowanceList(r io.Reader, cb AllowanceCB) error { ...@@ -98,10 +98,10 @@ func IterateAllowanceList(r io.Reader, cb AllowanceCB) error {
// IterateMintEvents iterates over each mint event in the database starting // IterateMintEvents iterates over each mint event in the database starting
// from head and stopping at genesis. // from head and stopping at genesis.
func IterateMintEvents(inDB ethdb.Database, headNum uint64, cb AddressCB) error { func IterateMintEvents(db ethdb.Database, headNum uint64, cb AddressCB) error {
for headNum > 0 { for headNum > 0 {
hash := l2grawdb.ReadCanonicalHash(inDB, headNum) hash := rawdb.ReadCanonicalHash(db, headNum)
receipts := l2grawdb.ReadRawReceipts(inDB, hash, headNum) receipts := rawdb.ReadRawReceipts(db, hash, headNum)
for _, receipt := range receipts { for _, receipt := range receipts {
for _, l := range receipt.Logs { for _, l := range receipt.Logs {
if common.BytesToHash(l.Topics[0].Bytes()) != MintTopic { if common.BytesToHash(l.Topics[0].Bytes()) != MintTopic {
......
This diff is collapsed.
package ether
import (
"math/big"
"github.com/ethereum-optimism/optimism/op-bindings/predeploys"
"github.com/ethereum-optimism/optimism/op-chain-ops/genesis/migration"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/rawdb"
"github.com/ethereum/go-ethereum/core/state"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/ethdb"
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/rlp"
"github.com/ethereum/go-ethereum/trie"
)
func MigrateLegacyETH(db ethdb.Database, addresses []common.Address, allowances []*migration.Allowance, chainID int) error {
// Set of addresses that we will be migrating.
addressesToMigrate := make(map[common.Address]bool)
// Set of storage slots that we expect to see in the OVM ETH contract.
storageSlotsToMigrate := make(map[common.Hash]int)
// Chain params to use for integrity checking.
params := ParamsByChainID[chainID]
// Iterate over each address list, and read the addresses they
// contain into memory. Also calculate the storage slots for each
// address.
for _, addr := range addresses {
addressesToMigrate[addr] = true
storageSlotsToMigrate[CalcOVMETHStorageKey(addr)] = 1
}
for _, allowance := range allowances {
addressesToMigrate[allowance.From] = true
// TODO: double check ordering here
storageSlotsToMigrate[CalcAllowanceStorageKey(allowance.From, allowance.To)] = 2
}
headBlock := rawdb.ReadHeadBlock(db)
root := headBlock.Root()
// Read mint events from the database. Even though Geth's balance methods
// are instrumented, mints from the bridge happen in the EVM and so do
// not execute that code path. As a result, we parse mint events in order
// to not miss any balances.
log.Info("reading mint events from DB")
logProgress := ProgressLogger(100, "read mint event")
err := IterateMintEvents(db, headBlock.NumberU64(), func(address common.Address) error {
addressesToMigrate[address] = true
storageSlotsToMigrate[CalcOVMETHStorageKey(address)] = 1
logProgress()
return nil
})
if err != nil {
return wrapErr(err, "error reading mint events")
}
// Make sure all addresses are accounted for by iterating over
// the OVM ETH contract's state, and panicking if we miss
// any storage keys. We also keep track of the total amount of
// OVM ETH found, and diff that against the total supply of
// OVM ETH specified in the contract.
backingStateDB := state.NewDatabase(db)
stateDB, err := state.New(root, backingStateDB, nil)
if err != nil {
return wrapErr(err, "error opening state DB")
}
storageTrie := stateDB.StorageTrie(OVMETHAddress)
storageIt := trie.NewIterator(storageTrie.NodeIterator(nil))
logProgress = ProgressLogger(10000, "iterating storage keys")
totalFound := new(big.Int)
totalSupply := getOVMETHTotalSupply(stateDB)
for storageIt.Next() {
_, content, _, err := rlp.Split(storageIt.Value)
if err != nil {
panic(err)
}
k := common.BytesToHash(storageTrie.GetKey(storageIt.Key))
v := common.BytesToHash(content)
sType := storageSlotsToMigrate[k]
switch sType {
case 1:
// This slot is a balance, increment totalFound.
totalFound = totalFound.Add(totalFound, v.Big())
case 2:
// This slot is an allowance, ignore it.
continue
default:
slot := new(big.Int).SetBytes(k.Bytes())
// Check if this slot is a variable. If it isn't, and it isn't a
// known missing key, abort
if slot.Cmp(maxSlot) == 1 && !params.KnownMissingKeys[k] {
log.Crit("missed storage key", "k", k.String(), "v", v.String())
}
}
logProgress()
}
// Verify that the total supply is what we expect. We allow a hardcoded
// delta to be specified in the chain params since older regenesis events
// had supply bugs.
delta := new(big.Int).Set(totalSupply)
delta = delta.Sub(delta, totalFound)
if delta.Cmp(params.ExpectedSupplyDelta) != 0 {
log.Crit(
"supply mismatch",
"migrated", totalFound,
"supply", totalSupply,
"delta", delta,
"exp_delta", params.ExpectedSupplyDelta,
)
}
log.Info(
"supply verified OK",
"migrated", totalFound.String(),
"supply", totalSupply.String(),
"delta", delta.String(),
"exp_delta", params.ExpectedSupplyDelta,
)
log.Info("performing migration")
log.Info("trie dumping started", "root", root)
tr, err := backingStateDB.OpenTrie(root)
if err != nil {
return err
}
it := trie.NewIterator(tr.NodeIterator(nil))
totalMigrated := new(big.Int)
logAccountProgress := ProgressLogger(1000, "imported accounts")
migratedAccounts := make(map[common.Address]bool)
for it.Next() {
// It's up to us to decode trie data.
var data types.StateAccount
if err := rlp.DecodeBytes(it.Value, &data); err != nil {
panic(err)
}
addrBytes := tr.GetKey(it.Key)
addr := common.BytesToAddress(addrBytes)
migratedAccounts[addr] = true
// Get the OVM ETH balance based on the address's storage key.
ovmBalance := getOVMETHBalance(stateDB, addr)
// No accounts should have a balance in state. If they do, bail.
if data.Balance.Sign() > 0 {
log.Crit("account has non-zero balance in state - should never happen", "addr", addr)
}
// Actually perform the migration by setting the appropriate values in state.
stateDB.SetBalance(addr, ovmBalance)
stateDB.SetState(predeploys.LegacyERC20ETHAddr, CalcOVMETHStorageKey(addr), common.Hash{})
// Bump the total OVM balance.
totalMigrated = totalMigrated.Add(totalMigrated, ovmBalance)
logAccountProgress()
}
// Take care of nonce zero accounts with balances. These are accounts
// that received OVM ETH as part of the regenesis, but never actually
// transacted on-chain.
logNonceZeroProgress := ProgressLogger(1000, "imported zero nonce accounts")
log.Info("importing accounts with zero-nonce balances")
for addr := range addressesToMigrate {
if migratedAccounts[addr] {
continue
}
ovmBalance := getOVMETHBalance(stateDB, addr)
totalMigrated = totalMigrated.Add(totalMigrated, ovmBalance)
stateDB.AddBalance(addr, ovmBalance)
stateDB.SetState(predeploys.LegacyERC20ETHAddr, CalcOVMETHStorageKey(addr), common.Hash{})
logNonceZeroProgress()
}
// Make sure that the amount we migrated matches the amount in
// our original state.
if totalMigrated.Cmp(totalFound) != 0 {
log.Crit(
"total migrated does not equal total OVM eth found",
"migrated", totalMigrated,
"found", totalFound,
)
}
// Set the total supply to 0
stateDB.SetState(predeploys.LegacyERC20ETHAddr, getOVMETHTotalSupplySlot(), common.Hash{})
return nil
}
...@@ -30,7 +30,6 @@ type DeployConfig struct { ...@@ -30,7 +30,6 @@ type DeployConfig struct {
SequencerWindowSize uint64 `json:"sequencerWindowSize"` SequencerWindowSize uint64 `json:"sequencerWindowSize"`
ChannelTimeout uint64 `json:"channelTimeout"` ChannelTimeout uint64 `json:"channelTimeout"`
P2PSequencerAddress common.Address `json:"p2pSequencerAddress"` P2PSequencerAddress common.Address `json:"p2pSequencerAddress"`
OptimismL2FeeRecipient common.Address `json:"optimismL2FeeRecipient"`
BatchInboxAddress common.Address `json:"batchInboxAddress"` BatchInboxAddress common.Address `json:"batchInboxAddress"`
BatchSenderAddress common.Address `json:"batchSenderAddress"` BatchSenderAddress common.Address `json:"batchSenderAddress"`
......
package genesis package genesis
import ( import (
"fmt"
"math/big"
"github.com/ethereum-optimism/optimism/op-bindings/predeploys"
"github.com/ethereum-optimism/optimism/op-chain-ops/crossdomain" "github.com/ethereum-optimism/optimism/op-chain-ops/crossdomain"
"github.com/ethereum-optimism/optimism/op-chain-ops/ether"
"github.com/ethereum-optimism/optimism/op-chain-ops/genesis/migration"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/rawdb"
"github.com/ethereum/go-ethereum/core/state"
"github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/core/vm"
"github.com/ethereum/go-ethereum/ethdb"
"github.com/ethereum/go-ethereum/trie"
) )
var abiTrue = common.Hash{31: 0x01}
// MigrateDB will migrate an old l2geth database to the new bedrock style system // MigrateDB will migrate an old l2geth database to the new bedrock style system
func MigrateDB(db vm.StateDB, config *DeployConfig, l1Block *types.Block, l2Addrs *L2Addresses, migrationData *MigrationData) error { func MigrateDB(ldb ethdb.Database, config *DeployConfig, l1Block *types.Block, l2Addrs *L2Addresses, migrationData *migration.MigrationData, commit bool) error {
hash := rawdb.ReadHeadHeaderHash(ldb)
num := rawdb.ReadHeaderNumber(ldb, hash)
header := rawdb.ReadHeader(ldb, hash, *num)
db, err := state.New(header.Root, state.NewDatabase(ldb), nil)
if err != nil {
return err
}
// Convert all of the messages into legacy withdrawals
withdrawals, err := migrationData.ToWithdrawals()
if err != nil {
return err
}
if err := CheckWithdrawals(db, withdrawals); err != nil {
return err
}
// Now start the migration
if err := SetL2Proxies(db); err != nil { if err := SetL2Proxies(db); err != nil {
return err return err
} }
...@@ -26,28 +59,97 @@ func MigrateDB(db vm.StateDB, config *DeployConfig, l1Block *types.Block, l2Addr ...@@ -26,28 +59,97 @@ func MigrateDB(db vm.StateDB, config *DeployConfig, l1Block *types.Block, l2Addr
return err return err
} }
// Convert all of the messages into legacy withdrawals err = crossdomain.MigrateWithdrawals(withdrawals, db, &l2Addrs.L1CrossDomainMessengerProxy, &l2Addrs.L1StandardBridgeProxy)
messages := make([]*crossdomain.LegacyWithdrawal, 0)
for _, msg := range migrationData.OvmMessages {
wd, err := msg.ToLegacyWithdrawal()
if err != nil { if err != nil {
return err return err
} }
messages = append(messages, wd)
addrs := migrationData.Addresses()
if err := ether.MigrateLegacyETH(ldb, addrs, migrationData.OvmAllowances, int(config.L1ChainID)); err != nil {
return err
}
if !commit {
return nil
} }
for _, msg := range migrationData.EvmMessages {
wd, err := msg.ToLegacyWithdrawal() root, err := db.Commit(true)
if err != nil { if err != nil {
return err return err
} }
messages = append(messages, wd)
// Create the bedrock transition block
bedrockHeader := &types.Header{
ParentHash: header.Hash(),
UncleHash: types.EmptyUncleHash,
Coinbase: config.L2GenesisBlockCoinbase,
Root: root,
TxHash: types.EmptyRootHash,
ReceiptHash: types.EmptyRootHash,
Bloom: types.Bloom{},
Difficulty: (*big.Int)(config.L2GenesisBlockDifficulty),
Number: new(big.Int).Add(header.Number, common.Big1),
GasLimit: (uint64)(config.L2GenesisBlockGasLimit),
GasUsed: (uint64)(config.L2GenesisBlockGasUsed),
Time: uint64(config.L2OutputOracleStartingTimestamp),
Extra: config.L2GenesisBlockExtraData,
MixDigest: config.L2GenesisBlockMixHash,
Nonce: types.EncodeNonce((uint64)(config.L1GenesisBlockNonce)),
BaseFee: (*big.Int)(config.L2GenesisBlockBaseFeePerGas),
} }
if err := crossdomain.MigrateWithdrawals(messages, db, &l2Addrs.L1CrossDomainMessengerProxy, &l2Addrs.L1StandardBridgeProxy); err != nil { block := types.NewBlock(bedrockHeader, nil, nil, nil, trie.NewStackTrie(nil))
rawdb.WriteTd(ldb, block.Hash(), block.NumberU64(), block.Difficulty())
rawdb.WriteBlock(ldb, block)
rawdb.WriteReceipts(ldb, block.Hash(), block.NumberU64(), nil)
rawdb.WriteCanonicalHash(ldb, block.Hash(), block.NumberU64())
rawdb.WriteHeadBlockHash(ldb, block.Hash())
rawdb.WriteHeadFastBlockHash(ldb, block.Hash())
rawdb.WriteHeadHeaderHash(ldb, block.Hash())
return nil
}
// CheckWithdrawals will ensure that the entire list of withdrawals is being
// operated on during the database migration.
func CheckWithdrawals(db vm.StateDB, withdrawals []*crossdomain.LegacyWithdrawal) error {
// Create a mapping of all of their storage slots
knownSlots := make(map[common.Hash]bool)
for _, wd := range withdrawals {
slot, err := wd.StorageSlot()
if err != nil {
return err
}
knownSlots[slot] = true
}
// Build a map of all the slots in the LegacyMessagePasser
slots := make(map[common.Hash]bool)
err := db.ForEachStorage(predeploys.LegacyMessagePasserAddr, func(key, value common.Hash) bool {
if value != abiTrue {
return false
}
slots[key] = true
return true
})
if err != nil {
return err return err
} }
// TODO: use migration data to double check things // Check that all of the slots from storage correspond to a known message
for slot := range slots {
_, ok := knownSlots[slot]
if !ok {
return fmt.Errorf("Unknown storage slot in state: %s", slot)
}
}
// Check that all of the input messages are legit
for slot := range knownSlots {
_, ok := slots[slot]
if !ok {
return fmt.Errorf("Unknown input message: %s", slot)
}
}
return nil return nil
} }
...@@ -52,8 +52,8 @@ func NewL2Genesis(config *DeployConfig, block *types.Block) (*core.Genesis, erro ...@@ -52,8 +52,8 @@ func NewL2Genesis(config *DeployConfig, block *types.Block) (*core.Genesis, erro
TerminalTotalDifficulty: big.NewInt(0), TerminalTotalDifficulty: big.NewInt(0),
TerminalTotalDifficultyPassed: true, TerminalTotalDifficultyPassed: true,
Optimism: &params.OptimismConfig{ Optimism: &params.OptimismConfig{
L1FeeRecipient: config.OptimismL1FeeRecipient,
BaseFeeRecipient: config.OptimismBaseFeeRecipient, BaseFeeRecipient: config.OptimismBaseFeeRecipient,
L1FeeRecipient: config.OptimismL2FeeRecipient,
EIP1559Denominator: eip1559Denom, EIP1559Denominator: eip1559Denom,
EIP1559Elasticity: eip1559Elasticity, EIP1559Elasticity: eip1559Elasticity,
}, },
......
package genesis package migration
import ( import (
"encoding/json" "encoding/json"
...@@ -116,3 +116,36 @@ type MigrationData struct { ...@@ -116,3 +116,36 @@ type MigrationData struct {
// L2CrossDomainMessenger from after the evm equivalence upgrade // L2CrossDomainMessenger from after the evm equivalence upgrade
EvmMessages []*SentMessage EvmMessages []*SentMessage
} }
func (m *MigrationData) ToWithdrawals() ([]*crossdomain.LegacyWithdrawal, error) {
messages := make([]*crossdomain.LegacyWithdrawal, 0)
for _, msg := range m.OvmMessages {
wd, err := msg.ToLegacyWithdrawal()
if err != nil {
return nil, err
}
messages = append(messages, wd)
if err != nil {
return nil, err
}
}
for _, msg := range m.EvmMessages {
wd, err := msg.ToLegacyWithdrawal()
if err != nil {
return nil, err
}
messages = append(messages, wd)
}
return messages, nil
}
func (m *MigrationData) Addresses() []common.Address {
addresses := make([]common.Address, 0)
for addr := range m.EvmAddresses {
addresses = append(addresses, addr)
}
for addr := range m.EvmAddresses {
addresses = append(addresses, addr)
}
return addresses
}
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
"sequencerWindowSize": 4, "sequencerWindowSize": 4,
"channelTimeout": 40, "channelTimeout": 40,
"p2pSequencerAddress": "0x9965507D1a55bcC2695C58ba16FB37d819B0A4dc", "p2pSequencerAddress": "0x9965507D1a55bcC2695C58ba16FB37d819B0A4dc",
"optimismL2FeeRecipient": "0xd9c09e21b57c98e58a80552c170989b426766aa7",
"batchInboxAddress": "0xff00000000000000000000000000000000000000", "batchInboxAddress": "0xff00000000000000000000000000000000000000",
"batchSenderAddress": "0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC", "batchSenderAddress": "0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC",
......
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
"sequencerWindowSize": 100, "sequencerWindowSize": 100,
"channelTimeout": 30, "channelTimeout": 30,
"p2pSequencerAddress": "0x0000000000000000000000000000000000000000", "p2pSequencerAddress": "0x0000000000000000000000000000000000000000",
"optimismL2FeeRecipient": "0x42000000000000000000000000000000000000f0",
"batchInboxAddress": "0x42000000000000000000000000000000000000ff", "batchInboxAddress": "0x42000000000000000000000000000000000000ff",
"batchSenderAddress": "0x0000000000000000000000000000000000000000", "batchSenderAddress": "0x0000000000000000000000000000000000000000",
"l2OutputOracleSubmissionInterval": 6, "l2OutputOracleSubmissionInterval": 6,
......
...@@ -3,7 +3,6 @@ module github.com/ethereum-optimism/optimism/op-chain-ops ...@@ -3,7 +3,6 @@ module github.com/ethereum-optimism/optimism/op-chain-ops
go 1.18 go 1.18
require ( require (
github.com/ethereum-optimism/optimism/l2geth v0.0.0-20220820030939-de38b6f6f77e
github.com/ethereum-optimism/optimism/op-bindings v0.8.10 github.com/ethereum-optimism/optimism/op-bindings v0.8.10
github.com/ethereum/go-ethereum v1.10.23 github.com/ethereum/go-ethereum v1.10.23
github.com/holiman/uint256 v1.2.0 github.com/holiman/uint256 v1.2.0
...@@ -16,45 +15,35 @@ require ( ...@@ -16,45 +15,35 @@ require (
require ( require (
github.com/VictoriaMetrics/fastcache v1.9.0 // indirect github.com/VictoriaMetrics/fastcache v1.9.0 // indirect
github.com/aristanetworks/goarista v0.0.0-20170210015632-ea17b1a17847 // indirect
github.com/btcsuite/btcd v0.22.1 // indirect
github.com/btcsuite/btcd/btcec/v2 v2.2.0 // indirect github.com/btcsuite/btcd/btcec/v2 v2.2.0 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect github.com/davecgh/go-spew v1.1.1 // indirect
github.com/deckarep/golang-set v1.8.0 // indirect github.com/deckarep/golang-set v1.8.0 // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 // indirect
github.com/edsrzf/mmap-go v1.1.0 // indirect github.com/edsrzf/mmap-go v1.0.0 // indirect
github.com/elastic/gosigar v0.12.0 // indirect
github.com/go-ole/go-ole v1.2.6 // indirect github.com/go-ole/go-ole v1.2.6 // indirect
github.com/go-stack/stack v1.8.1 // indirect github.com/go-stack/stack v1.8.1 // indirect
github.com/golang/snappy v0.0.4 // indirect github.com/golang/snappy v0.0.4 // indirect
github.com/google/uuid v1.3.0 // indirect github.com/google/uuid v1.3.0 // indirect
github.com/gorilla/websocket v1.5.0 // indirect github.com/gorilla/websocket v1.5.0 // indirect
github.com/hashicorp/go-bexpr v0.1.11 // indirect
github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d // indirect github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d // indirect
github.com/holiman/bloomfilter/v2 v2.0.3 // indirect github.com/holiman/bloomfilter/v2 v2.0.3 // indirect
github.com/kr/pretty v0.3.0 // indirect
github.com/mattn/go-runewidth v0.0.13 // indirect github.com/mattn/go-runewidth v0.0.13 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/olekukonko/tablewriter v0.0.5 // indirect github.com/olekukonko/tablewriter v0.0.5 // indirect
github.com/pkg/errors v0.9.1 // indirect github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/tsdb v0.10.0 // indirect github.com/prometheus/tsdb v0.10.0 // indirect
github.com/rivo/uniseg v0.2.0 // indirect github.com/rivo/uniseg v0.2.0 // indirect
github.com/rjeczalik/notify v0.9.2 // indirect github.com/rjeczalik/notify v0.9.2 // indirect
github.com/rogpeppe/go-internal v1.8.1 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/shirou/gopsutil v3.21.11+incompatible // indirect github.com/shirou/gopsutil v3.21.11+incompatible // indirect
github.com/steakknife/bloomfilter v0.0.0-20180922174646-6819c0d2a570 // indirect
github.com/steakknife/hamming v0.0.0-20180906055917-c99c65617cd3 // indirect
github.com/syndtr/goleveldb v1.0.1-0.20220614013038-64ee5596c38a // indirect github.com/syndtr/goleveldb v1.0.1-0.20220614013038-64ee5596c38a // indirect
github.com/tklauser/go-sysconf v0.3.10 // indirect github.com/tklauser/go-sysconf v0.3.10 // indirect
github.com/tklauser/numcpus v0.4.0 // indirect github.com/tklauser/numcpus v0.4.0 // indirect
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect
github.com/yusufpapurcu/wmi v1.2.2 // indirect github.com/yusufpapurcu/wmi v1.2.2 // indirect
golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f // indirect golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect
golang.org/x/sys v0.0.0-20220701225701-179beb0bd1a1 // indirect
gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect
) )
......
This diff is collapsed.
...@@ -7,6 +7,7 @@ import ( ...@@ -7,6 +7,7 @@ import (
"github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core"
"github.com/ethereum-optimism/optimism/op-bindings/predeploys"
"github.com/ethereum-optimism/optimism/op-chain-ops/crossdomain" "github.com/ethereum-optimism/optimism/op-chain-ops/crossdomain"
) )
...@@ -41,7 +42,7 @@ func CollectAddresses(sd *SetupData, dp *DeployParams) (out []common.Address) { ...@@ -41,7 +42,7 @@ func CollectAddresses(sd *SetupData, dp *DeployParams) (out []common.Address) {
sd.L1Cfg.Coinbase, sd.L1Cfg.Coinbase,
sd.L2Cfg.Coinbase, sd.L2Cfg.Coinbase,
sd.RollupCfg.P2PSequencerAddress, sd.RollupCfg.P2PSequencerAddress,
sd.RollupCfg.FeeRecipientAddress, predeploys.SequencerFeeVaultAddr,
sd.RollupCfg.BatchInboxAddress, sd.RollupCfg.BatchInboxAddress,
sd.RollupCfg.BatchSenderAddress, sd.RollupCfg.BatchSenderAddress,
sd.RollupCfg.DepositContractAddress, sd.RollupCfg.DepositContractAddress,
......
...@@ -62,7 +62,6 @@ func MakeDeployParams(t require.TestingT, tp *TestParams) *DeployParams { ...@@ -62,7 +62,6 @@ func MakeDeployParams(t require.TestingT, tp *TestParams) *DeployParams {
SequencerWindowSize: tp.SequencerWindowSize, SequencerWindowSize: tp.SequencerWindowSize,
ChannelTimeout: tp.ChannelTimeout, ChannelTimeout: tp.ChannelTimeout,
P2PSequencerAddress: addresses.SequencerP2P, P2PSequencerAddress: addresses.SequencerP2P,
OptimismL2FeeRecipient: common.Address{0: 0x42, 19: 0xf0}, // tbd
BatchInboxAddress: common.Address{0: 0x42, 19: 0xff}, // tbd BatchInboxAddress: common.Address{0: 0x42, 19: 0xff}, // tbd
BatchSenderAddress: addresses.Batcher, BatchSenderAddress: addresses.Batcher,
...@@ -89,7 +88,7 @@ func MakeDeployParams(t require.TestingT, tp *TestParams) *DeployParams { ...@@ -89,7 +88,7 @@ func MakeDeployParams(t require.TestingT, tp *TestParams) *DeployParams {
L2GenesisBlockGasLimit: 15_000_000, L2GenesisBlockGasLimit: 15_000_000,
L2GenesisBlockDifficulty: uint64ToBig(0), L2GenesisBlockDifficulty: uint64ToBig(0),
L2GenesisBlockMixHash: common.Hash{}, L2GenesisBlockMixHash: common.Hash{},
L2GenesisBlockCoinbase: common.Address{0: 0x42, 19: 0xf0}, // matching OptimismL2FeeRecipient L2GenesisBlockCoinbase: predeploys.SequencerFeeVaultAddr,
L2GenesisBlockNumber: 0, L2GenesisBlockNumber: 0,
L2GenesisBlockGasUsed: 0, L2GenesisBlockGasUsed: 0,
L2GenesisBlockParentHash: common.Hash{}, L2GenesisBlockParentHash: common.Hash{},
...@@ -201,7 +200,6 @@ func Setup(t require.TestingT, deployParams *DeployParams, alloc *AllocParams) * ...@@ -201,7 +200,6 @@ func Setup(t require.TestingT, deployParams *DeployParams, alloc *AllocParams) *
L1ChainID: new(big.Int).SetUint64(deployConf.L1ChainID), L1ChainID: new(big.Int).SetUint64(deployConf.L1ChainID),
L2ChainID: new(big.Int).SetUint64(deployConf.L2ChainID), L2ChainID: new(big.Int).SetUint64(deployConf.L2ChainID),
P2PSequencerAddress: deployConf.P2PSequencerAddress, P2PSequencerAddress: deployConf.P2PSequencerAddress,
FeeRecipientAddress: deployConf.OptimismL2FeeRecipient,
BatchInboxAddress: deployConf.BatchInboxAddress, BatchInboxAddress: deployConf.BatchInboxAddress,
BatchSenderAddress: deployConf.BatchSenderAddress, BatchSenderAddress: deployConf.BatchSenderAddress,
DepositContractAddress: predeploys.DevOptimismPortalAddr, DepositContractAddress: predeploys.DevOptimismPortalAddr,
......
...@@ -94,7 +94,6 @@ func DefaultSystemConfig(t *testing.T) SystemConfig { ...@@ -94,7 +94,6 @@ func DefaultSystemConfig(t *testing.T) SystemConfig {
OptimismBaseFeeRecipient: common.Address{0: 0x52, 19: 0xf0}, // tbd OptimismBaseFeeRecipient: common.Address{0: 0x52, 19: 0xf0}, // tbd
OptimismL1FeeRecipient: common.Address{0: 0x52, 19: 0xf1}, OptimismL1FeeRecipient: common.Address{0: 0x52, 19: 0xf1},
OptimismL2FeeRecipient: common.Address{0: 0x52, 19: 0xf2}, // tbd
L2CrossDomainMessengerOwner: common.Address{0: 0x52, 19: 0xf3}, // tbd L2CrossDomainMessengerOwner: common.Address{0: 0x52, 19: 0xf3}, // tbd
GasPriceOracleOwner: addresses.Alice, // tbd GasPriceOracleOwner: addresses.Alice, // tbd
GasPriceOracleOverhead: 0, GasPriceOracleOverhead: 0,
...@@ -283,7 +282,6 @@ func (cfg SystemConfig) Start() (*System, error) { ...@@ -283,7 +282,6 @@ func (cfg SystemConfig) Start() (*System, error) {
L1ChainID: cfg.L1ChainIDBig(), L1ChainID: cfg.L1ChainIDBig(),
L2ChainID: cfg.L2ChainIDBig(), L2ChainID: cfg.L2ChainIDBig(),
P2PSequencerAddress: cfg.DeployConfig.P2PSequencerAddress, P2PSequencerAddress: cfg.DeployConfig.P2PSequencerAddress,
FeeRecipientAddress: l2Genesis.Coinbase,
BatchInboxAddress: cfg.DeployConfig.BatchInboxAddress, BatchInboxAddress: cfg.DeployConfig.BatchInboxAddress,
BatchSenderAddress: cfg.DeployConfig.BatchSenderAddress, BatchSenderAddress: cfg.DeployConfig.BatchSenderAddress,
DepositContractAddress: predeploys.DevOptimismPortalAddr, DepositContractAddress: predeploys.DevOptimismPortalAddr,
......
...@@ -915,7 +915,7 @@ func TestFees(t *testing.T) { ...@@ -915,7 +915,7 @@ func TestFees(t *testing.T) {
// L1Fee Recipient // L1Fee Recipient
ctx, cancel = context.WithTimeout(context.Background(), 1*time.Second) ctx, cancel = context.WithTimeout(context.Background(), 1*time.Second)
defer cancel() defer cancel()
l1FeeRecipientStartBalance, err := l2Seq.BalanceAt(ctx, cfg.DeployConfig.OptimismL2FeeRecipient, nil) l1FeeRecipientStartBalance, err := l2Seq.BalanceAt(ctx, cfg.DeployConfig.OptimismL1FeeRecipient, nil)
require.Nil(t, err) require.Nil(t, err)
// Simple transfer from signer to random account // Simple transfer from signer to random account
...@@ -976,7 +976,7 @@ func TestFees(t *testing.T) { ...@@ -976,7 +976,7 @@ func TestFees(t *testing.T) {
ctx, cancel = context.WithTimeout(context.Background(), 1*time.Second) ctx, cancel = context.WithTimeout(context.Background(), 1*time.Second)
defer cancel() defer cancel()
l1FeeRecipientEndBalance, err := l2Seq.BalanceAt(ctx, cfg.DeployConfig.OptimismL2FeeRecipient, nil) l1FeeRecipientEndBalance, err := l2Seq.BalanceAt(ctx, cfg.DeployConfig.OptimismL1FeeRecipient, header.Number)
require.Nil(t, err) require.Nil(t, err)
// Diff fee recipient + coinbase balances // Diff fee recipient + coinbase balances
......
...@@ -193,7 +193,6 @@ func makeRollupConfig( ...@@ -193,7 +193,6 @@ func makeRollupConfig(
L1ChainID: new(big.Int).SetUint64(config.L1ChainID), L1ChainID: new(big.Int).SetUint64(config.L1ChainID),
L2ChainID: new(big.Int).SetUint64(config.L2ChainID), L2ChainID: new(big.Int).SetUint64(config.L2ChainID),
P2PSequencerAddress: config.P2PSequencerAddress, P2PSequencerAddress: config.P2PSequencerAddress,
FeeRecipientAddress: config.OptimismL2FeeRecipient,
BatchInboxAddress: config.BatchInboxAddress, BatchInboxAddress: config.BatchInboxAddress,
BatchSenderAddress: config.BatchSenderAddress, BatchSenderAddress: config.BatchSenderAddress,
DepositContractAddress: portalAddr, DepositContractAddress: portalAddr,
......
...@@ -4,6 +4,7 @@ import ( ...@@ -4,6 +4,7 @@ import (
"context" "context"
"fmt" "fmt"
"github.com/ethereum-optimism/optimism/op-bindings/predeploys"
"github.com/ethereum-optimism/optimism/op-node/eth" "github.com/ethereum-optimism/optimism/op-node/eth"
"github.com/ethereum-optimism/optimism/op-node/rollup" "github.com/ethereum-optimism/optimism/op-node/rollup"
"github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common"
...@@ -74,7 +75,7 @@ func PreparePayloadAttributes(ctx context.Context, cfg *rollup.Config, dl L1Rece ...@@ -74,7 +75,7 @@ func PreparePayloadAttributes(ctx context.Context, cfg *rollup.Config, dl L1Rece
return &eth.PayloadAttributes{ return &eth.PayloadAttributes{
Timestamp: hexutil.Uint64(timestamp), Timestamp: hexutil.Uint64(timestamp),
PrevRandao: eth.Bytes32(l1Info.MixDigest()), PrevRandao: eth.Bytes32(l1Info.MixDigest()),
SuggestedFeeRecipient: cfg.FeeRecipientAddress, SuggestedFeeRecipient: predeploys.SequencerFeeVaultAddr,
Transactions: txs, Transactions: txs,
NoTxPool: true, NoTxPool: true,
}, nil }, nil
......
...@@ -8,6 +8,7 @@ import ( ...@@ -8,6 +8,7 @@ import (
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"github.com/ethereum-optimism/optimism/op-bindings/predeploys"
"github.com/ethereum-optimism/optimism/op-node/eth" "github.com/ethereum-optimism/optimism/op-node/eth"
"github.com/ethereum-optimism/optimism/op-node/rollup" "github.com/ethereum-optimism/optimism/op-node/rollup"
"github.com/ethereum-optimism/optimism/op-node/testlog" "github.com/ethereum-optimism/optimism/op-node/testlog"
...@@ -25,7 +26,6 @@ func TestAttributesQueue(t *testing.T) { ...@@ -25,7 +26,6 @@ func TestAttributesQueue(t *testing.T) {
BlockTime: 2, BlockTime: 2,
L1ChainID: big.NewInt(101), L1ChainID: big.NewInt(101),
L2ChainID: big.NewInt(102), L2ChainID: big.NewInt(102),
FeeRecipientAddress: common.Address{0xaa},
DepositContractAddress: common.Address{0xbb}, DepositContractAddress: common.Address{0xbb},
} }
rng := rand.New(rand.NewSource(1234)) rng := rand.New(rand.NewSource(1234))
...@@ -52,7 +52,7 @@ func TestAttributesQueue(t *testing.T) { ...@@ -52,7 +52,7 @@ func TestAttributesQueue(t *testing.T) {
attrs := eth.PayloadAttributes{ attrs := eth.PayloadAttributes{
Timestamp: eth.Uint64Quantity(safeHead.Time + cfg.BlockTime), Timestamp: eth.Uint64Quantity(safeHead.Time + cfg.BlockTime),
PrevRandao: eth.Bytes32(l1Info.InfoMixDigest), PrevRandao: eth.Bytes32(l1Info.InfoMixDigest),
SuggestedFeeRecipient: cfg.FeeRecipientAddress, SuggestedFeeRecipient: predeploys.SequencerFeeVaultAddr,
Transactions: []eth.Data{l1InfoTx, eth.Data("foobar"), eth.Data("example")}, Transactions: []eth.Data{l1InfoTx, eth.Data("foobar"), eth.Data("example")},
NoTxPool: true, NoTxPool: true,
} }
......
...@@ -10,6 +10,7 @@ import ( ...@@ -10,6 +10,7 @@ import (
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"github.com/ethereum-optimism/optimism/op-bindings/predeploys"
"github.com/ethereum-optimism/optimism/op-node/eth" "github.com/ethereum-optimism/optimism/op-node/eth"
"github.com/ethereum-optimism/optimism/op-node/rollup" "github.com/ethereum-optimism/optimism/op-node/rollup"
"github.com/ethereum-optimism/optimism/op-node/testutils" "github.com/ethereum-optimism/optimism/op-node/testutils"
...@@ -23,7 +24,6 @@ func TestPreparePayloadAttributes(t *testing.T) { ...@@ -23,7 +24,6 @@ func TestPreparePayloadAttributes(t *testing.T) {
BlockTime: 2, BlockTime: 2,
L1ChainID: big.NewInt(101), L1ChainID: big.NewInt(101),
L2ChainID: big.NewInt(102), L2ChainID: big.NewInt(102),
FeeRecipientAddress: common.Address{0xaa},
DepositContractAddress: common.Address{0xbb}, DepositContractAddress: common.Address{0xbb},
} }
...@@ -99,7 +99,7 @@ func TestPreparePayloadAttributes(t *testing.T) { ...@@ -99,7 +99,7 @@ func TestPreparePayloadAttributes(t *testing.T) {
require.NotNil(t, attrs) require.NotNil(t, attrs)
require.Equal(t, l2Parent.Time+cfg.BlockTime, uint64(attrs.Timestamp)) require.Equal(t, l2Parent.Time+cfg.BlockTime, uint64(attrs.Timestamp))
require.Equal(t, eth.Bytes32(l1Info.InfoMixDigest), attrs.PrevRandao) require.Equal(t, eth.Bytes32(l1Info.InfoMixDigest), attrs.PrevRandao)
require.Equal(t, cfg.FeeRecipientAddress, attrs.SuggestedFeeRecipient) require.Equal(t, predeploys.SequencerFeeVaultAddr, attrs.SuggestedFeeRecipient)
require.Equal(t, 1, len(attrs.Transactions)) require.Equal(t, 1, len(attrs.Transactions))
require.Equal(t, l1InfoTx, []byte(attrs.Transactions[0])) require.Equal(t, l1InfoTx, []byte(attrs.Transactions[0]))
require.True(t, attrs.NoTxPool) require.True(t, attrs.NoTxPool)
...@@ -136,7 +136,7 @@ func TestPreparePayloadAttributes(t *testing.T) { ...@@ -136,7 +136,7 @@ func TestPreparePayloadAttributes(t *testing.T) {
require.NotNil(t, attrs) require.NotNil(t, attrs)
require.Equal(t, l2Parent.Time+cfg.BlockTime, uint64(attrs.Timestamp)) require.Equal(t, l2Parent.Time+cfg.BlockTime, uint64(attrs.Timestamp))
require.Equal(t, eth.Bytes32(l1Info.InfoMixDigest), attrs.PrevRandao) require.Equal(t, eth.Bytes32(l1Info.InfoMixDigest), attrs.PrevRandao)
require.Equal(t, cfg.FeeRecipientAddress, attrs.SuggestedFeeRecipient) require.Equal(t, predeploys.SequencerFeeVaultAddr, attrs.SuggestedFeeRecipient)
require.Equal(t, len(l2Txs), len(attrs.Transactions), "Expected txs to equal l1 info tx + user deposit txs") require.Equal(t, len(l2Txs), len(attrs.Transactions), "Expected txs to equal l1 info tx + user deposit txs")
require.Equal(t, l2Txs, attrs.Transactions) require.Equal(t, l2Txs, attrs.Transactions)
require.True(t, attrs.NoTxPool) require.True(t, attrs.NoTxPool)
...@@ -161,7 +161,7 @@ func TestPreparePayloadAttributes(t *testing.T) { ...@@ -161,7 +161,7 @@ func TestPreparePayloadAttributes(t *testing.T) {
require.NotNil(t, attrs) require.NotNil(t, attrs)
require.Equal(t, l2Parent.Time+cfg.BlockTime, uint64(attrs.Timestamp)) require.Equal(t, l2Parent.Time+cfg.BlockTime, uint64(attrs.Timestamp))
require.Equal(t, eth.Bytes32(l1Info.InfoMixDigest), attrs.PrevRandao) require.Equal(t, eth.Bytes32(l1Info.InfoMixDigest), attrs.PrevRandao)
require.Equal(t, cfg.FeeRecipientAddress, attrs.SuggestedFeeRecipient) require.Equal(t, predeploys.SequencerFeeVaultAddr, attrs.SuggestedFeeRecipient)
require.Equal(t, 1, len(attrs.Transactions)) require.Equal(t, 1, len(attrs.Transactions))
require.Equal(t, l1InfoTx, []byte(attrs.Transactions[0])) require.Equal(t, l1InfoTx, []byte(attrs.Transactions[0]))
require.True(t, attrs.NoTxPool) require.True(t, attrs.NoTxPool)
......
...@@ -45,8 +45,6 @@ type Config struct { ...@@ -45,8 +45,6 @@ type Config struct {
// Note: below addresses are part of the block-derivation process, // Note: below addresses are part of the block-derivation process,
// and required to be the same network-wide to stay in consensus. // and required to be the same network-wide to stay in consensus.
// L2 address used to send all priority fees to, also known as the coinbase address in the block.
FeeRecipientAddress common.Address `json:"fee_recipient_address"`
// L1 address that batches are sent to. // L1 address that batches are sent to.
BatchInboxAddress common.Address `json:"batch_inbox_address"` BatchInboxAddress common.Address `json:"batch_inbox_address"`
// Acceptable batch-sender address // Acceptable batch-sender address
...@@ -81,9 +79,6 @@ func (cfg *Config) Check() error { ...@@ -81,9 +79,6 @@ func (cfg *Config) Check() error {
if cfg.P2PSequencerAddress == (common.Address{}) { if cfg.P2PSequencerAddress == (common.Address{}) {
return errors.New("missing p2p sequencer address") return errors.New("missing p2p sequencer address")
} }
if cfg.FeeRecipientAddress == (common.Address{}) {
return errors.New("missing fee recipient address")
}
if cfg.BatchInboxAddress == (common.Address{}) { if cfg.BatchInboxAddress == (common.Address{}) {
return errors.New("missing batch inbox address") return errors.New("missing batch inbox address")
} }
......
...@@ -32,7 +32,6 @@ func randConfig() *Config { ...@@ -32,7 +32,6 @@ func randConfig() *Config {
MaxSequencerDrift: 100, MaxSequencerDrift: 100,
SeqWindowSize: 2, SeqWindowSize: 2,
L1ChainID: big.NewInt(900), L1ChainID: big.NewInt(900),
FeeRecipientAddress: randAddr(),
BatchInboxAddress: randAddr(), BatchInboxAddress: randAddr(),
BatchSenderAddress: randAddr(), BatchSenderAddress: randAddr(),
} }
......
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
"sequencerWindowSize": 4, "sequencerWindowSize": 4,
"channelTimeout": 40, "channelTimeout": 40,
"p2pSequencerAddress": "0x9965507D1a55bcC2695C58ba16FB37d819B0A4dc", "p2pSequencerAddress": "0x9965507D1a55bcC2695C58ba16FB37d819B0A4dc",
"optimismL2FeeRecipient": "0xd9c09e21b57c98e58a80552c170989b426766aa7",
"batchInboxAddress": "0xff00000000000000000000000000000000000000", "batchInboxAddress": "0xff00000000000000000000000000000000000000",
"batchSenderAddress": "0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC", "batchSenderAddress": "0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC",
......
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
"sequencerWindowSize": 120, "sequencerWindowSize": 120,
"channelTimeout": 120, "channelTimeout": 120,
"p2pSequencerAddress": "0x9965507D1a55bcC2695C58ba16FB37d819B0A4dc", "p2pSequencerAddress": "0x9965507D1a55bcC2695C58ba16FB37d819B0A4dc",
"optimismL2FeeRecipient": "0x26862c200bd48c19f39d9e1cd88a3b439611d911",
"batchInboxAddress": "0xff00000000000000000000000000000000000002", "batchInboxAddress": "0xff00000000000000000000000000000000000002",
"batchSenderAddress": "0xa11d2b908470e17923fff184d48269bebbd9b2a5", "batchSenderAddress": "0xa11d2b908470e17923fff184d48269bebbd9b2a5",
......
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
"sequencerWindowSize": 4, "sequencerWindowSize": 4,
"channelTimeout": 40, "channelTimeout": 40,
"p2pSequencerAddress": "0x9965507D1a55bcC2695C58ba16FB37d819B0A4dc", "p2pSequencerAddress": "0x9965507D1a55bcC2695C58ba16FB37d819B0A4dc",
"optimismL2FeeRecipient": "0xd9c09e21b57c98e58a80552c170989b426766aa7",
"batchInboxAddress": "0xff00000000000000000000000000000000000000", "batchInboxAddress": "0xff00000000000000000000000000000000000000",
"batchSenderAddress": "0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC", "batchSenderAddress": "0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC",
......
...@@ -13,8 +13,7 @@ const deployFn: DeployFunction = async (hre) => { ...@@ -13,8 +13,7 @@ const deployFn: DeployFunction = async (hre) => {
) )
await deployAndVerifyAndThen({ await deployAndVerifyAndThen({
hre, hre,
name: 'L1CrossDomainMessengerImpl', name: 'L1CrossDomainMessenger',
contract: 'L1CrossDomainMessenger',
args: [OptimismPortalProxy.address], args: [OptimismPortalProxy.address],
postDeployAction: async (contract) => { postDeployAction: async (contract) => {
await assertContractVariable( await assertContractVariable(
......
...@@ -14,8 +14,7 @@ const deployFn: DeployFunction = async (hre) => { ...@@ -14,8 +14,7 @@ const deployFn: DeployFunction = async (hre) => {
) )
await deployAndVerifyAndThen({ await deployAndVerifyAndThen({
hre, hre,
name: 'L1StandardBridgeImpl', name: 'L1StandardBridge',
contract: 'L1StandardBridge',
args: [L1CrossDomainMessengerProxy.address], args: [L1CrossDomainMessengerProxy.address],
postDeployAction: async (contract) => { postDeployAction: async (contract) => {
await assertContractVariable( await assertContractVariable(
......
...@@ -2,6 +2,8 @@ import assert from 'assert' ...@@ -2,6 +2,8 @@ import assert from 'assert'
import { ethers } from 'ethers' import { ethers } from 'ethers'
import { DeployFunction } from 'hardhat-deploy/dist/types' import { DeployFunction } from 'hardhat-deploy/dist/types'
import '@eth-optimism/hardhat-deploy-config'
import '@nomiclabs/hardhat-ethers'
import { import {
assertContractVariable, assertContractVariable,
...@@ -26,8 +28,7 @@ const deployFn: DeployFunction = async (hre) => { ...@@ -26,8 +28,7 @@ const deployFn: DeployFunction = async (hre) => {
await deployAndVerifyAndThen({ await deployAndVerifyAndThen({
hre, hre,
name: 'L2OutputOracleImpl', name: 'L2OutputOracle',
contract: 'L2OutputOracle',
args: [ args: [
hre.deployConfig.l2OutputOracleSubmissionInterval, hre.deployConfig.l2OutputOracleSubmissionInterval,
hre.deployConfig.l2OutputOracleGenesisL2Output, hre.deployConfig.l2OutputOracleGenesisL2Output,
......
import { DeployFunction } from 'hardhat-deploy/dist/types' import { DeployFunction } from 'hardhat-deploy/dist/types'
import '@eth-optimism/hardhat-deploy-config'
import { import {
assertContractVariable, assertContractVariable,
...@@ -13,8 +14,7 @@ const deployFn: DeployFunction = async (hre) => { ...@@ -13,8 +14,7 @@ const deployFn: DeployFunction = async (hre) => {
) )
await deployAndVerifyAndThen({ await deployAndVerifyAndThen({
hre, hre,
name: 'OptimismPortalImpl', name: 'OptimismPortal',
contract: 'OptimismPortal',
args: [ args: [
L2OutputOracleProxy.address, L2OutputOracleProxy.address,
hre.deployConfig.finalizationPeriodSeconds, hre.deployConfig.finalizationPeriodSeconds,
......
...@@ -13,8 +13,7 @@ const deployFn: DeployFunction = async (hre) => { ...@@ -13,8 +13,7 @@ const deployFn: DeployFunction = async (hre) => {
) )
await deployAndVerifyAndThen({ await deployAndVerifyAndThen({
hre, hre,
name: 'OptimismMintableERC20FactoryImpl', name: 'OptimismMintableERC20Factory',
contract: 'OptimismMintableERC20Factory',
args: [L1StandardBridgeProxy.address], args: [L1StandardBridgeProxy.address],
postDeployAction: async (contract) => { postDeployAction: async (contract) => {
await assertContractVariable( await assertContractVariable(
......
...@@ -14,8 +14,7 @@ const deployFn: DeployFunction = async (hre) => { ...@@ -14,8 +14,7 @@ const deployFn: DeployFunction = async (hre) => {
) )
await deployAndVerifyAndThen({ await deployAndVerifyAndThen({
hre, hre,
name: 'L1ERC721BridgeImpl', name: 'L1ERC721Bridge',
contract: 'L1ERC721Bridge',
args: [L1CrossDomainMessengerProxy.address, predeploys.L2ERC721Bridge], args: [L1CrossDomainMessengerProxy.address, predeploys.L2ERC721Bridge],
postDeployAction: async (contract) => { postDeployAction: async (contract) => {
await assertContractVariable( await assertContractVariable(
......
...@@ -13,8 +13,7 @@ const deployFn: DeployFunction = async (hre) => { ...@@ -13,8 +13,7 @@ const deployFn: DeployFunction = async (hre) => {
) )
await deployAndVerifyAndThen({ await deployAndVerifyAndThen({
hre, hre,
name: 'PortalSenderImpl', name: 'PortalSender',
contract: 'PortalSender',
args: [OptimismPortalProxy.address], args: [OptimismPortalProxy.address],
postDeployAction: async (contract) => { postDeployAction: async (contract) => {
await assertContractVariable( await assertContractVariable(
......
import { DeployFunction } from 'hardhat-deploy/dist/types' import { DeployFunction } from 'hardhat-deploy/dist/types'
import '@eth-optimism/hardhat-deploy-config'
import 'hardhat-deploy'
import { import {
getDeploymentAddress, getDeploymentAddress,
...@@ -46,31 +48,22 @@ const deployFn: DeployFunction = async (hre) => { ...@@ -46,31 +48,22 @@ const deployFn: DeployFunction = async (hre) => {
), ),
}, },
implementationAddressConfig: { implementationAddressConfig: {
l2OutputOracleImpl: await getDeploymentAddress( l2OutputOracleImpl: await getDeploymentAddress(hre, 'L2OutputOracle'),
hre, optimismPortalImpl: await getDeploymentAddress(hre, 'OptimismPortal'),
'L2OutputOracleImpl'
),
optimismPortalImpl: await getDeploymentAddress(
hre,
'OptimismPortalImpl'
),
l1CrossDomainMessengerImpl: await getDeploymentAddress( l1CrossDomainMessengerImpl: await getDeploymentAddress(
hre, hre,
'L1CrossDomainMessengerImpl' 'L1CrossDomainMessenger'
), ),
l1StandardBridgeImpl: await getDeploymentAddress( l1StandardBridgeImpl: await getDeploymentAddress(
hre, hre,
'L1StandardBridgeImpl' 'L1StandardBridge'
), ),
optimismMintableERC20FactoryImpl: await getDeploymentAddress( optimismMintableERC20FactoryImpl: await getDeploymentAddress(
hre, hre,
'OptimismMintableERC20FactoryImpl' 'OptimismMintableERC20Factory'
),
l1ERC721BridgeImpl: await getDeploymentAddress(
hre,
'L1ERC721BridgeImpl'
), ),
portalSenderImpl: await getDeploymentAddress(hre, 'PortalSenderImpl'), l1ERC721BridgeImpl: await getDeploymentAddress(hre, 'L1ERC721Bridge'),
portalSenderImpl: await getDeploymentAddress(hre, 'PortalSender'),
}, },
l2OutputOracleConfig: { l2OutputOracleConfig: {
l2OutputOracleGenesisL2Output: l2OutputOracleGenesisL2Output:
......
import { awaitCondition } from '@eth-optimism/core-utils' import { awaitCondition } from '@eth-optimism/core-utils'
import { ethers } from 'ethers' import { ethers } from 'ethers'
import { DeployFunction } from 'hardhat-deploy/dist/types' import { DeployFunction } from 'hardhat-deploy/dist/types'
import '@eth-optimism/hardhat-deploy-config'
import 'hardhat-deploy'
import { import {
getDeploymentAddress, getDeploymentAddress,
...@@ -69,31 +71,22 @@ const deployFn: DeployFunction = async (hre) => { ...@@ -69,31 +71,22 @@ const deployFn: DeployFunction = async (hre) => {
), ),
}, },
implementationAddressConfig: { implementationAddressConfig: {
l2OutputOracleImpl: await getDeploymentAddress( l2OutputOracleImpl: await getDeploymentAddress(hre, 'L2OutputOracle'),
hre, optimismPortalImpl: await getDeploymentAddress(hre, 'OptimismPortal'),
'L2OutputOracleImpl'
),
optimismPortalImpl: await getDeploymentAddress(
hre,
'OptimismPortalImpl'
),
l1CrossDomainMessengerImpl: await getDeploymentAddress( l1CrossDomainMessengerImpl: await getDeploymentAddress(
hre, hre,
'L1CrossDomainMessengerImpl' 'L1CrossDomainMessenger'
), ),
l1StandardBridgeImpl: await getDeploymentAddress( l1StandardBridgeImpl: await getDeploymentAddress(
hre, hre,
'L1StandardBridgeImpl' 'L1StandardBridge'
), ),
optimismMintableERC20FactoryImpl: await getDeploymentAddress( optimismMintableERC20FactoryImpl: await getDeploymentAddress(
hre, hre,
'OptimismMintableERC20FactoryImpl' 'OptimismMintableERC20Factory'
),
l1ERC721BridgeImpl: await getDeploymentAddress(
hre,
'L1ERC721BridgeImpl'
), ),
portalSenderImpl: await getDeploymentAddress(hre, 'PortalSenderImpl'), l1ERC721BridgeImpl: await getDeploymentAddress(hre, 'L1ERC721Bridge'),
portalSenderImpl: await getDeploymentAddress(hre, 'PortalSender'),
}, },
l2OutputOracleConfig: { l2OutputOracleConfig: {
l2OutputOracleGenesisL2Output: l2OutputOracleGenesisL2Output:
......
import { ethers } from 'ethers' import { ethers } from 'ethers'
import { HardhatUserConfig, task, subtask } from 'hardhat/config' import { HardhatUserConfig } from 'hardhat/config'
import { TASK_COMPILE_SOLIDITY_GET_SOURCE_PATHS } from 'hardhat/builtin-tasks/task-names'
// Hardhat plugins // Hardhat plugins
import '@eth-optimism/hardhat-deploy-config' import '@eth-optimism/hardhat-deploy-config'
...@@ -11,22 +10,6 @@ import 'hardhat-deploy' ...@@ -11,22 +10,6 @@ import 'hardhat-deploy'
// Hardhat tasks // Hardhat tasks
import './tasks' import './tasks'
subtask(TASK_COMPILE_SOLIDITY_GET_SOURCE_PATHS).setAction(
async (_, __, runSuper) => {
const paths = await runSuper()
return paths.filter((p: string) => !p.endsWith('.t.sol'))
}
)
task('accounts', 'Prints the list of accounts', async (_, hre) => {
const accounts = await hre.ethers.getSigners()
for (const account of accounts) {
console.log(account.address)
}
})
const config: HardhatUserConfig = { const config: HardhatUserConfig = {
networks: { networks: {
devnetL1: { devnetL1: {
...@@ -150,11 +133,6 @@ const config: HardhatUserConfig = { ...@@ -150,11 +133,6 @@ const config: HardhatUserConfig = {
p2pSequencerAddress: { p2pSequencerAddress: {
type: 'address', type: 'address',
}, },
// L2 address used to send all priority fees to, also known as the coinbase address in the block.
// "fee_recipient_address" in rollup config.
optimismL2FeeRecipient: {
type: 'address',
},
// L1 address that batches are sent to. // L1 address that batches are sent to.
// "batch_inbox_address" in rollup config. // "batch_inbox_address" in rollup config.
batchInboxAddress: { batchInboxAddress: {
......
import { task } from 'hardhat/config'
import '@nomiclabs/hardhat-ethers'
task('accounts', 'Prints the list of accounts', async (_, hre) => {
const accounts = await hre.ethers.getSigners()
for (const account of accounts) {
console.log(account.address)
}
})
...@@ -6,3 +6,5 @@ import './check-l2-config' ...@@ -6,3 +6,5 @@ import './check-l2-config'
import './watch' import './watch'
import './forge-verify' import './forge-verify'
import './validate-spacers' import './validate-spacers'
import './solidity'
import './accounts'
...@@ -11,7 +11,6 @@ task('rekey', 'Generates a new set of keys for a test network').setAction( ...@@ -11,7 +11,6 @@ task('rekey', 'Generates a new set of keys for a test network').setAction(
'proxyAdminOwner', 'proxyAdminOwner',
'optimismBaseFeeRecipient', 'optimismBaseFeeRecipient',
'optimismL1FeeRecipient', 'optimismL1FeeRecipient',
'optimismL2FeeRecipient',
'p2pSequencerAddress', 'p2pSequencerAddress',
'l2OutputOracleOwner', 'l2OutputOracleOwner',
'batchSenderAddress', 'batchSenderAddress',
......
...@@ -65,7 +65,6 @@ task('rollup-config', 'create a genesis config') ...@@ -65,7 +65,6 @@ task('rollup-config', 'create a genesis config')
l2_chain_id: deployConfig.l2ChainID, l2_chain_id: deployConfig.l2ChainID,
p2p_sequencer_address: deployConfig.p2pSequencerAddress, p2p_sequencer_address: deployConfig.p2pSequencerAddress,
fee_recipient_address: deployConfig.optimismL2FeeRecipient,
batch_inbox_address: deployConfig.batchInboxAddress, batch_inbox_address: deployConfig.batchInboxAddress,
batch_sender_address: deployConfig.batchSenderAddress, batch_sender_address: deployConfig.batchSenderAddress,
deposit_contract_address: portal.address, deposit_contract_address: portal.address,
......
import { subtask } from 'hardhat/config'
import { TASK_COMPILE_SOLIDITY_GET_SOURCE_PATHS } from 'hardhat/builtin-tasks/task-names'
subtask(TASK_COMPILE_SOLIDITY_GET_SOURCE_PATHS).setAction(
async (_, __, runSuper) => {
const paths = await runSuper()
return paths.filter((p: string) => !p.endsWith('.t.sol'))
}
)
...@@ -35,7 +35,8 @@ contract StateCommitmentChain is IStateCommitmentChain, Lib_AddressResolver { ...@@ -35,7 +35,8 @@ contract StateCommitmentChain is IStateCommitmentChain, Lib_AddressResolver {
/** /**
* @param _libAddressManager Address of the Address Manager. * @param _libAddressManager Address of the Address Manager.
* @param _fraudProofWindow Number of seconds until fraud proof is in the finalized state. * @param _fraudProofWindow Number of seconds until fraud proof is in the finalized state.
* @param _sequencerPublishWindow Number of seconds that the sequencer is exclusively allowed to post state roots. * @param _sequencerPublishWindow Number of seconds that the sequencer is exclusively allowed
* to post state roots.
*/ */
constructor( constructor(
address _libAddressManager, address _libAddressManager,
......
...@@ -352,8 +352,8 @@ Allows the Burn Admin to update the parameters which determine the amount of gas ...@@ -352,8 +352,8 @@ Allows the Burn Admin to update the parameters which determine the amount of gas
| Name | Type | Description | | Name | Type | Description |
|---|---|---| |---|---|---|
| _l2GasDiscountDivisor | uint256 | undefined | _l2GasDiscountDivisor | uint256 | The ratio of the cost of L1 gas to the cost of L2 gas
| _enqueueGasCost | uint256 | undefined | _enqueueGasCost | uint256 | The approximate cost of calling the enqueue function
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
function isCollateralized(address _who) external view returns (bool) function isCollateralized(address _who) external view returns (bool)
``` ```
Checks whether a given address is properly collateralized and can perform actions within the system.
...@@ -24,13 +24,13 @@ function isCollateralized(address _who) external view returns (bool) ...@@ -24,13 +24,13 @@ function isCollateralized(address _who) external view returns (bool)
| Name | Type | Description | | Name | Type | Description |
|---|---|---| |---|---|---|
| _who | address | undefined | _who | address | Address to check.
#### Returns #### Returns
| Name | Type | Description | | Name | Type | Description |
|---|---|---| |---|---|---|
| _0 | bool | undefined | _0 | bool | true if the address is properly collateralized, false otherwise.
......
...@@ -63,8 +63,8 @@ function withdraw(address _l2Token, uint256 _amount, uint32 _l1Gas, bytes _data) ...@@ -63,8 +63,8 @@ function withdraw(address _l2Token, uint256 _amount, uint32 _l1Gas, bytes _data)
| Name | Type | Description | | Name | Type | Description |
|---|---|---| |---|---|---|
| _l2Token | address | Address of L2 token where withdrawal was initiated. | _l2Token | address | Address of L2 token where withdrawal was initiated.
| _amount | uint256 | Amount of the token to withdraw. param _l1Gas Unused, but included for potential forward compatibility considerations. | _amount | uint256 | Amount of the token to withdraw.
| _l1Gas | uint32 | undefined | _l1Gas | uint32 | Unused, but included for potential forward compatibility considerations.
| _data | bytes | Optional data to forward to L1. This data is provided solely as a convenience for external contracts. Aside from enforcing a maximum length, these contracts provide no guarantees about its content. | _data | bytes | Optional data to forward to L1. This data is provided solely as a convenience for external contracts. Aside from enforcing a maximum length, these contracts provide no guarantees about its content.
### withdrawTo ### withdrawTo
...@@ -83,8 +83,8 @@ function withdrawTo(address _l2Token, address _to, uint256 _amount, uint32 _l1Ga ...@@ -83,8 +83,8 @@ function withdrawTo(address _l2Token, address _to, uint256 _amount, uint32 _l1Ga
|---|---|---| |---|---|---|
| _l2Token | address | Address of L2 token where withdrawal is initiated. | _l2Token | address | Address of L2 token where withdrawal is initiated.
| _to | address | L1 adress to credit the withdrawal to. | _to | address | L1 adress to credit the withdrawal to.
| _amount | uint256 | Amount of the token to withdraw. param _l1Gas Unused, but included for potential forward compatibility considerations. | _amount | uint256 | Amount of the token to withdraw.
| _l1Gas | uint32 | undefined | _l1Gas | uint32 | Unused, but included for potential forward compatibility considerations.
| _data | bytes | Optional data to forward to L1. This data is provided solely as a convenience for external contracts. Aside from enforcing a maximum length, these contracts provide no guarantees about its content. | _data | bytes | Optional data to forward to L1. This data is provided solely as a convenience for external contracts. Aside from enforcing a maximum length, these contracts provide no guarantees about its content.
......
...@@ -138,7 +138,7 @@ Verifies a batch inclusion proof. ...@@ -138,7 +138,7 @@ Verifies a batch inclusion proof.
| Name | Type | Description | | Name | Type | Description |
|---|---|---| |---|---|---|
| _verified | bool | undefined | _verified | bool | Whether or not the batch inclusion proof is verified.
......
...@@ -80,8 +80,8 @@ function withdraw(address _l2Token, uint256 _amount, uint32 _l1Gas, bytes _data) ...@@ -80,8 +80,8 @@ function withdraw(address _l2Token, uint256 _amount, uint32 _l1Gas, bytes _data)
| Name | Type | Description | | Name | Type | Description |
|---|---|---| |---|---|---|
| _l2Token | address | Address of L2 token where withdrawal was initiated. | _l2Token | address | Address of L2 token where withdrawal was initiated.
| _amount | uint256 | Amount of the token to withdraw. param _l1Gas Unused, but included for potential forward compatibility considerations. | _amount | uint256 | Amount of the token to withdraw.
| _l1Gas | uint32 | undefined | _l1Gas | uint32 | Unused, but included for potential forward compatibility considerations.
| _data | bytes | Optional data to forward to L1. This data is provided solely as a convenience for external contracts. Aside from enforcing a maximum length, these contracts provide no guarantees about its content. | _data | bytes | Optional data to forward to L1. This data is provided solely as a convenience for external contracts. Aside from enforcing a maximum length, these contracts provide no guarantees about its content.
### withdrawTo ### withdrawTo
...@@ -100,8 +100,8 @@ function withdrawTo(address _l2Token, address _to, uint256 _amount, uint32 _l1Ga ...@@ -100,8 +100,8 @@ function withdrawTo(address _l2Token, address _to, uint256 _amount, uint32 _l1Ga
|---|---|---| |---|---|---|
| _l2Token | address | Address of L2 token where withdrawal is initiated. | _l2Token | address | Address of L2 token where withdrawal is initiated.
| _to | address | L1 adress to credit the withdrawal to. | _to | address | L1 adress to credit the withdrawal to.
| _amount | uint256 | Amount of the token to withdraw. param _l1Gas Unused, but included for potential forward compatibility considerations. | _amount | uint256 | Amount of the token to withdraw.
| _l1Gas | uint32 | undefined | _l1Gas | uint32 | Unused, but included for potential forward compatibility considerations.
| _data | bytes | Optional data to forward to L1. This data is provided solely as a convenience for external contracts. Aside from enforcing a maximum length, these contracts provide no guarantees about its content. | _data | bytes | Optional data to forward to L1. This data is provided solely as a convenience for external contracts. Aside from enforcing a maximum length, these contracts provide no guarantees about its content.
......
...@@ -228,7 +228,7 @@ Verifies a batch inclusion proof. ...@@ -228,7 +228,7 @@ Verifies a batch inclusion proof.
| Name | Type | Description | | Name | Type | Description |
|---|---|---| |---|---|---|
| _0 | bool | undefined | _0 | bool | Whether or not the batch inclusion proof is verified.
......
...@@ -25,7 +25,7 @@ function getL1BlockNumber() external view returns (uint256) ...@@ -25,7 +25,7 @@ function getL1BlockNumber() external view returns (uint256)
| Name | Type | Description | | Name | Type | Description |
|---|---|---| |---|---|---|
| _0 | uint256 | undefined | _0 | uint256 | Block number of L1
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
function passMessageToL1(bytes _message) external nonpayable function passMessageToL1(bytes _message) external nonpayable
``` ```
Passes a message to L1.
...@@ -24,7 +24,7 @@ function passMessageToL1(bytes _message) external nonpayable ...@@ -24,7 +24,7 @@ function passMessageToL1(bytes _message) external nonpayable
| Name | Type | Description | | Name | Type | Description |
|---|---|---| |---|---|---|
| _message | bytes | undefined | _message | bytes | Message to pass to L1.
......
...@@ -17,7 +17,6 @@ export interface OpNodeConfig { ...@@ -17,7 +17,6 @@ export interface OpNodeConfig {
l1_chain_id: number l1_chain_id: number
l2_chain_id: number l2_chain_id: number
p2p_sequencer_address: string p2p_sequencer_address: string
fee_recipient_address: string
batch_inbox_address: string batch_inbox_address: string
batch_sender_address: string batch_sender_address: string
deposit_contract_address: string deposit_contract_address: string
......
...@@ -32,8 +32,10 @@ const deployWETH9 = async ( ...@@ -32,8 +32,10 @@ const deployWETH9 = async (
signer signer
) )
console.log('Sending deployment transaction')
const WETH9 = await Factory__WETH9.deploy() const WETH9 = await Factory__WETH9.deploy()
await WETH9.deployTransaction.wait() const receipt = await WETH9.deployTransaction.wait()
console.log(`WETH9 deployed: ${receipt.transactionHash}`)
if (wrap) { if (wrap) {
const deposit = await signer.sendTransaction({ const deposit = await signer.sendTransaction({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment