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
464ca8ab
Unverified
Commit
464ca8ab
authored
Jan 17, 2023
by
mergify[bot]
Committed by
GitHub
Jan 17, 2023
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into clabby/op-node/system-config-cleanup
parents
277a62a5
e65a7bb0
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
79 additions
and
32 deletions
+79
-32
tough-avocados-dance.md
.changeset/tough-avocados-dance.md
+5
-0
CHANGELOG.md
ops/docker/ci-builder/CHANGELOG.md
+6
-0
Dockerfile
ops/docker/ci-builder/Dockerfile
+1
-1
package.json
ops/docker/ci-builder/package.json
+1
-1
CHANGELOG.md
ops/docker/foundry/CHANGELOG.md
+6
-0
Dockerfile
ops/docker/foundry/Dockerfile
+1
-1
package.json
ops/docker/foundry/package.json
+1
-1
.gas-snapshot
packages/contracts-bedrock/.gas-snapshot
+8
-8
README.md
packages/contracts-bedrock/README.md
+1
-1
ResourceMetering.t.sol
...s/contracts-bedrock/contracts/test/ResourceMetering.t.sol
+14
-0
wait-for-final-batch.ts
packages/contracts-bedrock/tasks/wait-for-final-batch.ts
+11
-6
wait-for-final-deposit.ts
packages/contracts-bedrock/tasks/wait-for-final-deposit.ts
+7
-2
CHANGELOG.md
packages/data-transport-layer/CHANGELOG.md
+6
-0
package.json
packages/data-transport-layer/package.json
+1
-1
service.ts
...data-transport-layer/src/services/l1-ingestion/service.ts
+10
-10
No files found.
.changeset/tough-avocados-dance.md
0 → 100644
View file @
464ca8ab
---
'
@eth-optimism/contracts-bedrock'
:
patch
---
Added a test for large deposit gaps
ops/docker/ci-builder/CHANGELOG.md
View file @
464ca8ab
# @eth-optimism/ci-builder
# @eth-optimism/ci-builder
## 0.4.0
### Minor Changes
-
05cc935b2: Bump foundry to 2ff99025abade470a795724c10648c800a41025e
## 0.3.8
## 0.3.8
### Patch Changes
### Patch Changes
...
...
ops/docker/ci-builder/Dockerfile
View file @
464ca8ab
...
@@ -16,7 +16,7 @@ WORKDIR /opt/foundry
...
@@ -16,7 +16,7 @@ WORKDIR /opt/foundry
# Only diff from upstream docker image is this clone instead
# Only diff from upstream docker image is this clone instead
# of COPY. We select a specific commit to use.
# of COPY. We select a specific commit to use.
RUN
git clone https://github.com/foundry-rs/foundry.git
.
\
RUN
git clone https://github.com/foundry-rs/foundry.git
.
\
&&
git checkout
c06b53287dc23c4e5b1b3e57c937a90114bbe166
&&
git checkout
2ff99025abade470a795724c10648c800a41025e
RUN
source
$HOME
/.profile
&&
\
RUN
source
$HOME
/.profile
&&
\
cargo build
--release
&&
\
cargo build
--release
&&
\
...
...
ops/docker/ci-builder/package.json
View file @
464ca8ab
{
{
"name"
:
"@eth-optimism/ci-builder"
,
"name"
:
"@eth-optimism/ci-builder"
,
"version"
:
"0.
3.8
"
,
"version"
:
"0.
4.0
"
,
"scripts"
:
{},
"scripts"
:
{},
"license"
:
"MIT"
,
"license"
:
"MIT"
,
"dependencies"
:
{}
"dependencies"
:
{}
...
...
ops/docker/foundry/CHANGELOG.md
View file @
464ca8ab
# @eth-optimism/foundry
# @eth-optimism/foundry
## 0.2.0
### Minor Changes
-
05cc935b2: Bump foundry to 2ff99025abade470a795724c10648c800a41025e
## 0.1.3
## 0.1.3
### Patch Changes
### Patch Changes
...
...
ops/docker/foundry/Dockerfile
View file @
464ca8ab
...
@@ -9,7 +9,7 @@ WORKDIR /opt/foundry
...
@@ -9,7 +9,7 @@ WORKDIR /opt/foundry
# Only diff from upstream docker image is this clone instead
# Only diff from upstream docker image is this clone instead
# of COPY. We select a specific commit to use.
# of COPY. We select a specific commit to use.
RUN
git clone https://github.com/foundry-rs/foundry.git
.
\
RUN
git clone https://github.com/foundry-rs/foundry.git
.
\
&&
git checkout
f540aa9ebde88dce720140b332412089c2ee85b6
&&
git checkout
2ff99025abade470a795724c10648c800a41025e
RUN
source
$HOME
/.profile
&&
cargo build
--release
\
RUN
source
$HOME
/.profile
&&
cargo build
--release
\
&&
strip /opt/foundry/target/release/forge
\
&&
strip /opt/foundry/target/release/forge
\
...
...
ops/docker/foundry/package.json
View file @
464ca8ab
{
{
"name"
:
"@eth-optimism/foundry"
,
"name"
:
"@eth-optimism/foundry"
,
"version"
:
"0.
1.3
"
,
"version"
:
"0.
2.0
"
,
"scripts"
:
{},
"scripts"
:
{},
"license"
:
"MIT"
,
"license"
:
"MIT"
,
"dependencies"
:
{}
"dependencies"
:
{}
...
...
packages/contracts-bedrock/.gas-snapshot
View file @
464ca8ab
...
@@ -368,14 +368,14 @@ RLPWriter_Test:test_writeUint_smallint3_succeeds() (gas: 7311)
...
@@ -368,14 +368,14 @@ RLPWriter_Test:test_writeUint_smallint3_succeeds() (gas: 7311)
RLPWriter_Test:test_writeUint_smallint4_succeeds() (gas: 7312)
RLPWriter_Test:test_writeUint_smallint4_succeeds() (gas: 7312)
RLPWriter_Test:test_writeUint_smallint_succeeds() (gas: 7290)
RLPWriter_Test:test_writeUint_smallint_succeeds() (gas: 7290)
RLPWriter_Test:test_writeUint_zero_succeeds() (gas: 7802)
RLPWriter_Test:test_writeUint_zero_succeeds() (gas: 7802)
ResourceMetering_Test:test_meter_initialResourceParams_succeeds() (gas: 89
65
)
ResourceMetering_Test:test_meter_initialResourceParams_succeeds() (gas: 89
83
)
ResourceMetering_Test:test_meter_updateNoGasDelta_succeeds() (gas: 20081
01
)
ResourceMetering_Test:test_meter_updateNoGasDelta_succeeds() (gas: 20081
19
)
ResourceMetering_Test:test_meter_updateOneEmptyBlock_succeeds() (gas: 181
52
)
ResourceMetering_Test:test_meter_updateOneEmptyBlock_succeeds() (gas: 181
48
)
ResourceMetering_Test:test_meter_updateParamsNoChange_succeeds() (gas: 13
911
)
ResourceMetering_Test:test_meter_updateParamsNoChange_succeeds() (gas: 13
859
)
ResourceMetering_Test:test_meter_updateTenEmptyBlocks_succeeds() (gas: 209
00
)
ResourceMetering_Test:test_meter_updateTenEmptyBlocks_succeeds() (gas: 209
18
)
ResourceMetering_Test:test_meter_updateTwoEmptyBlocks_succeeds() (gas: 209
23
)
ResourceMetering_Test:test_meter_updateTwoEmptyBlocks_succeeds() (gas: 209
41
)
ResourceMetering_Test:test_meter_useMax_succeeds() (gas: 8017
204
)
ResourceMetering_Test:test_meter_useMax_succeeds() (gas: 8017
151
)
ResourceMetering_Test:test_meter_useMoreThanMax_reverts() (gas: 160
23
)
ResourceMetering_Test:test_meter_useMoreThanMax_reverts() (gas: 160
45
)
Semver_Test:test_behindProxy_succeeds() (gas: 506725)
Semver_Test:test_behindProxy_succeeds() (gas: 506725)
Semver_Test:test_version_succeeds() (gas: 9396)
Semver_Test:test_version_succeeds() (gas: 9396)
SequencerFeeVault_Test:test_constructor_succeeds() (gas: 5504)
SequencerFeeVault_Test:test_constructor_succeeds() (gas: 5504)
...
...
packages/contracts-bedrock/README.md
View file @
464ca8ab
...
@@ -57,7 +57,7 @@ We work on this repository with a combination of [Hardhat](https://hardhat.org)
...
@@ -57,7 +57,7 @@ We work on this repository with a combination of [Hardhat](https://hardhat.org)
1.
Install Foundry by following
[
the instructions located here
](
https://getfoundry.sh/
)
.
1.
Install Foundry by following
[
the instructions located here
](
https://getfoundry.sh/
)
.
A specific version must be used.
A specific version must be used.
```
shell
```
shell
foundryup
-C
c06b53287dc23c4e5b1b3e57c937a90114bbe166
foundryup
-C
2ff99025abade470a795724c10648c800a41025e
```
```
2.
Install node modules with yarn (v1) and Node.js (16+):
2.
Install node modules with yarn (v1) and Node.js (16+):
...
...
packages/contracts-bedrock/contracts/test/ResourceMetering.t.sol
View file @
464ca8ab
...
@@ -108,4 +108,18 @@ contract ResourceMetering_Test is CommonTest {
...
@@ -108,4 +108,18 @@ contract ResourceMetering_Test is CommonTest {
vm.expectRevert("ResourceMetering: cannot buy more gas than available gas limit");
vm.expectRevert("ResourceMetering: cannot buy more gas than available gas limit");
meter.use(target * elasticity + 1);
meter.use(target * elasticity + 1);
}
}
// Demonstrates that the resource metering arithmetic can tolerate very large gaps between
// deposits.
function testFuzz_meter_largeBlockDiff_succeeds(uint64 _amount, uint256 _blockDiff) external {
// This test fails if the following line is commented out.
// At 12 seconds per block, this number is effectively unreachable.
vm.assume(_blockDiff < 433576281058164217753225238677900874458691);
uint64 target = uint64(uint256(meter.TARGET_RESOURCE_LIMIT()));
uint64 elasticity = uint64(uint256(meter.ELASTICITY_MULTIPLIER()));
vm.assume(_amount < target * elasticity);
vm.roll(initialBlockNum + _blockDiff);
meter.use(_amount);
}
}
}
packages/contracts-bedrock/tasks/wait-for-final-batch.ts
View file @
464ca8ab
...
@@ -48,26 +48,31 @@ task('wait-for-final-batch', 'Waits for the final batch to be submitted')
...
@@ -48,26 +48,31 @@ task('wait-for-final-batch', 'Waits for the final batch to be submitted')
const
wait
=
async
(
contract
:
Contract
)
=>
{
const
wait
=
async
(
contract
:
Contract
)
=>
{
let
height
=
await
l2Provider
.
getBlockNumber
()
let
height
=
await
l2Provider
.
getBlockNumber
()
let
totalElements
=
await
contract
.
getTotalElements
()
let
totalElements
=
await
contract
.
getTotalElements
()
// The genesis block was not batch submitted so subtract 1 from the height
console
.
log
(
` - height:
${
height
}
`
)
// when comparing with the total elements
console
.
log
(
` - totalElements:
${
totalElements
}
`
)
while
(
totalElements
!==
height
-
1
)
{
while
(
totalElements
.
toNumber
()
!==
height
)
{
console
.
log
(
'
Total elements does not match
'
)
console
.
log
(
'
Total elements does not match
'
)
console
.
log
(
` - real height:
${
height
}
`
)
console
.
log
(
` - height:
${
height
}
`
)
console
.
log
(
` - height:
${
height
-
1
}
`
)
console
.
log
(
` - totalElements:
${
totalElements
}
`
)
console
.
log
(
` - totalElements:
${
totalElements
}
`
)
console
.
log
(
`Waiting for
${
height
-
totalElements
}
elements to be submitted`
)
totalElements
=
await
contract
.
getTotalElements
()
totalElements
=
await
contract
.
getTotalElements
()
height
=
await
l2Provider
.
getBlockNumber
()
height
=
await
l2Provider
.
getBlockNumber
()
await
sleep
(
2
*
1000
)
await
sleep
(
5
*
1000
)
}
}
}
}
console
.
log
(
'
Waiting for the CanonicalTransactionChain...
'
)
console
.
log
(
'
Waiting for the CanonicalTransactionChain...
'
)
await
wait
(
CanonicalTransactionChain
)
await
wait
(
CanonicalTransactionChain
)
console
.
log
(
'
All transaction batches have been submitted
'
)
console
.
log
(
'
All transaction batches have been submitted
'
)
console
.
log
()
console
.
log
(
'
Waiting for the StateCommitmentChain...
'
)
console
.
log
(
'
Waiting for the StateCommitmentChain...
'
)
await
wait
(
StateCommitmentChain
)
await
wait
(
StateCommitmentChain
)
console
.
log
(
'
All state root batches have been submitted
'
)
console
.
log
(
'
All state root batches have been submitted
'
)
console
.
log
()
console
.
log
(
'
All batches have been submitted
'
)
console
.
log
(
'
All batches have been submitted
'
)
})
})
packages/contracts-bedrock/tasks/wait-for-final-deposit.ts
View file @
464ca8ab
...
@@ -22,6 +22,7 @@ task('wait-for-final-deposit', 'Waits for the final deposit to be ingested')
...
@@ -22,6 +22,7 @@ task('wait-for-final-deposit', 'Waits for the final deposit to be ingested')
const
l1Provider
=
new
hre
.
ethers
.
providers
.
StaticJsonRpcProvider
(
const
l1Provider
=
new
hre
.
ethers
.
providers
.
StaticJsonRpcProvider
(
args
.
l1RpcUrl
args
.
l1RpcUrl
)
)
const
l2Provider
=
new
hre
.
ethers
.
providers
.
StaticJsonRpcProvider
(
const
l2Provider
=
new
hre
.
ethers
.
providers
.
StaticJsonRpcProvider
(
args
.
l2RpcUrl
args
.
l2RpcUrl
)
)
...
@@ -63,6 +64,9 @@ task('wait-for-final-deposit', 'Waits for the final deposit to be ingested')
...
@@ -63,6 +64,9 @@ task('wait-for-final-deposit', 'Waits for the final deposit to be ingested')
console
.
log
(
`DTL shutoff block
${
dtlShutoffBlock
.
toString
()}
`
)
console
.
log
(
`DTL shutoff block
${
dtlShutoffBlock
.
toString
()}
`
)
let
pending
=
await
CanonicalTransactionChain
.
getNumPendingQueueElements
()
console
.
log
(
`
${
pending
}
deposits must be batch submitted`
)
// Now query the number of queue elements in the CTC
// Now query the number of queue elements in the CTC
const
queueLength
=
await
CanonicalTransactionChain
.
getQueueLength
()
const
queueLength
=
await
CanonicalTransactionChain
.
getQueueLength
()
console
.
log
(
`Total number of deposits:
${
queueLength
}
`
)
console
.
log
(
`Total number of deposits:
${
queueLength
}
`
)
...
@@ -80,11 +84,10 @@ task('wait-for-final-deposit', 'Waits for the final deposit to be ingested')
...
@@ -80,11 +84,10 @@ task('wait-for-final-deposit', 'Waits for the final deposit to be ingested')
if
(
tx
.
queueOrigin
===
'
l1
'
)
{
if
(
tx
.
queueOrigin
===
'
l1
'
)
{
const
queueIndex
=
BigNumber
.
from
(
tx
.
queueIndex
).
toNumber
()
const
queueIndex
=
BigNumber
.
from
(
tx
.
queueIndex
).
toNumber
()
if
(
queueIndex
===
queueLength
)
{
if
(
queueIndex
===
queueLength
-
1
)
{
break
break
}
}
if
(
queueIndex
<
queueLength
)
{
if
(
queueIndex
<
queueLength
)
{
console
.
log
()
throw
new
Error
(
throw
new
Error
(
`Missed the final deposit. queueIndex
${
queueIndex
}
, queueLength
${
queueLength
}
`
`Missed the final deposit. queueIndex
${
queueIndex
}
, queueLength
${
queueLength
}
`
)
)
...
@@ -94,4 +97,6 @@ task('wait-for-final-deposit', 'Waits for the final deposit to be ingested')
...
@@ -94,4 +97,6 @@ task('wait-for-final-deposit', 'Waits for the final deposit to be ingested')
}
}
console
.
log
(
'
Final deposit has been ingested by l2geth
'
)
console
.
log
(
'
Final deposit has been ingested by l2geth
'
)
pending
=
await
CanonicalTransactionChain
.
getNumPendingQueueElements
()
console
.
log
(
`
${
pending
}
deposits must be batch submitted`
)
})
})
packages/data-transport-layer/CHANGELOG.md
View file @
464ca8ab
# data transport layer
# data transport layer
## 0.5.51
### Patch Changes
-
4396e187d: Fixes a bug in the DTL that would cause it to not be able to sync beyond the deposit shutoff block.
## 0.5.50
## 0.5.50
### Patch Changes
### Patch Changes
...
...
packages/data-transport-layer/package.json
View file @
464ca8ab
{
{
"private"
:
true
,
"private"
:
true
,
"name"
:
"@eth-optimism/data-transport-layer"
,
"name"
:
"@eth-optimism/data-transport-layer"
,
"version"
:
"0.5.5
0
"
,
"version"
:
"0.5.5
1
"
,
"description"
:
"[Optimism] Service for shuttling data from L1 into L2"
,
"description"
:
"[Optimism] Service for shuttling data from L1 into L2"
,
"main"
:
"dist/index"
,
"main"
:
"dist/index"
,
"types"
:
"dist/index"
,
"types"
:
"dist/index"
,
...
...
packages/data-transport-layer/src/services/l1-ingestion/service.ts
View file @
464ca8ab
...
@@ -268,16 +268,16 @@ export class L1IngestionService extends BaseService<L1IngestionServiceOptions> {
...
@@ -268,16 +268,16 @@ export class L1IngestionService extends BaseService<L1IngestionServiceOptions> {
)
)
}
}
//
I prefer to do this in serial to avoid non-determinism. We could have a discussion about
//
We should not sync TransactionEnqueued events beyond the deposit shutoff block.
// using Promise.all if necessary, but I don't see a good reason to do so unless parsing is
if
(
depositTargetL1Block
>=
highestSyncedL1Block
)
{
// really, really slow for all event types.
await
this
.
_syncEvents
(
await
this
.
_syncEvents
(
'
CanonicalTransactionChain
'
,
'
CanonicalTransactionChain
'
,
'
TransactionEnqueued
'
,
'
TransactionEnqueued
'
,
highestSyncedL1Block
,
highestSynced
L1Block
,
depositTarget
L1Block
,
depositTargetL1Block
,
handleEventsTransactionEnqueued
handleEventsTransactionEnqueued
)
)
}
await
this
.
_syncEvents
(
await
this
.
_syncEvents
(
'
CanonicalTransactionChain
'
,
'
CanonicalTransactionChain
'
,
...
...
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