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
1ae32684
Unverified
Commit
1ae32684
authored
Jun 01, 2023
by
mergify[bot]
Committed by
GitHub
Jun 01, 2023
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into refactor/invariants-hash
parents
0f91494b
85423be5
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
65 additions
and
11 deletions
+65
-11
three-colts-march.md
.changeset/three-colts-march.md
+7
-0
config.yml
.circleci/config.yml
+3
-3
main.go
op-chain-ops/cmd/rollover/main.go
+36
-5
l2_output_submitter.go
op-proposer/proposer/l2_output_submitter.go
+1
-1
AddressManager.json
...contracts-bedrock/deployments/mainnet/AddressManager.json
+0
-0
chain-constants.ts
packages/sdk/src/utils/chain-constants.ts
+18
-2
No files found.
.changeset/three-colts-march.md
0 → 100644
View file @
1ae32684
---
'
@eth-optimism/contracts-bedrock'
:
minor
'
@eth-optimism/contracts'
:
minor
'
@eth-optimism/sdk'
:
minor
---
Update sdk contract addresses for bedrock
.circleci/config.yml
View file @
1ae32684
...
...
@@ -293,7 +293,7 @@ jobs:
contracts-bedrock-coverage
:
docker
:
-
image
:
ethereumoptimism
/ci-builder:latest
-
image
:
us-docker.pkg.dev/oplabs-tools-artifacts/images
/ci-builder:latest
resource_class
:
large
steps
:
-
checkout
...
...
@@ -553,7 +553,7 @@ jobs:
sdk-next-tests
:
docker
:
-
image
:
ethereumoptimism
/ci-builder:latest
-
image
:
us-docker.pkg.dev/oplabs-tools-artifacts/images
/ci-builder:latest
resource_class
:
large
steps
:
-
checkout
...
...
@@ -700,7 +700,7 @@ jobs:
atst-tests
:
docker
:
-
image
:
ethereumoptimism
/ci-builder:latest
-
image
:
us-docker.pkg.dev/oplabs-tools-artifacts/images
/ci-builder:latest
resource_class
:
large
steps
:
-
checkout
...
...
op-chain-ops/cmd/rollover/main.go
View file @
1ae32684
...
...
@@ -51,6 +51,8 @@ func main() {
return
err
}
log
.
Info
(
"Requires an archive node"
)
log
.
Info
(
"Connecting to AddressManager"
,
"address"
,
addresses
.
AddressManager
)
addressManager
,
err
:=
bindings
.
NewAddressManager
(
addresses
.
AddressManager
,
clients
.
L1Client
)
if
err
!=
nil
{
...
...
@@ -70,28 +72,42 @@ func main() {
time
.
Sleep
(
3
*
time
.
Second
)
}
shutoffBlock
,
err
:=
addressManager
.
GetAddress
(
&
bind
.
CallOpts
{},
"DTL_SHUTOFF_BLOCK"
)
if
err
!=
nil
{
return
err
}
shutoffHeight
:=
shutoffBlock
.
Big
()
log
.
Info
(
"Connecting to CanonicalTransactionChain"
,
"address"
,
addresses
.
CanonicalTransactionChain
)
ctc
,
err
:=
legacy_bindings
.
NewCanonicalTransactionChain
(
addresses
.
CanonicalTransactionChain
,
clients
.
L1Client
)
if
err
!=
nil
{
return
err
}
queueLength
,
err
:=
ctc
.
GetQueueLength
(
&
bind
.
CallOpts
{})
queueLength
,
err
:=
ctc
.
GetQueueLength
(
&
bind
.
CallOpts
{
BlockNumber
:
shutoffHeight
,
})
if
err
!=
nil
{
return
err
}
totalElements
,
err
:=
ctc
.
GetTotalElements
(
&
bind
.
CallOpts
{})
totalElements
,
err
:=
ctc
.
GetTotalElements
(
&
bind
.
CallOpts
{
BlockNumber
:
shutoffHeight
,
})
if
err
!=
nil
{
return
err
}
totalBatches
,
err
:=
ctc
.
GetTotalBatches
(
&
bind
.
CallOpts
{})
totalBatches
,
err
:=
ctc
.
GetTotalBatches
(
&
bind
.
CallOpts
{
BlockNumber
:
shutoffHeight
,
})
if
err
!=
nil
{
return
err
}
pending
,
err
:=
ctc
.
GetNumPendingQueueElements
(
&
bind
.
CallOpts
{})
pending
,
err
:=
ctc
.
GetNumPendingQueueElements
(
&
bind
.
CallOpts
{
BlockNumber
:
shutoffHeight
,
})
if
err
!=
nil
{
return
err
}
...
...
@@ -131,6 +147,7 @@ func main() {
if
err
!=
nil
{
return
err
}
// If the queue origin is l1, then it is a deposit.
if
json
.
QueueOrigin
==
"l1"
{
if
json
.
QueueIndex
==
nil
{
...
...
@@ -138,12 +155,26 @@ func main() {
return
fmt
.
Errorf
(
"queue index is nil for tx %s at height %d"
,
hash
.
Hex
(),
blockNumber
)
}
queueIndex
:=
uint64
(
*
json
.
QueueIndex
)
if
json
.
L1BlockNumber
==
nil
{
// This should never happen.
return
fmt
.
Errorf
(
"L1 block number is nil for tx %s at height %d"
,
hash
.
Hex
(),
blockNumber
)
}
l1BlockNumber
:=
json
.
L1BlockNumber
.
ToInt
()
log
.
Info
(
"Deposit found"
,
"l2-block"
,
blockNumber
,
"l1-block"
,
l1BlockNumber
,
"queue-index"
,
queueIndex
)
// This should never happen
if
json
.
L1BlockNumber
.
ToInt
()
.
Uint64
()
>
shutoffHeight
.
Uint64
()
{
log
.
Warn
(
"Lost deposit"
)
return
fmt
.
Errorf
(
"Lost deposit: %s"
,
hash
.
Hex
())
}
// Check to see if the final deposit was ingested. Subtract 1 here to handle zero
// indexing.
if
queueIndex
==
queueLength
.
Uint64
()
-
1
{
log
.
Info
(
"Found final deposit in l2geth"
,
"queue-index"
,
queueIndex
)
break
}
// If the queue index is less than the queue length, then not all deposits have
// been ingested by l2geth yet. This means that we need to reset the blocknumber
// to the latest block number to restart walking backwards to find deposits that
...
...
@@ -258,7 +289,7 @@ func waitForTotalElements(wg *sync.WaitGroup, contract RollupContract, client *e
log
.
Info
(
"Waiting for elements to be submitted"
,
"name"
,
name
,
"count"
,
totalElements
.
Uint64
()
-
bn
,
"count"
,
bn
-
totalElements
.
Uint64
()
,
"height"
,
bn
,
"total-elements"
,
totalElements
.
Uint64
(),
)
...
...
op-proposer/proposer/l2_output_submitter.go
View file @
1ae32684
...
...
@@ -187,7 +187,7 @@ func NewL2OutputSubmitter(cfg Config, l log.Logger, m metrics.Metricer) (*L2Outp
l2ooContract
,
err
:=
bindings
.
NewL2OutputOracleCaller
(
cfg
.
L2OutputOracleAddr
,
cfg
.
L1Client
)
if
err
!=
nil
{
cancel
()
return
nil
,
err
return
nil
,
fmt
.
Errorf
(
"failed to create L2OO at address %s: %w"
,
cfg
.
L2OutputOracleAddr
,
err
)
}
cCtx
,
cCancel
:=
context
.
WithTimeout
(
ctx
,
cfg
.
NetworkTimeout
)
...
...
packages/contracts-bedrock/deployments/mainnet/
Lib_
AddressManager.json
→
packages/contracts-bedrock/deployments/mainnet/AddressManager.json
View file @
1ae32684
File moved
packages/sdk/src/utils/chain-constants.ts
View file @
1ae32684
...
...
@@ -3,6 +3,20 @@ import {
getDeployedContractDefinition
,
}
from
'
@eth-optimism/contracts
'
import
{
predeploys
as
bedrockPredeploys
}
from
'
@eth-optimism/contracts-bedrock
'
import
portalArtifactsMainnet
from
'
@eth-optimism/contracts-bedrock/deployments/mainnet/OptimismPortalProxy.json
'
import
portalArtifactsGoerli
from
'
@eth-optimism/contracts-bedrock/deployments/goerli/OptimismPortalProxy.json
'
import
l2OutputOracleArtifactsMainnet
from
'
@eth-optimism/contracts-bedrock/deployments/mainnet/L2OutputOracleProxy.json
'
import
l2OutputOracleArtifactsGoerli
from
'
@eth-optimism/contracts-bedrock/deployments/goerli/L2OutputOracleProxy.json
'
const
portalAddresses
=
{
mainnet
:
portalArtifactsMainnet
,
goerli
:
portalArtifactsGoerli
,
}
const
l2OutputOracleAddresses
=
{
mainnet
:
l2OutputOracleArtifactsMainnet
,
goerli
:
l2OutputOracleArtifactsGoerli
,
}
import
{
L1ChainID
,
...
...
@@ -64,6 +78,7 @@ export const DEFAULT_L2_CONTRACT_ADDRESSES: OEL2ContractsLike = {
* @returns The L1 contracts for the given network.
*/
const
getL1ContractsByNetworkName
=
(
network
:
string
):
OEL1ContractsLike
=>
{
// TODO this doesn't code split and makes the sdk artifacts way too big
const
getDeployedAddress
=
(
name
:
string
)
=>
{
return
getDeployedContractDefinition
(
name
,
network
).
address
}
...
...
@@ -77,8 +92,8 @@ const getL1ContractsByNetworkName = (network: string): OEL1ContractsLike => {
StateCommitmentChain
:
getDeployedAddress
(
'
StateCommitmentChain
'
),
CanonicalTransactionChain
:
getDeployedAddress
(
'
CanonicalTransactionChain
'
),
BondManager
:
getDeployedAddress
(
'
BondManager
'
),
OptimismPortal
:
'
0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383
'
as
const
,
L2OutputOracle
:
'
0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0
'
as
const
,
OptimismPortal
:
portalAddresses
[
network
].
address
,
L2OutputOracle
:
l2OutputOracleAddresses
[
network
].
address
,
}
}
...
...
@@ -109,6 +124,7 @@ export const CONTRACT_ADDRESSES: {
CanonicalTransactionChain
:
'
0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9
'
as
const
,
BondManager
:
'
0x5FC8d32690cc91D4c39d9d3abcBD16989F875707
'
as
const
,
// FIXME
OptimismPortal
:
'
0x0000000000000000000000000000000000000000
'
as
const
,
L2OutputOracle
:
'
0x0000000000000000000000000000000000000000
'
as
const
,
},
...
...
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