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
7af32bda
Commit
7af32bda
authored
Feb 21, 2023
by
Mark Tyneway
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
migration: cap withdrawal gaslimit to 25mil
parent
66cafc00
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
1 deletion
+10
-1
migrate.go
op-chain-ops/crossdomain/migrate.go
+5
-0
cross-chain-messenger.ts
packages/sdk/src/cross-chain-messenger.ts
+5
-1
No files found.
op-chain-ops/crossdomain/migrate.go
View file @
7af32bda
...
@@ -95,6 +95,11 @@ func MigrateWithdrawal(withdrawal *LegacyWithdrawal, l1CrossDomainMessenger *com
...
@@ -95,6 +95,11 @@ func MigrateWithdrawal(withdrawal *LegacyWithdrawal, l1CrossDomainMessenger *com
// Set the outer gas limit. This cannot be zero
// Set the outer gas limit. This cannot be zero
gasLimit
:=
dataCost
+
200
_000
gasLimit
:=
dataCost
+
200
_000
// Cap the gas limit to be 25 million to prevent creating withdrawals
// that go over the block gas limit.
if
gasLimit
>
25
_000_000
{
gasLimit
=
25
_000_000
}
w
:=
NewWithdrawal
(
w
:=
NewWithdrawal
(
versionedNonce
,
versionedNonce
,
...
...
packages/sdk/src/cross-chain-messenger.ts
View file @
7af32bda
...
@@ -351,8 +351,12 @@ export class CrossChainMessenger {
...
@@ -351,8 +351,12 @@ export class CrossChainMessenger {
}
}
}
}
// Compute the gas limit and cap at 25 million
const
dataCost
=
calldataCost
(
resolved
.
message
)
const
dataCost
=
calldataCost
(
resolved
.
message
)
const
minGasLimit
=
dataCost
.
add
(
200
_000
)
let
minGasLimit
=
dataCost
.
add
(
200
_000
)
if
(
minGasLimit
.
gt
(
25
_000_000
))
{
minGasLimit
=
BigNumber
.
from
(
25
_000_000
)
}
return
{
return
{
...
resolved
,
...
resolved
,
...
...
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