Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(protocol): optimize gas for processMessage & retryMessage #13181

Merged
merged 84 commits into from
Mar 9, 2023

Conversation

cyberhorsey
Copy link
Contributor

@cyberhorsey cyberhorsey commented Feb 17, 2023

Gas costs can reach above 2 million for a retryMessage call, and 1.5 million for a processMessage call, if it is ERC20 + deploying a contract. Can reach 1.4 million without deploying.

Gas cost is ~800,000-900,000 if sendEther.

Current work so far on this draft:
sendEther: 560000~

@cyberhorsey cyberhorsey changed the title feat(bridge): Gas optimize processmessage, retrymessage feat(protocol): Gas optimize processmessage, retrymessage Feb 18, 2023
@codecov
Copy link

codecov bot commented Feb 18, 2023

Codecov Report

Merging #13181 (e606ed5) into main (9cb1740) will decrease coverage by 0.46%.
The diff coverage is 60.00%.

@@            Coverage Diff             @@
##             main   #13181      +/-   ##
==========================================
- Coverage   61.61%   61.16%   -0.46%     
==========================================
  Files         118      117       -1     
  Lines        3478     3409      -69     
  Branches      491      466      -25     
==========================================
- Hits         2143     2085      -58     
+ Misses       1250     1244       -6     
+ Partials       85       80       -5     
Flag Coverage Δ *Carryforward flag
bridge-ui 94.17% <ø> (-0.35%) ⬇️ Carriedforward from 3bee03a
protocol 52.06% <60.00%> (-0.31%) ⬇️
relayer 65.08% <ø> (+0.37%) ⬆️ Carriedforward from 3bee03a
ui 100.00% <ø> (ø) Carriedforward from 3bee03a

*This pull request uses carry forward flags. Click here to find out more.

Impacted Files Coverage Δ
...ckages/protocol/contracts/L1/libs/LibVerifying.sol 15.38% <0.00%> (-0.49%) ⬇️
...rotocol/contracts/bridge/libs/LibBridgeProcess.sol 20.51% <0.00%> (-1.11%) ⬇️
.../protocol/contracts/bridge/libs/LibBridgeRetry.sol 94.73% <ø> (ø)
...tocol/contracts/test/thirdparty/TestTaikoToken.sol 0.00% <ø> (ø)
...es/protocol/contracts/thirdparty/LibMerkleTrie.sol 91.56% <ø> (+1.20%) ⬆️
...ges/protocol/contracts/thirdparty/LibRLPReader.sol 77.14% <83.33%> (-0.84%) ⬇️
...ckages/protocol/contracts/signal/SignalService.sol 53.57% <100.00%> (ø)
...s/protocol/contracts/thirdparty/AddressManager.sol 100.00% <100.00%> (ø)
...l/contracts/test/bridge/libs/TestLibBridgeData.sol 33.33% <0.00%> (-66.67%) ⬇️
packages/bridge-ui/src/domain/chain.ts 80.00% <0.00%> (-10.25%) ⬇️
... and 6 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

dantaik
dantaik previously approved these changes Mar 8, 2023
davidtaikocha
davidtaikocha previously approved these changes Mar 8, 2023
@dantaik dantaik enabled auto-merge March 9, 2023 01:34
@dantaik dantaik requested review from dantaik and removed request for adaki2004 March 9, 2023 01:42
@dantaik dantaik added this pull request to the merge queue Mar 9, 2023
Merged via the queue into main with commit 178e382 Mar 9, 2023
@dantaik dantaik deleted the gas_optimize_process_message branch March 9, 2023 13:21
@github-actions github-actions bot mentioned this pull request Mar 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants