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
9e229c62
Unverified
Commit
9e229c62
authored
Feb 10, 2022
by
smartcontracts
Committed by
GitHub
Feb 10, 2022
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2192 from ethereum-optimism/sc/itest-rm-unreliable
fix: skip an unreliable integration test
parents
9784c462
8cb2535b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
28 deletions
+32
-28
wise-weeks-explode.md
.changeset/wise-weeks-explode.md
+5
-0
ovmcontext.spec.ts
integration-tests/test/ovmcontext.spec.ts
+27
-28
No files found.
.changeset/wise-weeks-explode.md
0 → 100644
View file @
9e229c62
---
'
@eth-optimism/integration-tests'
:
patch
---
Skip an unreliable test
integration-tests/test/ovmcontext.spec.ts
View file @
9e229c62
...
@@ -144,33 +144,32 @@ describe('OVM Context: Layer 2 EVM Context', () => {
...
@@ -144,33 +144,32 @@ describe('OVM Context: Layer 2 EVM Context', () => {
* context. The data returned should match what is actually being used as the
* context. The data returned should match what is actually being used as the
* OVM context.
* OVM context.
*/
*/
// TODO: This test is not reliable. If we really care about this then we need to figure out a
it
(
'
should return same timestamp and blocknumbers between `eth_call` and `rollup_getInfo`
'
,
async
()
=>
{
// more reliable way to test this behavior.
// As atomically as possible, call `rollup_getInfo` and Multicall for the
it
.
skip
(
'
should return same timestamp and blocknumbers between `eth_call` and `rollup_getInfo`
'
,
async
()
=>
{
// blocknumber and timestamp. If this is not atomic, then the sequencer can
// // As atomically as possible, call `rollup_getInfo` and Multicall for the
// happend to update the timestamp between the `eth_call` and the `rollup_getInfo`
// // blocknumber and timestamp. If this is not atomic, then the sequencer can
const
[
info
,
[,
returnData
]]
=
await
Promise
.
all
([
// // happend to update the timestamp between the `eth_call` and the `rollup_getInfo`
L2Provider
.
send
(
'
rollup_getInfo
'
,
[]),
// const [info, [, returnData]] = await Promise.all([
Multicall
.
callStatic
.
aggregate
([
// L2Provider.send('rollup_getInfo', []),
[
// Multicall.callStatic.aggregate([
OVMContextStorage
.
address
,
// [
OVMContextStorage
.
interface
.
encodeFunctionData
(
// OVMContextStorage.address,
'
getCurrentBlockTimestamp
'
// OVMContextStorage.interface.encodeFunctionData(
),
// 'getCurrentBlockTimestamp'
],
// ),
[
// ],
OVMContextStorage
.
address
,
// [
OVMContextStorage
.
interface
.
encodeFunctionData
(
// OVMContextStorage.address,
'
getCurrentL1BlockNumber
'
// OVMContextStorage.interface.encodeFunctionData(
),
// 'getCurrentL1BlockNumber'
],
// ),
]),
// ],
])
// ]),
// ])
const
timestamp
=
BigNumber
.
from
(
returnData
[
0
])
// const timestamp = BigNumber.from(returnData[0])
const
blockNumber
=
BigNumber
.
from
(
returnData
[
1
])
// const blockNumber = BigNumber.from(returnData[1])
// expect(info.ethContext.blockNumber).to.deep.equal(blockNumber.toNumber())
expect
(
info
.
ethContext
.
blockNumber
).
to
.
deep
.
equal
(
blockNumber
.
toNumber
())
// expect(info.ethContext.timestamp).to.deep.equal(timestamp.toNumber())
expect
(
info
.
ethContext
.
timestamp
).
to
.
deep
.
equal
(
timestamp
.
toNumber
())
})
})
})
})
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