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
8a98e21f
Unverified
Commit
8a98e21f
authored
Sep 21, 2021
by
elenadimitrova
Committed by
Kelvin Fichter
Nov 10, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rebasing fixes
parent
11bec4c5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
CanonicalTransactionChain.gas.spec.ts
...contracts/L1/rollup/CanonicalTransactionChain.gas.spec.ts
+5
-5
CanonicalTransactionChain.spec.ts
...est/contracts/L1/rollup/CanonicalTransactionChain.spec.ts
+4
-4
No files found.
packages/contracts/test/contracts/L1/rollup/CanonicalTransactionChain.gas.spec.ts
View file @
8a98e21f
...
...
@@ -255,17 +255,17 @@ describe('[GAS BENCHMARK] CanonicalTransactionChain', () => {
let
ENQUEUE_L2_GAS_PREPAID
let
data
beforeEach
(
async
()
=>
{
OVM_
CanonicalTransactionChain
=
OVM_
CanonicalTransactionChain
.
connect
(
sequencer
)
CanonicalTransactionChain
=
CanonicalTransactionChain
.
connect
(
sequencer
)
ENQUEUE_L2_GAS_PREPAID
=
await
OVM_
CanonicalTransactionChain
.
ENQUEUE_L2_GAS_PREPAID
()
await
CanonicalTransactionChain
.
ENQUEUE_L2_GAS_PREPAID
()
data
=
'
0x
'
+
'
12
'
.
repeat
(
1234
)
})
it
(
'
cost to enqueue a transaction above the prepaid threshold
'
,
async
()
=>
{
const
l2GasLimit
=
2
*
ENQUEUE_L2_GAS_PREPAID
const
res
=
await
OVM_
CanonicalTransactionChain
.
enqueue
(
const
res
=
await
CanonicalTransactionChain
.
enqueue
(
NON_ZERO_ADDRESS
,
l2GasLimit
,
data
...
...
@@ -279,7 +279,7 @@ describe('[GAS BENCHMARK] CanonicalTransactionChain', () => {
it
(
'
cost to enqueue a transaction below the prepaid threshold
'
,
async
()
=>
{
const
l2GasLimit
=
ENQUEUE_L2_GAS_PREPAID
-
1
const
res
=
await
OVM_
CanonicalTransactionChain
.
enqueue
(
const
res
=
await
CanonicalTransactionChain
.
enqueue
(
NON_ZERO_ADDRESS
,
l2GasLimit
,
data
...
...
packages/contracts/test/contracts/L1/rollup/CanonicalTransactionChain.spec.ts
View file @
8a98e21f
...
...
@@ -252,27 +252,27 @@ describe('CanonicalTransactionChain', () => {
describe
(
'
with _gaslimit below the ENQUEUE_L2_GAS_PREPAID threshold
'
,
async
()
=>
{
it
(
'
the cost to enqueue transactions is consistent for different L2 gas amounts below the prepaid threshold
'
,
async
()
=>
{
const
ENQUEUE_L2_GAS_PREPAID
=
await
OVM_
CanonicalTransactionChain
.
ENQUEUE_L2_GAS_PREPAID
()
await
CanonicalTransactionChain
.
ENQUEUE_L2_GAS_PREPAID
()
const
data
=
'
0x
'
+
'
12
'
.
repeat
(
1234
)
const
l2GasLimit1
=
ENQUEUE_L2_GAS_PREPAID
-
1
const
l2GasLimit2
=
ENQUEUE_L2_GAS_PREPAID
-
100
// The first enqueue is more expensive because it's writing to an empty slot,
// so we need to pre-load the buffer or the test will fail.
await
OVM_
CanonicalTransactionChain
.
enqueue
(
await
CanonicalTransactionChain
.
enqueue
(
NON_ZERO_ADDRESS
,
l2GasLimit1
,
data
)
const
res1
=
await
OVM_
CanonicalTransactionChain
.
enqueue
(
const
res1
=
await
CanonicalTransactionChain
.
enqueue
(
NON_ZERO_ADDRESS
,
l2GasLimit1
,
data
)
const
receipt1
=
await
res1
.
wait
()
const
res2
=
await
OVM_
CanonicalTransactionChain
.
enqueue
(
const
res2
=
await
CanonicalTransactionChain
.
enqueue
(
NON_ZERO_ADDRESS
,
l2GasLimit2
,
data
...
...
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