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): pacaya fork with simplified based rollup protocol #18535

Open
wants to merge 172 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
172 commits
Select commit Hold shift + click to select a range
b01e6c3
more
dantaik Nov 23, 2024
2c61574
refactor(protocol): multiple improvements on implementation and tests…
dantaik Nov 29, 2024
4dfebd0
forge fmt & update contract layout tables
dantaik Nov 29, 2024
2086135
remove minBlocksToVerify
dantaik Nov 30, 2024
5c133ec
forge fmt & update contract layout tables
dantaik Nov 30, 2024
2b39162
add verifier to TransitionProvedV3 event
dantaik Nov 30, 2024
e6a5447
forge fmt & update contract layout tables
dantaik Nov 30, 2024
5ed3284
resolved some TODOs
dantaik Nov 30, 2024
485bad6
forge fmt & update contract layout tables
dantaik Nov 30, 2024
91c3bca
use batch events
dantaik Nov 30, 2024
f7c1b91
Update ITaikoL1.sol
dantaik Nov 30, 2024
ff0ff24
forge fmt & update contract layout tables
dantaik Nov 30, 2024
a75557d
enable calldata for txList (#18540)
dantaik Nov 30, 2024
8a9a23c
Merge branch 'main' into pacaya_fork
dantaik Nov 30, 2024
fcfa031
Delete TEST_TREE.md
dantaik Nov 30, 2024
eaf673a
forge fmt & update contract layout tables
dantaik Nov 30, 2024
26b53ff
fix bug
dantaik Nov 30, 2024
092a5e5
Update TaikoL1Test_Suite1.json
dantaik Nov 30, 2024
bcfc984
forge fmt & update contract layout tables
dantaik Nov 30, 2024
088d46a
minor comment changes
dantaik Nov 30, 2024
ee2b92d
forge fmt & update contract layout tables
dantaik Nov 30, 2024
b88bb5b
chore(protocol): fix typos (#18537)
xiaodino Dec 1, 2024
000d7f4
chore(protocol): remove MainnetTierProvider due to no found (#18536)
xiaodino Dec 1, 2024
a16d408
forge fmt & update contract layout tables
dantaik Dec 1, 2024
073a404
Merge branch 'main' into pacaya_fork
dantaik Dec 3, 2024
f76ab17
chore(protocol): test Ether as bond asset (#18558)
xiaodino Dec 7, 2024
04c36f5
Merge branch 'main' into ForkManager
dantaik Dec 7, 2024
8978ec8
Merge branch 'main' into pacaya_fork
dantaik Dec 7, 2024
7b528f0
forge fmt & update contract layout tables
dantaik Dec 7, 2024
b6fd111
remove supporting calldata as DA due to EIP-7623 (#18566)
dantaik Dec 8, 2024
f4c3185
Revert "remove supporting calldata as DA due to EIP-7623 (#18566)"
dantaik Dec 8, 2024
bf5ccc2
make latest config always have all fork heights & clean up verifier c…
dantaik Dec 8, 2024
762e20d
remove emitTxListInCalldata and calldataUsed from metadata
dantaik Dec 8, 2024
49cbdcd
more
dantaik Dec 8, 2024
08fd7e6
Update TaikoL1Test_Suite1.json
dantaik Dec 8, 2024
7e87f7a
chore(protocol): test bond deposit and withdrawal (#18564)
xiaodino Dec 9, 2024
3b232ec
Merge branch 'main' into ForkManager
dantaik Dec 10, 2024
32efe31
chore(protocol): test bond mechanics and calldata for txlist (#18575)
xiaodino Dec 13, 2024
b995683
Merge branch 'main' into pacaya_fork
dantaik Dec 13, 2024
fd96a1b
Update SP1Verifier.t.sol
dantaik Dec 13, 2024
ecf3e56
Update RollupResolver.sol
dantaik Dec 13, 2024
78dc045
Merge branch 'main' into ForkManager
dantaik Dec 15, 2024
33a0ecb
Merge branch 'ForkManager' into pacaya_fork
dantaik Dec 15, 2024
7f7cd9d
fix
dantaik Dec 15, 2024
9303f89
Update SP1Verifier.t.sol
dantaik Dec 15, 2024
8b3b93d
Merge branch 'main' into pacaya_fork
dantaik Dec 16, 2024
30b1a54
Update ForkManager.t.sol
dantaik Dec 16, 2024
a7abe70
forge fmt & update contract layout tables
dantaik Dec 16, 2024
9f758d6
rename
dantaik Dec 16, 2024
b4fa3c2
Update TaikoL1.sol
dantaik Dec 16, 2024
501c2fd
rename
dantaik Dec 16, 2024
e1eb410
chore(protocol): Add tests in SignalService.t.sol (#18599)
xiaodino Dec 16, 2024
eec4256
forge fmt & update contract layout tables
dantaik Dec 16, 2024
1927a30
feat(protocol): allow block propose to pass a bytes32 input to L2 anc…
dantaik Dec 16, 2024
b7c31e9
forge fmt & update contract layout tables
dantaik Dec 16, 2024
29682b7
chore(protocol): fix issues in test:coverage (#18582)
xiaodino Dec 16, 2024
1673665
chore(protocol): Add tests for LibBytes (#18604)
xiaodino Dec 17, 2024
5bd025c
feat(protocol): allow same-slot L1-to-L2 signalling (#18587)
dantaik Dec 17, 2024
a3f9818
Merge branch 'main' into pacaya_fork
dantaik Dec 17, 2024
89adac2
forge fmt & update contract layout tables
dantaik Dec 17, 2024
3daad26
Update TaikoL1Test_Suite1.json
dantaik Dec 17, 2024
4833b2f
Update TaikoL1Test_Suite1.json
dantaik Dec 17, 2024
92e7196
Update TaikoL1Test_Suite1.json
dantaik Dec 17, 2024
9e54d4b
forge fmt & update contract layout tables
dantaik Dec 17, 2024
0e99f65
Update ITaikoL1.sol
dantaik Dec 17, 2024
e4948e6
TaikoL1 -> TaikoInbox
dantaik Dec 17, 2024
dd1c004
forge fmt & update contract layout tables
dantaik Dec 17, 2024
7ff3c0b
TaikoL2 -> TaikoAnchor
dantaik Dec 17, 2024
909ac11
Delete taiko-anchor
dantaik Dec 17, 2024
122ec3d
forge fmt & update contract layout tables
dantaik Dec 17, 2024
9f1d7a8
fix gen-layout
dantaik Dec 17, 2024
0b05e31
forge fmt & update contract layout tables
dantaik Dec 17, 2024
3261a71
make TaikoAnchor generic
dantaik Dec 17, 2024
10b0ffc
rename
dantaik Dec 17, 2024
31060cc
rename
dantaik Dec 17, 2024
2156d4f
forge fmt & update contract layout tables
dantaik Dec 17, 2024
1bb9b70
fix comments
dantaik Dec 17, 2024
61caf26
fix
dantaik Dec 17, 2024
7a93c3c
feat(protocol): add deployment scripts for `Pacaya` (#18606)
davidtaikocha Dec 18, 2024
a45dd1c
feat(protocol): fix `Pacaya` genesis generation && tests (#18607)
davidtaikocha Dec 18, 2024
a59ee7b
improve comments
dantaik Dec 18, 2024
757c083
forge fmt & update contract layout tables
dantaik Dec 18, 2024
8a0bc5b
Update ProverSet.sol
dantaik Dec 19, 2024
18d6ab7
chore(protocol): Add tests for proposeBlocksV3 reverts for invalid pr…
xiaodino Dec 20, 2024
0d26d18
chore(protocol): add tests for LibNetwork (#18626)
xiaodino Dec 22, 2024
8c1836e
Merge branch 'main' into pacaya_fork
dantaik Dec 23, 2024
65041c8
introduce ITaiko.sol
dantaik Dec 23, 2024
9112a28
Update gen-layouts.sh
dantaik Dec 23, 2024
573797f
forge fmt & update contract layout tables
dantaik Dec 23, 2024
ecdf0ef
Update gen-layouts.sh
dantaik Dec 23, 2024
3d4249a
forge fmt & update contract layout tables
dantaik Dec 23, 2024
8518c1d
Update gen-layouts.sh
dantaik Dec 23, 2024
f0d8eaf
Merge branch 'clearer_layout' into pacaya_fork
dantaik Dec 23, 2024
6fcf076
forge fmt & update contract layout tables
dantaik Dec 23, 2024
52471ac
Merge branch 'main' into pacaya_fork
dantaik Dec 23, 2024
294d265
forge fmt & update contract layout tables
dantaik Dec 23, 2024
e12ec5a
Update Layer1Test.sol
dantaik Dec 23, 2024
1cfcb5b
Merge branch 'main' into pacaya_fork
dantaik Dec 27, 2024
c61bf99
Merge branch 'main' into pacaya_fork
dantaik Dec 27, 2024
686f2ce
bump version to 2.0.0
dantaik Dec 27, 2024
7717522
feat(protocol): add solver support to enable fast bridging of erc20 t…
AnshuJalan Dec 29, 2024
ccafc7d
Merge branch 'main' into pacaya_fork
dantaik Dec 29, 2024
2055ea2
Merge branch 'main' into pacaya_fork
davidtaikocha Dec 30, 2024
8fc2d61
chore(protocol): add tests for _validateBlockParams (#18680)
xiaodino Jan 2, 2025
6cda21c
Merge branch 'main' into pacaya_fork
dantaik Jan 2, 2025
0129fad
chore(protocol): add TokenUnlock_ProverSet test (#18704)
xiaodino Jan 3, 2025
338f4cf
chore(protocol): add tests for BridgedTaikoToken (#18707)
xiaodino Jan 6, 2025
cd09adc
Update LibTrieProof.sol
dantaik Jan 6, 2025
8eb5b2f
update solhint
dantaik Jan 6, 2025
dbf8d2b
Merge branch 'main' into pacaya_fork
dantaik Jan 6, 2025
230bba0
Update TaikoAnchor.t.sol
dantaik Jan 6, 2025
b54d467
Merge branch 'main' into pacaya_fork
davidtaikocha Jan 12, 2025
7e20c0f
forge fmt & update contract layout tables
davidtaikocha Jan 12, 2025
d52cf4a
feat(protocol): support smaller more frequent L2 blocks (replacing so…
dantaik Jan 13, 2025
d4ac84b
feat(protocol): redo ForkMananger (now ForkRouter) (#18751)
dantaik Jan 13, 2025
84667f3
use bytes for proposeBatch
dantaik Jan 13, 2025
7715065
abi
dantaik Jan 13, 2025
9ff1c0d
Update ProverSet.sol
dantaik Jan 13, 2025
65d9646
refactor
dantaik Jan 13, 2025
14c71a3
feat(protocol): improve prover set to support ontake and pacaya (#18755)
dantaik Jan 13, 2025
3699b07
feat(protocol): upgrade sp1 contract to v4.0.0-rc.3 (#18740)
smtmfft Jan 13, 2025
d6b99df
Merge branch 'main' into pacaya_fork
dantaik Jan 13, 2025
9590d17
forge fmt & update contract layout tables
dantaik Jan 13, 2025
2b4041c
add firstBlobIndex
dantaik Jan 13, 2025
5d576b9
fix typo
dantaik Jan 13, 2025
5d28e03
fix(protocol): fix block timestamp check (#18759)
dantaik Jan 13, 2025
180d529
Merge branch 'main' into pacaya_fork
davidtaikocha Jan 13, 2025
accbe8e
Update TaikoInbox.sol
dantaik Jan 13, 2025
5fd6e0c
minor improvement
dantaik Jan 13, 2025
857842f
chore(protocol): test isSignalSent and SS_SIGNAL_NOT_RECEIVED error i…
xiaodino Jan 14, 2025
72d658d
feat(protocol): allow anyone to prove a block before the deadline (#1…
dantaik Jan 15, 2025
82f45da
chore(protocol): change maxBlocksPerBatch to 768 to support 0.5s aver…
dantaik Jan 15, 2025
839804d
feat(protocol): improve liveness bond calculation to discourage empty…
dantaik Jan 15, 2025
5f4f58a
feat(protocol): pause the protocol when conflicting proofs are verifi…
dantaik Jan 16, 2025
9321331
Update packages/protocol/contracts/layer1/based/TaikoInbox.sol
dantaik Jan 16, 2025
60592c0
feat(protocol): add `getTransition(batchID,parentHash)` method (#18780)
davidtaikocha Jan 16, 2025
d5a472d
Merge branch 'main' into pacaya_fork
davidtaikocha Jan 16, 2025
e662952
feat(protocol): add `firstBlobIndex` to `BatchMetadata` (#18785)
davidtaikocha Jan 17, 2025
501f898
Merge branch 'main' into pacaya_fork
mask-pp Jan 17, 2025
4d53790
chore(protocol): update pacaya test naming (#18790)
cyberhorsey Jan 18, 2025
1a79dd2
fix(protocol): remove duplicated error definition (#18787)
YoGhurt111 Jan 18, 2025
b3541a8
feat(protocol): allow owner to write transition to rescue a block (#1…
dantaik Jan 18, 2025
6a86918
fix(protocol): fix bug about stopBatchId variable (#18789)
mask-pp Jan 19, 2025
c0ab98f
chore(protocol): test TransitionNotFound in getTransition(_batchId, _…
xiaodino Jan 20, 2025
46b8ac3
feat(protocol): introduce `SgxOrZkVerifier` to allow any valid proof …
YoGhurt111 Jan 20, 2025
6f6ca97
feat(protocol): fix the deployment script (#18796)
YoGhurt111 Jan 20, 2025
6ce5f10
fix(protocol): call `TaikoInbox.init` in deployment script (#18801)
davidtaikocha Jan 21, 2025
390dfa4
chore(protocol): add tests for setQuotaPeriod in QuotaManager (#18803)
xiaodino Jan 21, 2025
c4c4d36
feat(protocol): add any-two-verifier (#18795)
AnshuJalan Jan 21, 2025
6f8d780
Update packages/protocol/contracts/layer1/based/TaikoInbox.sol
dantaik Jan 21, 2025
c2acd7a
Update packages/protocol/contracts/layer1/based/TaikoInbox.sol
dantaik Jan 21, 2025
c84e761
fix(protocol): use batch instead of block in solver mechanism (#18808)
AnshuJalan Jan 21, 2025
351d1cd
feat(protocol): make resolver an Immutable (#18800)
dantaik Jan 21, 2025
db5fc28
fix(protocol): return liveness bond correctly (#18797)
dantaik Jan 21, 2025
ef3da24
feat(protocol): add preconfirmation whitelist and router (#18791)
AnshuJalan Jan 21, 2025
4e48e1a
fix test
dantaik Jan 21, 2025
6c78d66
Merge branch 'main' into pacaya_fork
dantaik Jan 21, 2025
f7e5128
Merge branch 'main' into pacaya_fork
dantaik Jan 21, 2025
06bd742
Merge branch 'main' into pacaya_fork
mask-pp Jan 21, 2025
64130a8
refactor(protocol): wrap blob related parameter into `BlobParams` for…
dantaik Jan 22, 2025
12de2cf
feat(protocol): add `anchorV2` back (#18820)
YoGhurt111 Jan 22, 2025
bb0a7b5
feat(protocol): whitelist addition + deploy script update (#18812)
cyberhorsey Jan 23, 2025
414bb95
Update IFork.sol
dantaik Jan 24, 2025
ece8ff9
forge fmt & update contract layout tables
dantaik Jan 24, 2025
7ac4087
feat(protocol): emit blob hashes in event and split meta into 2 struc…
dantaik Jan 24, 2025
70efba5
fix
dantaik Jan 24, 2025
d661d57
Merge branch 'main' into pacaya_fork
davidtaikocha Jan 24, 2025
a89cbcb
fix(protocol): fix a bug in ForkRouter (#18831)
dantaik Jan 24, 2025
925191c
fix(protocol): switch back to selector-based fork router (#18834)
dantaik Jan 24, 2025
bf62bd6
feat(protocol): add more selectors to `IOntakeFork` (#18836)
davidtaikocha Jan 24, 2025
93f4272
fix(protocol): rename resolve() to resolveAddress() (#18835)
dantaik Jan 24, 2025
d55f386
refactor(protocol): make resolveAddress internal in EssentialContract…
dantaik Jan 25, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 7 additions & 0 deletions .github/workflows/protocol.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ on:
- "!packages/protocol/docs/**"
- "!packages/protocol/simulation/**"
- "!packages/protocol/deployments/**"
- "!packages/protocol/script/layer2/hekla/**"
- "!packages/protocol/script/layer2/mainnet/**"
- "!packages/protocol/script/layer1/hekla/**"
- "!packages/protocol/script/layer1/mainnet/**"
- "!packages/protocol/script/layer1/preconf/**"
- "!packages/protocol/script/layer1/provers/**"
- "!packages/protocol/script/layer1/team/**"
branches-ignore:
- release-please--branches--**

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -120,3 +120,4 @@ __pycache__/

# Idea
.idea/
packages/protocol/snapshots/InboxTest_ProposeAndProve.json
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"packages/fork-diff": "0.6.1",
"packages/guardian-prover-health-check": "0.1.0",
"packages/guardian-prover-health-check-ui": "0.2.0",
"packages/protocol": "1.11.0",
"packages/protocol": "2.0.0",
"packages/relayer": "0.12.0",
"packages/snaefell-ui": "1.1.0",
"packages/supplementary-contracts": "1.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ description: Taiko protocol page for "TaikoL2.sol".

- `parentHash`: Hash of the parent block.
- `parentGasExcess`: Gas excess for base fee calculation.
<br/><br/>
<br/><br/>

2. **`EIP1559Update`**
Emitted when gas parameters (e.g., target, excess, base fee) are updated.
Expand Down
23 changes: 11 additions & 12 deletions packages/protocol/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,40 +15,39 @@ To install dependencies:
foundryup && pnpm install
```

## Compilation and Testing
## Compilation

Taiko’s protocol is split between Layer 1 (L1) and Layer 2 (L2). The smart contracts need to be compiled and tested separately for each layer:

### Layer 1 (Ethereum, Duncan Hardfork)

To compile, run tests, and generate the storage layout for L1:
To compile and generate the storage layout for L1:

```bash
pnpm compile:l1
pnpm test:l1
pnpm layout:l1
```

### Layer 2 (Taiko, Shanghai Hardfork)

Similarly, for L2:

```bash
pnpm compile:l2
pnpm test:l2
pnpm layout:l2
```

### Compile and Test for Both Layers

To compile and test contracts for both L1 and L2 at once:
To compile and generate the storage layout for both layers:

```bash
pnpm compile
pnpm test
pnpm layout
```

## Testing

```bash
pnpm test:l1
pnpm test:l2
pnpm test
```

## Layer 2 Genesis Block

### Generating a Dummy Genesis Block
Expand Down
1,832 changes: 6 additions & 1,826 deletions packages/protocol/contract_layout_layer1.md

Large diffs are not rendered by default.

818 changes: 2 additions & 816 deletions packages/protocol/contract_layout_layer2.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ contract AutomataDcapV3Attestation is IAttestation, EssentialContract {
event RevokedCertSerialNumAdded(uint256 indexed index, bytes serialNum);
event RevokedCertSerialNumRemoved(uint256 indexed index, bytes serialNum);

constructor() EssentialContract(address(0)) { }

// @notice Initializes the contract.
/// @param sigVerifyLibAddr Address of the signature verification library.
/// @param pemCertLibAddr Address of certificate library.
Expand Down Expand Up @@ -437,7 +439,7 @@ contract AutomataDcapV3Attestation is IAttestation, EssentialContract {
for (uint256 i; i < 3; ++i) {
bool isPckCert = i == 0; // additional parsing for PCKCert
bool certDecodedSuccessfully;
// todo! move decodeCert offchain
// TODO(Yue): move decodeCert offchain
(certDecodedSuccessfully, parsedQuoteCerts[i]) = pemCertLib.decodeCert(
authDataV3.certification.decodedCertDataArray[i], isPckCert
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ library V3Struct {

struct CertificationData {
uint16 certType;
// todo! In encoded path, we need to calculate the size of certDataArray
// TODO(Yue): In encoded path, we need to calculate the size of certDataArray
// certDataSize = len(join((BEGIN_CERT, certArray[i], END_CERT) for i in 0..3))
// But for plain bytes path, we don't need that.
uint32 certDataSize;
Expand Down
Loading