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

refactor(protocol): simplify protocol for single prover/proof #13216

Merged
merged 58 commits into from
Feb 28, 2023
Merged

Conversation

dantaik
Copy link
Contributor

@dantaik dantaik commented Feb 26, 2023

This is an attempt to simply the protocol design by:

  • Allowing only one zk-proof per block fork-choice (besides the oracle proof, if enabled). This is also a preparation for a future release that enables proof-auction.
  • Removing halt because of above
  • Oracle prover is enabled if "oracle_prover" is not address(0), no flag needed.
  • Inlining a few small functions
  • Do not mint TKO reward to provers when blocks are verified, instead, we keep their outstanding balances and provers can withdraw later.
  • Fixing tests

I would even suggest that we should get this version tested and merged ASAP, maybe it can make into the alpha-2 testnet release.

Please review carefully

This branch

·-------------------------------------------|---------------------------|---------------|----------------------------·
|           Solc version: 0.8.18            ·  Optimizer enabled: true  ·  Runs: 10000  ·  Block limit: 6718946 gas  │
············································|···························|···············|·····························
|  Methods                                                                                                           │
··························|·················|·············|·············|···············|··············|··············
|  Contract               ·  Method         ·  Min        ·  Max        ·  Avg          ·  # calls     ·  usd (avg)  │
··························|·················|·············|·············|···············|··············|··············
|  TestTaikoL1            ·  proposeBlock   ·      89859  ·     124071  ·       117964  ·          23  ·          -  │
··························|·················|·············|·············|···············|··············|··············
|  TestTaikoL1            ·  proveBlock     ·     425690  ·     425762  ·       425741  ·          11  ·          -  │
··························|·················|·············|·············|···············|··············|··············
|  TestTaikoL1            ·  verifyBlocks   ·      54302  ·      88172  ·        65094  ·          11  ·          -  │
··························|·················|·············|·············|···············|··············|··············

main

·-------------------------------------------|---------------------------|---------------|----------------------------·
|           Solc version: 0.8.18            ·  Optimizer enabled: true  ·  Runs: 10000  ·  Block limit: 6718946 gas  │
············································|···························|···············|·····························
|  Methods                                                                                                           │
··························|·················|·············|·············|···············|··············|··············
|  Contract               ·  Method         ·  Min        ·  Max        ·  Avg          ·  # calls     ·  usd (avg)  │
··························|·················|·············|·············|···············|··············|··············
|  TestTaikoL1            ·  proposeBlock   ·      93401  ·     127637  ·       122756  ·          29  ·          -  │
··························|·················|·············|·············|···············|··············|··············
|  TestTaikoL1            ·  proveBlock     ·     468502  ·     468766  ·       468565  ·          11  ·          -  │
··························|·················|·············|·············|···············|··············|··············
|  TestTaikoL1            ·  verifyBlocks   ·      65026  ·      93158  ·        73942  ·          11  ·          -  │

davidtaikocha
davidtaikocha previously approved these changes Feb 28, 2023
@dantaik dantaik enabled auto-merge February 28, 2023 01:12
Brechtpd
Brechtpd previously approved these changes Feb 28, 2023
davidtaikocha
davidtaikocha previously approved these changes Feb 28, 2023
@dantaik dantaik disabled auto-merge February 28, 2023 07:08
@dantaik dantaik dismissed stale reviews from davidtaikocha and Brechtpd via 85663bc February 28, 2023 07:12
@dantaik dantaik added this pull request to the merge queue Feb 28, 2023
Merged via the queue into main with commit 0d86d4b Feb 28, 2023
@dantaik dantaik deleted the single_prover branch February 28, 2023 07:17
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.

5 participants