Commit 8cb2535b authored by Kelvin Fichter's avatar Kelvin Fichter

fix: skip an unreliable integration test

Skips the unreliable timestamp/blocknumber test which would often be off
by one or two. Creates an annoying habit of having to rerun the
integration tests until the test passes, which isn't how integration
tests should work.
parent 9784c462
---
'@eth-optimism/integration-tests': patch
---
Skip an unreliable test
...@@ -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())
}) })
}) })
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