Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
b824f9bc
Unverified
Commit
b824f9bc
authored
Nov 20, 2024
by
protolambda
Committed by
GitHub
Nov 19, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
op-chain-ops: remove L1 clique option (#12977)
parent
d2df40a5
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
17 additions
and
54 deletions
+17
-54
config.go
op-chain-ops/genesis/config.go
+0
-6
genesis.go
op-chain-ops/genesis/genesis.go
+8
-22
test-deploy-config-full.json
op-chain-ops/genesis/testdata/test-deploy-config-full.json
+0
-2
init.go
op-e2e/config/init.go
+0
-3
secrets.go
op-e2e/e2eutils/secrets.go
+8
-18
cheat.go
op-wheel/cheat/cheat.go
+1
-1
sepolia-devnet-0.json
...ges/contracts-bedrock/deploy-config/sepolia-devnet-0.json
+0
-2
No files found.
op-chain-ops/genesis/config.go
View file @
b824f9bc
...
@@ -854,12 +854,6 @@ func (d *L1DependenciesConfig) CheckAddresses(dependencyContext DependencyContex
...
@@ -854,12 +854,6 @@ func (d *L1DependenciesConfig) CheckAddresses(dependencyContext DependencyContex
// The genesis generation may log warnings, do a best-effort support attempt,
// The genesis generation may log warnings, do a best-effort support attempt,
// or ignore these attributes completely.
// or ignore these attributes completely.
type
LegacyDeployConfig
struct
{
type
LegacyDeployConfig
struct
{
// CliqueSignerAddress represents the signer address for the clique consensus engine.
// It is used in the multi-process devnet to sign blocks.
CliqueSignerAddress
common
.
Address
`json:"cliqueSignerAddress"`
// L1UseClique represents whether or not to use the clique consensus engine.
L1UseClique
bool
`json:"l1UseClique"`
// DeploymentWaitConfirmations is the number of confirmations to wait during
// DeploymentWaitConfirmations is the number of confirmations to wait during
// deployment. This is DEPRECATED and should be removed in a future PR.
// deployment. This is DEPRECATED and should be removed in a future PR.
DeploymentWaitConfirmations
int
`json:"deploymentWaitConfirmations"`
DeploymentWaitConfirmations
int
`json:"deploymentWaitConfirmations"`
...
...
op-chain-ops/genesis/genesis.go
View file @
b824f9bc
...
@@ -11,7 +11,6 @@ import (
...
@@ -11,7 +11,6 @@ import (
"github.com/ethereum/go-ethereum/consensus/misc/eip1559"
"github.com/ethereum/go-ethereum/consensus/misc/eip1559"
"github.com/ethereum/go-ethereum/core"
"github.com/ethereum/go-ethereum/core"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/params"
"github.com/ethereum/go-ethereum/params"
)
)
...
@@ -141,25 +140,12 @@ func NewL1Genesis(config *DeployConfig) (*core.Genesis, error) {
...
@@ -141,25 +140,12 @@ func NewL1Genesis(config *DeployConfig) (*core.Genesis, error) {
LondonBlock
:
big
.
NewInt
(
0
),
LondonBlock
:
big
.
NewInt
(
0
),
ArrowGlacierBlock
:
big
.
NewInt
(
0
),
ArrowGlacierBlock
:
big
.
NewInt
(
0
),
GrayGlacierBlock
:
big
.
NewInt
(
0
),
GrayGlacierBlock
:
big
.
NewInt
(
0
),
ShanghaiTime
:
nil
,
ShanghaiTime
:
u64ptr
(
0
),
CancunTime
:
nil
,
CancunTime
:
u64ptr
(
0
),
}
// To enable post-Merge consensus at genesis
MergeNetsplitBlock
:
big
.
NewInt
(
0
),
extraData
:=
make
([]
byte
,
0
)
TerminalTotalDifficulty
:
big
.
NewInt
(
0
),
if
config
.
L1UseClique
{
TerminalTotalDifficultyPassed
:
true
,
// warning: clique has an overly strict block header timestamp check against the system wallclock,
// causing blocks to get scheduled as "future block" and not get mined instantly when produced.
chainConfig
.
Clique
=
&
params
.
CliqueConfig
{
Period
:
config
.
L1BlockTime
,
Epoch
:
30000
,
}
extraData
=
append
(
append
(
make
([]
byte
,
32
),
config
.
CliqueSignerAddress
[
:
]
...
),
make
([]
byte
,
crypto
.
SignatureLength
)
...
)
}
else
{
chainConfig
.
MergeNetsplitBlock
=
big
.
NewInt
(
0
)
chainConfig
.
TerminalTotalDifficulty
=
big
.
NewInt
(
0
)
chainConfig
.
TerminalTotalDifficultyPassed
=
true
chainConfig
.
ShanghaiTime
=
u64ptr
(
0
)
chainConfig
.
CancunTime
=
u64ptr
(
0
)
}
}
gasLimit
:=
config
.
L1GenesisBlockGasLimit
gasLimit
:=
config
.
L1GenesisBlockGasLimit
...
@@ -178,7 +164,7 @@ func NewL1Genesis(config *DeployConfig) (*core.Genesis, error) {
...
@@ -178,7 +164,7 @@ func NewL1Genesis(config *DeployConfig) (*core.Genesis, error) {
if
timestamp
==
0
{
if
timestamp
==
0
{
timestamp
=
hexutil
.
Uint64
(
time
.
Now
()
.
Unix
())
timestamp
=
hexutil
.
Uint64
(
time
.
Now
()
.
Unix
())
}
}
if
!
config
.
L1UseClique
&&
config
.
L1CancunTimeOffset
!=
nil
{
if
config
.
L1CancunTimeOffset
!=
nil
{
cancunTime
:=
uint64
(
timestamp
)
+
uint64
(
*
config
.
L1CancunTimeOffset
)
cancunTime
:=
uint64
(
timestamp
)
+
uint64
(
*
config
.
L1CancunTimeOffset
)
chainConfig
.
CancunTime
=
&
cancunTime
chainConfig
.
CancunTime
=
&
cancunTime
}
}
...
@@ -187,7 +173,7 @@ func NewL1Genesis(config *DeployConfig) (*core.Genesis, error) {
...
@@ -187,7 +173,7 @@ func NewL1Genesis(config *DeployConfig) (*core.Genesis, error) {
Config
:
&
chainConfig
,
Config
:
&
chainConfig
,
Nonce
:
uint64
(
config
.
L1GenesisBlockNonce
),
Nonce
:
uint64
(
config
.
L1GenesisBlockNonce
),
Timestamp
:
uint64
(
timestamp
),
Timestamp
:
uint64
(
timestamp
),
ExtraData
:
extraData
,
ExtraData
:
make
([]
byte
,
0
)
,
GasLimit
:
uint64
(
gasLimit
),
GasLimit
:
uint64
(
gasLimit
),
Difficulty
:
difficulty
.
ToInt
(),
Difficulty
:
difficulty
.
ToInt
(),
Mixhash
:
config
.
L1GenesisBlockMixHash
,
Mixhash
:
config
.
L1GenesisBlockMixHash
,
...
...
op-chain-ops/genesis/testdata/test-deploy-config-full.json
View file @
b824f9bc
...
@@ -6,8 +6,6 @@
...
@@ -6,8 +6,6 @@
"maxSequencerDrift"
:
20
,
"maxSequencerDrift"
:
20
,
"sequencerWindowSize"
:
100
,
"sequencerWindowSize"
:
100
,
"channelTimeout"
:
30
,
"channelTimeout"
:
30
,
"l1UseClique"
:
false
,
"cliqueSignerAddress"
:
"0x0000000000000000000000000000000000000000"
,
"customGasTokenAddress"
:
"0x0000000000000000000000000000000000000000"
,
"customGasTokenAddress"
:
"0x0000000000000000000000000000000000000000"
,
"p2pSequencerAddress"
:
"0x9965507d1a55bcc2695c58ba16fb37d819b0a4dc"
,
"p2pSequencerAddress"
:
"0x9965507d1a55bcc2695c58ba16fb37d819b0a4dc"
,
"batchInboxAddress"
:
"0x42000000000000000000000000000000000000ff"
,
"batchInboxAddress"
:
"0x42000000000000000000000000000000000000ff"
,
...
...
op-e2e/config/init.go
View file @
b824f9bc
...
@@ -201,9 +201,6 @@ func initAllocType(root string, allocType AllocType) {
...
@@ -201,9 +201,6 @@ func initAllocType(root string, allocType AllocType) {
panic
(
err
)
panic
(
err
)
}
}
// Do not use clique in the in memory tests. Otherwise block building
// would be much more complex.
dc
.
L1UseClique
=
false
// Set the L1 genesis block timestamp to now
// Set the L1 genesis block timestamp to now
dc
.
L1GenesisBlockTimestamp
=
hexutil
.
Uint64
(
time
.
Now
()
.
Unix
())
dc
.
L1GenesisBlockTimestamp
=
hexutil
.
Uint64
(
time
.
Now
()
.
Unix
())
dc
.
FundDevAccounts
=
true
dc
.
FundDevAccounts
=
true
...
...
op-e2e/e2eutils/secrets.go
View file @
b824f9bc
...
@@ -20,7 +20,7 @@ const defaultHDPathPrefix = "m/44'/60'/0'/0/"
...
@@ -20,7 +20,7 @@ const defaultHDPathPrefix = "m/44'/60'/0'/0/"
// must be in sync with the values in the DeployConfig used to create the system.
// must be in sync with the values in the DeployConfig used to create the system.
var
DefaultMnemonicConfig
=
&
MnemonicConfig
{
var
DefaultMnemonicConfig
=
&
MnemonicConfig
{
Mnemonic
:
"test test test test test test test test test test test junk"
,
Mnemonic
:
"test test test test test test test test test test test junk"
,
CliqueSigner
:
"m/44'/60'/0'/0/0"
,
// Note: "m/44'/60'/0'/0/0" is a legacy mnemonic path, used for the L1 clique signer.
Proposer
:
"m/44'/60'/0'/0/1"
,
Proposer
:
"m/44'/60'/0'/0/1"
,
Batcher
:
"m/44'/60'/0'/0/2"
,
Batcher
:
"m/44'/60'/0'/0/2"
,
Deployer
:
"m/44'/60'/0'/0/3"
,
Deployer
:
"m/44'/60'/0'/0/3"
,
...
@@ -36,7 +36,6 @@ var DefaultMnemonicConfig = &MnemonicConfig{
...
@@ -36,7 +36,6 @@ var DefaultMnemonicConfig = &MnemonicConfig{
type
MnemonicConfig
struct
{
type
MnemonicConfig
struct
{
Mnemonic
string
Mnemonic
string
CliqueSigner
string
Deployer
string
Deployer
string
SysCfgOwner
string
SysCfgOwner
string
...
@@ -66,10 +65,6 @@ func (m *MnemonicConfig) Secrets() (*Secrets, error) {
...
@@ -66,10 +65,6 @@ func (m *MnemonicConfig) Secrets() (*Secrets, error) {
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
err
return
nil
,
err
}
}
cliqueSigner
,
err
:=
wallet
.
PrivateKey
(
account
(
m
.
CliqueSigner
))
if
err
!=
nil
{
return
nil
,
err
}
sysCfgOwner
,
err
:=
wallet
.
PrivateKey
(
account
(
m
.
SysCfgOwner
))
sysCfgOwner
,
err
:=
wallet
.
PrivateKey
(
account
(
m
.
SysCfgOwner
))
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
err
return
nil
,
err
...
@@ -102,7 +97,6 @@ func (m *MnemonicConfig) Secrets() (*Secrets, error) {
...
@@ -102,7 +97,6 @@ func (m *MnemonicConfig) Secrets() (*Secrets, error) {
return
&
Secrets
{
return
&
Secrets
{
Deployer
:
deployer
,
Deployer
:
deployer
,
SysCfgOwner
:
sysCfgOwner
,
SysCfgOwner
:
sysCfgOwner
,
CliqueSigner
:
cliqueSigner
,
Proposer
:
proposer
,
Proposer
:
proposer
,
Batcher
:
batcher
,
Batcher
:
batcher
,
SequencerP2P
:
sequencerP2P
,
SequencerP2P
:
sequencerP2P
,
...
@@ -116,7 +110,6 @@ func (m *MnemonicConfig) Secrets() (*Secrets, error) {
...
@@ -116,7 +110,6 @@ func (m *MnemonicConfig) Secrets() (*Secrets, error) {
// Secrets bundles secp256k1 private keys for all common rollup actors for testing purposes.
// Secrets bundles secp256k1 private keys for all common rollup actors for testing purposes.
type
Secrets
struct
{
type
Secrets
struct
{
Deployer
*
ecdsa
.
PrivateKey
Deployer
*
ecdsa
.
PrivateKey
CliqueSigner
*
ecdsa
.
PrivateKey
SysCfgOwner
*
ecdsa
.
PrivateKey
SysCfgOwner
*
ecdsa
.
PrivateKey
// rollup actors
// rollup actors
...
@@ -138,7 +131,6 @@ type Secrets struct {
...
@@ -138,7 +131,6 @@ type Secrets struct {
func
(
s
*
Secrets
)
Addresses
()
*
Addresses
{
func
(
s
*
Secrets
)
Addresses
()
*
Addresses
{
return
&
Addresses
{
return
&
Addresses
{
Deployer
:
crypto
.
PubkeyToAddress
(
s
.
Deployer
.
PublicKey
),
Deployer
:
crypto
.
PubkeyToAddress
(
s
.
Deployer
.
PublicKey
),
CliqueSigner
:
crypto
.
PubkeyToAddress
(
s
.
CliqueSigner
.
PublicKey
),
SysCfgOwner
:
crypto
.
PubkeyToAddress
(
s
.
SysCfgOwner
.
PublicKey
),
SysCfgOwner
:
crypto
.
PubkeyToAddress
(
s
.
SysCfgOwner
.
PublicKey
),
Proposer
:
crypto
.
PubkeyToAddress
(
s
.
Proposer
.
PublicKey
),
Proposer
:
crypto
.
PubkeyToAddress
(
s
.
Proposer
.
PublicKey
),
Batcher
:
crypto
.
PubkeyToAddress
(
s
.
Batcher
.
PublicKey
),
Batcher
:
crypto
.
PubkeyToAddress
(
s
.
Batcher
.
PublicKey
),
...
@@ -152,7 +144,6 @@ func (s *Secrets) Addresses() *Addresses {
...
@@ -152,7 +144,6 @@ func (s *Secrets) Addresses() *Addresses {
// Addresses bundles the addresses for all common rollup addresses for testing purposes.
// Addresses bundles the addresses for all common rollup addresses for testing purposes.
type
Addresses
struct
{
type
Addresses
struct
{
Deployer
common
.
Address
Deployer
common
.
Address
CliqueSigner
common
.
Address
SysCfgOwner
common
.
Address
SysCfgOwner
common
.
Address
// rollup actors
// rollup actors
...
@@ -169,7 +160,6 @@ type Addresses struct {
...
@@ -169,7 +160,6 @@ type Addresses struct {
func
(
a
*
Addresses
)
All
()
[]
common
.
Address
{
func
(
a
*
Addresses
)
All
()
[]
common
.
Address
{
return
[]
common
.
Address
{
return
[]
common
.
Address
{
a
.
Deployer
,
a
.
Deployer
,
a
.
CliqueSigner
,
a
.
SysCfgOwner
,
a
.
SysCfgOwner
,
a
.
Proposer
,
a
.
Proposer
,
a
.
Batcher
,
a
.
Batcher
,
...
...
op-wheel/cheat/cheat.go
View file @
b824f9bc
...
@@ -138,7 +138,7 @@ func (ch *Cheater) RunAndClose(fn HeadFn) error {
...
@@ -138,7 +138,7 @@ func (ch *Cheater) RunAndClose(fn HeadFn) error {
// Geth stores the TD for each block separately from the block itself. We must update this
// Geth stores the TD for each block separately from the block itself. We must update this
// manually, otherwise Geth thinks we haven't reached TTD yet and tries to build a block
// manually, otherwise Geth thinks we haven't reached TTD yet and tries to build a block
// using
Cliqu
e consensus, which causes a panic.
// using
pre-merg
e consensus, which causes a panic.
rawdb
.
WriteTd
(
batch
,
blockHash
,
preID
.
Number
,
ch
.
Blockchain
.
GetTd
(
preID
.
Hash
,
preID
.
Number
))
rawdb
.
WriteTd
(
batch
,
blockHash
,
preID
.
Number
,
ch
.
Blockchain
.
GetTd
(
preID
.
Hash
,
preID
.
Number
))
// Need to copy over receipts since they are keyed by block hash.
// Need to copy over receipts since they are keyed by block hash.
...
...
packages/contracts-bedrock/deploy-config/sepolia-devnet-0.json
View file @
b824f9bc
...
@@ -15,8 +15,6 @@
...
@@ -15,8 +15,6 @@
"l2OutputOracleStartingBlockNumber"
:
0
,
"l2OutputOracleStartingBlockNumber"
:
0
,
"l2OutputOracleProposer"
:
"0x95014c45078354ff839f14192228108eac82e00a"
,
"l2OutputOracleProposer"
:
"0x95014c45078354ff839f14192228108eac82e00a"
,
"l2OutputOracleChallenger"
:
"0x8c20c40180751d93e939dddee3517ae0d1ebead2"
,
"l2OutputOracleChallenger"
:
"0x8c20c40180751d93e939dddee3517ae0d1ebead2"
,
"cliqueSignerAddress"
:
"0x0000000000000000000000000000000000000000"
,
"l1UseClique"
:
false
,
"l1BlockTime"
:
12
,
"l1BlockTime"
:
12
,
"l1GenesisBlockTimestamp"
:
"0x0"
,
"l1GenesisBlockTimestamp"
:
"0x0"
,
"l1GenesisBlockNonce"
:
"0x0"
,
"l1GenesisBlockNonce"
:
"0x0"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment