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): optimize core protocol and bridge implementation #14310

Merged
merged 148 commits into from
Aug 27, 2023

Conversation

adaki2004
Copy link
Contributor

@adaki2004 adaki2004 commented Jul 28, 2023

Inspired by Brecht's feature request, this PR aims to separate the current prover (pool) contract from the core protocol, allowing various prover contract designs. Taiko will act as the "glue" between the core protocol and different prover contracts.

Core protocol Changes introduced in this PR:

  • Block Proposal: Blocks must assign a non-zero prover address, and proposers will pay a non-refundable Ether fee to the prover. The prover will burn Taiko tokens as a bond, returned if proof is submitted within 90 minutes; otherwise, the block opens, and half the bond goes to the actual prover.
  • Prover Authorization: If an EOA, must authorize the proposer with a valid ECDSA signature; if a contract, must have a onBlockAssigned function that doesn't revert.
  • Notification Calls: Removed on-chain notification calls to prover (pool) contract to prevent malicious exploitation.
  • Prover (Pool) Contract and API: Deleted IProverPool. Taiko and partners will create a Pool API server for proposers to access proving services.
  • Token and Configuration: Taiko token supply won't increase; decimals are set to 18. TaikoConfig is simplified, loaded from a Library for testing.
  • @davidtaikocha @smtmfft I added two TODOs for you in this PR.

Taiko Token functions as a bond token for provers.

Bridge changes introduced in this PR:

  • Introduced a recallMessage on the source bridge, it will call the message.from to perform custom recall function. (Releasing Ether is no longer handled by the bridge, but the message's from contract.
  • Implemented all optimizations captured in this issue: A few Bridge improvement ideas #14384
  • Added NFT vaults

dantaik and others added 30 commits June 28, 2023 15:30
Co-authored-by: D <[email protected]>
Co-authored-by: dantaik <[email protected]>
Co-authored-by: dave | d1onys1us <[email protected]>
Co-authored-by: adaki2004 <[email protected]>
Co-authored-by: jeff <[email protected]>
Co-authored-by: Francisco Ramos <[email protected]>
Co-authored-by: David <[email protected]>
Co-authored-by: Kenk <[email protected]>
Co-authored-by: mfinestone <[email protected]>
Co-authored-by: hideonbug <[email protected]>
Co-authored-by: megumii <[email protected]>
Co-authored-by: Tomaž <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Daniel Wang <[email protected]>
Co-authored-by: adaki2004 <[email protected]>
Co-authored-by: Jeffery Walsh <[email protected]>
Co-authored-by: cyberhorsey <[email protected]>
Co-authored-by: Brecht Devos <[email protected]>
Co-authored-by: dantaik <[email protected]>
Co-authored-by: Jeffery Walsh <[email protected]>
Co-authored-by: cyberhorsey <[email protected]>
dantaik
dantaik previously approved these changes Aug 26, 2023
Brechtpd
Brechtpd previously approved these changes Aug 26, 2023
…otocol (#14541)

Co-authored-by: adaki2004 <[email protected]>
Co-authored-by: David <[email protected]>
Co-authored-by: Jeffery Walsh <[email protected]>
Co-authored-by: D <[email protected]>
@dantaik dantaik dismissed stale reviews from Brechtpd and themself via 001b722 August 27, 2023 13:51
@dantaik dantaik changed the title refactor(protocol): optimize bridge with recallMessage and other simplifications refactor(protocol): optimize core protocol and bridge implementation Aug 27, 2023
@dantaik
Copy link
Contributor

dantaik commented Aug 27, 2023

@Brechtpd @davidtaikocha @cyberhorsey please approve this PR again -- I just merge the core protocol optimization PR into this one.

@dantaik dantaik enabled auto-merge August 27, 2023 13:54
Merged via the queue into main with commit 437763a Aug 27, 2023
8 of 9 checks passed
@dantaik dantaik deleted the one_txn_token_and_eth_release branch August 27, 2023 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

A few Bridge improvement ideas
9 participants