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): improve sync header storage on L2 #13041

Merged
merged 2 commits into from
Jan 25, 2023
Merged

Conversation

dantaik
Copy link
Contributor

@dantaik dantaik commented Jan 24, 2023

Now both the height and the hash of latest synced L1 block is known.

@dantaik dantaik marked this pull request as ready for review January 24, 2023 22:18
@dantaik
Copy link
Contributor Author

dantaik commented Jan 24, 2023

@cyberhorsey I run tokenonmics tests but found there are errors:

commiting  12 with commit slot 3
proposing 12 with commit slot 3
Proposed block 0x765f1c9ef93964233b559131ac15a1f1b5d6c2618ab782e963832341fbe1a392
-----------PROPOSED--------------- 12 BigNumber { value: "4" }
NEW PROOF REWARD 0.989249431387414707  TKO
NEW PROPOSER TKO BALANCE 100.0  TKO
NEW BLOCK FEE 1.09375  TKO
AssertionError: expected false to equal true
    at JsonRpcProvider.<anonymous> (/Users/d/Projects/taiko/taiko-mono/packages/protocol/test/tokenomics/Tokenomics.test.ts:163:25)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5) {
  showDiff: true,
  actual: false,
  expected: true,
  operator: 'strictEqual'
}
    ✔ block fee should increase as the halving period passes, while no blocks are proposed (5105ms)
commiting  14 with commit slot 4
proposing 14 with commit slot 4
Proposed block 0xc81fa5dcb3903d311978cbefef04c648dc7e40648c901c324118ab0caf66997a
-----------PROPOSED--------------- 14 BigNumber { value: "5" }
NEW PROOF REWARD 0.989249431387414707  TKO
NEW PROPOSER TKO BALANCE 100.0  TKO
NEW BLOCK FEE 1.240234375  TKO
AssertionError: expected false to equal true
    at JsonRpcProvider.<anonymous> (/Users/d/Projects/taiko/taiko-mono/packages/protocol/test/tokenomics/Tokenomics.test.ts:163:25)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5) {
  showDiff: true,
  actual: false,
  expected: true,
  operator: 'strictEqual'
}
commiting  13 with commit slot 5
proposing 13 with commit slot 5
Proposed block 0x0aab62ee9acbd2f61aa2c279df36eaa025479bcb8b28030099b5202892f74484
-----------PROPOSED--------------- 13 BigNumber { value: "6" }
NEW PROOF REWARD 0.989249431387414707  TKO
NEW PROPOSER TKO BALANCE 100.0  TKO
NEW BLOCK FEE 1.240234375  TKO
AssertionError: expected false to equal true
    at JsonRpcProvider.<anonymous> (/Users/d/Projects/taiko/taiko-mono/packages/protocol/test/tokenomics/Tokenomics.test.ts:163:25)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5) {
  showDiff: true,
  actual: false,
  expected: true,
  operator: 'strictEqual'
}
    ✔ expects the blockFee to go be 0 when no periods have passed


  3 passing (34s)

Tests seem to pass, but there are assertion errors. Please take a look.

@cyberhorsey
Copy link
Contributor

@dantaik the random tokenomics test failure is fixed in my prover_tests branch. We can ignore it here.

@codecov
Copy link

codecov bot commented Jan 24, 2023

Codecov Report

Merging #13041 (922647f) into main (45153d9) will not change coverage.
The diff coverage is 50.00%.

@@           Coverage Diff           @@
##             main   #13041   +/-   ##
=======================================
  Coverage   65.89%   65.89%           
=======================================
  Files         112      112           
  Lines        3064     3064           
  Branches      368      368           
=======================================
  Hits         2019     2019           
  Misses        969      969           
  Partials       76       76           
Flag Coverage Δ *Carryforward flag
bridge-ui 92.61% <ø> (ø) Carriedforward from 45153d9
protocol 58.34% <50.00%> (ø)
relayer 69.10% <ø> (ø) Carriedforward from 45153d9
ui 100.00% <ø> (ø) Carriedforward from 45153d9

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

Impacted Files Coverage Δ
packages/protocol/contracts/L2/TaikoL2.sol 52.94% <50.00%> (ø)

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

@dantaik dantaik merged commit 86c9fe4 into main Jan 25, 2023
@dantaik dantaik deleted the minor_improve_taiko_l2 branch January 25, 2023 02:03
@github-actions github-actions bot mentioned this pull request Jan 25, 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.

3 participants