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)!: reserve 2 slots for TaikoData.Transition #15716

Merged
merged 63 commits into from
Feb 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
ab12a57
breaking change by removing signal service overhead
dantaik Feb 5, 2024
3744fc8
Merge branch 'alpha-6' into alpha-7
dantaik Feb 5, 2024
b5728d1
Merge branch 'alpha-6' into alpha-7
dantaik Feb 6, 2024
a0f5efb
remove signalRoot step 1
dantaik Feb 7, 2024
019ef54
Update LibProving.sol
dantaik Feb 7, 2024
45e8ceb
more
dantaik Feb 7, 2024
9224460
Update LibUtils.sol
dantaik Feb 7, 2024
758ab07
Update LibVerifying.sol
dantaik Feb 7, 2024
71396f4
more
dantaik Feb 7, 2024
5aa18f5
Update TaikoL2.sol
dantaik Feb 7, 2024
b050af5
Update TaikoL2.sol
dantaik Feb 7, 2024
f978d83
Update TaikoL2.sol
dantaik Feb 7, 2024
7f48859
Make code compiling
Feb 7, 2024
ed3d47c
Add back helpers and uncomment lines
Feb 7, 2024
d6def2a
fix anchor
dantaik Feb 7, 2024
27de76a
Update TaikoL2.sol
dantaik Feb 7, 2024
05dd063
Update TaikoL2.t.sol
dantaik Feb 7, 2024
2e22f3e
minor
dantaik Feb 7, 2024
28134d6
rename
dantaik Feb 7, 2024
1e70e33
rename
dantaik Feb 7, 2024
425be15
update multi-hop bridging diagrams
dantaik Feb 7, 2024
7a2d7f2
more error messages in signal service
dantaik Feb 7, 2024
0a809f9
Update SignalService.sol
dantaik Feb 7, 2024
27f51d3
Update SignalService.sol
dantaik Feb 7, 2024
2bd445b
Update SignalService.sol
dantaik Feb 7, 2024
8200313
Update SignalService.sol
dantaik Feb 7, 2024
9ded143
comments
dantaik Feb 7, 2024
bef6290
Update LibVerifying.sol
dantaik Feb 7, 2024
c6e72ff
more
dantaik Feb 7, 2024
528288d
Update TaikoL2.sol
dantaik Feb 7, 2024
f8986e4
more
dantaik Feb 7, 2024
13e3f1f
more
dantaik Feb 7, 2024
70a26a4
remove unnecessary resolve
Feb 7, 2024
4ad3781
remove LibBlockHeader
dantaik Feb 8, 2024
5059135
Delete RLPWriter.sol
dantaik Feb 8, 2024
7ead006
Remove mint
dantaik Feb 8, 2024
dbd15c5
Merge branch 'alpha-7' into remove-signal-root
dantaik Feb 8, 2024
0821cad
Merge branch 'alpha-6' into alpha-7
dantaik Feb 8, 2024
9f3c136
Merge branch 'alpha-6' into alpha-7
dantaik Feb 8, 2024
b86f7c5
Merge branch 'alpha-7' into remove-signal-root
dantaik Feb 8, 2024
911c424
fix tests
dantaik Feb 8, 2024
92066ab
fix tests
dantaik Feb 8, 2024
458234a
Merge branch 'main' into remove-signal-root
dantaik Feb 9, 2024
4f12970
Update TaikoToken.sol
dantaik Feb 9, 2024
67b9e4f
fix
dantaik Feb 9, 2024
233f712
Update SignalService.sol
dantaik Feb 9, 2024
52147b3
reserve 2 slots for TaikoData.Transition
dantaik Feb 9, 2024
08c0ae2
Revert "reserve 2 slots for TaikoData.Transition"
dantaik Feb 9, 2024
0ed00af
fmt
dantaik Feb 9, 2024
2826b17
Merge branch 'main' into remove-signal-root
dantaik Feb 9, 2024
238f8a4
Update packages/protocol/contracts/L1/TaikoL1.sol
dantaik Feb 9, 2024
93869d9
Update packages/protocol/contracts/signal/SignalService.sol
dantaik Feb 9, 2024
57b73c5
Update packages/protocol/contracts/L2/TaikoL2.sol
dantaik Feb 9, 2024
298bd20
Update packages/protocol/contracts/signal/SignalService.sol
dantaik Feb 9, 2024
c0b39c8
Update PseZkVerifier.sol
dantaik Feb 9, 2024
24eb8c7
feat(protocol)!: reserve 2 slots for TaikoData.Transition [wait for b…
dantaik Feb 9, 2024
f206ef3
Update SignalService.sol
dantaik Feb 9, 2024
a2771e7
Merge branch 'main' into remove-signal-root
dantaik Feb 10, 2024
98bc5da
Merge branch 'remove-signal-root' into add_extra_slots
dantaik Feb 10, 2024
aede018
Merge branch 'main' into add_extra_slots
dantaik Feb 10, 2024
690519f
Merge branch 'main' into add_extra_slots
dantaik Feb 10, 2024
6027fa5
Merge branch 'main' into add_extra_slots
dantaik Feb 11, 2024
efd6ade
Merge branch 'main' into add_extra_slots
davidtaikocha Feb 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/protocol/contracts/L1/TaikoData.sol
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ library TaikoData {
bytes32 blockHash;
bytes32 stateRoot;
bytes32 graffiti;
bytes32[2] __reserved;
}

/// @dev Struct representing state transition data.
Expand Down
3 changes: 1 addition & 2 deletions packages/protocol/contracts/signal/SignalService.sol
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,7 @@ contract SignalService is EssentialContract, ISignalService {
// If a signal is sent from chainA -> chainB -> chainC (this chain), we verify the proofs in
// the following order:
// 1. using chainC's latest parent's stateRoot to verify that chainB's TaikoL1/TaikoL2
// contract has
// sent a given hop stateRoot on chainB using its own signal service.
// contract has sent a given hop stateRoot on chainB using its own signal service.
// 2. using the verified hop stateRoot to verify that the source app on chainA has sent a
// signal using its own signal service.
// We always verify the proofs in the reversed order (top to bottom).
Expand Down
3 changes: 2 additions & 1 deletion packages/protocol/test/L1/TaikoL1LibProvingWithTiers.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -790,7 +790,8 @@ contract TaikoL1LibProvingWithTiers is TaikoL1TestBase {
parentHash: parentHash,
blockHash: blockHash,
stateRoot: stateRoot,
graffiti: 0x0
graffiti: 0x0,
__reserved: [bytes32(0), bytes32(0)]
});

TaikoData.TierProof memory proof;
Expand Down
3 changes: 2 additions & 1 deletion packages/protocol/test/L1/TaikoL1TestBase.sol
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,8 @@ abstract contract TaikoL1TestBase is TaikoTest {
parentHash: parentHash,
blockHash: blockHash,
stateRoot: stateRoot,
graffiti: 0x0
graffiti: 0x0,
__reserved: [bytes32(0), bytes32(0)]
});

bytes32 instance =
Expand Down
6 changes: 4 additions & 2 deletions packages/protocol/test/verifiers/GuardianVerifier.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ contract TestGuardianVerifier is TaikoL1TestBase {
parentHash: bytes32(0),
blockHash: bytes32(0),
stateRoot: bytes32(0),
graffiti: bytes32(0)
graffiti: bytes32(0),
__reserved: [bytes32(0), bytes32(0)]
});

// TierProof
Expand All @@ -59,7 +60,8 @@ contract TestGuardianVerifier is TaikoL1TestBase {
parentHash: bytes32(0),
blockHash: bytes32(0),
stateRoot: bytes32(0),
graffiti: bytes32(0)
graffiti: bytes32(0),
__reserved: [bytes32(0), bytes32(0)]
});

// TierProof
Expand Down
33 changes: 22 additions & 11 deletions packages/protocol/test/verifiers/PseZkVerifier.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ contract TestPseZkVerifier is TaikoL1TestBase {
parentHash: bytes32(0),
blockHash: bytes32(0),
stateRoot: bytes32(0),
graffiti: bytes32(0)
graffiti: bytes32(0),
__reserved: [bytes32(0), bytes32(0)]
});

// TierProof
Expand All @@ -77,7 +78,8 @@ contract TestPseZkVerifier is TaikoL1TestBase {
parentHash: bytes32(0),
blockHash: bytes32(0),
stateRoot: bytes32(0),
graffiti: bytes32(0)
graffiti: bytes32(0),
__reserved: [bytes32(0), bytes32(0)]
});

// TierProof
Expand Down Expand Up @@ -128,7 +130,8 @@ contract TestPseZkVerifier is TaikoL1TestBase {
parentHash: bytes32("12"),
blockHash: bytes32("23"),
stateRoot: bytes32("34"),
graffiti: bytes32("1234")
graffiti: bytes32("1234"),
__reserved: [bytes32(0), bytes32(0)]
});

// TierProof
Expand Down Expand Up @@ -165,7 +168,8 @@ contract TestPseZkVerifier is TaikoL1TestBase {
parentHash: bytes32("12"),
blockHash: bytes32("23"),
stateRoot: bytes32("34"),
graffiti: bytes32("1234")
graffiti: bytes32("1234"),
__reserved: [bytes32(0), bytes32(0)]
});

// TierProof
Expand Down Expand Up @@ -194,7 +198,8 @@ contract TestPseZkVerifier is TaikoL1TestBase {
parentHash: bytes32("12"),
blockHash: bytes32("23"),
stateRoot: bytes32("34"),
graffiti: bytes32("1234")
graffiti: bytes32("1234"),
__reserved: [bytes32(0), bytes32(0)]
});

// TierProof
Expand Down Expand Up @@ -232,7 +237,8 @@ contract TestPseZkVerifier is TaikoL1TestBase {
parentHash: bytes32("12"),
blockHash: bytes32("23"),
stateRoot: bytes32("34"),
graffiti: bytes32("1234")
graffiti: bytes32("1234"),
__reserved: [bytes32(0), bytes32(0)]
});

// TierProof
Expand Down Expand Up @@ -269,7 +275,8 @@ contract TestPseZkVerifier is TaikoL1TestBase {
parentHash: bytes32("12"),
blockHash: bytes32("23"),
stateRoot: bytes32("34"),
graffiti: bytes32("1234")
graffiti: bytes32("1234"),
__reserved: [bytes32(0), bytes32(0)]
});

// TierProof
Expand Down Expand Up @@ -303,7 +310,8 @@ contract TestPseZkVerifier is TaikoL1TestBase {
parentHash: bytes32("12"),
blockHash: bytes32("23"),
stateRoot: bytes32("34"),
graffiti: bytes32("1234")
graffiti: bytes32("1234"),
__reserved: [bytes32(0), bytes32(0)]
});

// TierProof
Expand Down Expand Up @@ -344,7 +352,8 @@ contract TestPseZkVerifier is TaikoL1TestBase {
parentHash: bytes32("12"),
blockHash: bytes32("23"),
stateRoot: bytes32("34"),
graffiti: bytes32("1234")
graffiti: bytes32("1234"),
__reserved: [bytes32(0), bytes32(0)]
});

// TierProof
Expand Down Expand Up @@ -385,7 +394,8 @@ contract TestPseZkVerifier is TaikoL1TestBase {
parentHash: bytes32("12"),
blockHash: bytes32("23"),
stateRoot: bytes32("34"),
graffiti: bytes32("1234")
graffiti: bytes32("1234"),
__reserved: [bytes32(0), bytes32(0)]
});

// TierProof
Expand Down Expand Up @@ -423,7 +433,8 @@ contract TestPseZkVerifier is TaikoL1TestBase {
parentHash: bytes32("12"),
blockHash: bytes32("23"),
stateRoot: bytes32("34"),
graffiti: bytes32("1234")
graffiti: bytes32("1234"),
__reserved: [bytes32(0), bytes32(0)]
});

// TierProof
Expand Down
18 changes: 12 additions & 6 deletions packages/protocol/test/verifiers/SgxVerifier.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,8 @@ contract TestSgxVerifier is TaikoL1TestBase, AttestationBase {
parentHash: bytes32("12"),
blockHash: bytes32("34"),
stateRoot: bytes32("56"),
graffiti: bytes32("78")
graffiti: bytes32("78"),
__reserved: [bytes32(0), bytes32(0)]
});

// TierProof
Expand Down Expand Up @@ -243,7 +244,8 @@ contract TestSgxVerifier is TaikoL1TestBase, AttestationBase {
parentHash: bytes32("12"),
blockHash: bytes32("34"),
stateRoot: bytes32("56"),
graffiti: bytes32("78")
graffiti: bytes32("78"),
__reserved: [bytes32(0), bytes32(0)]
});

// TierProof
Expand Down Expand Up @@ -274,7 +276,8 @@ contract TestSgxVerifier is TaikoL1TestBase, AttestationBase {
parentHash: bytes32("12"),
blockHash: bytes32("34"),
stateRoot: bytes32("56"),
graffiti: bytes32("78")
graffiti: bytes32("78"),
__reserved: [bytes32(0), bytes32(0)]
});

// TierProof
Expand Down Expand Up @@ -307,7 +310,8 @@ contract TestSgxVerifier is TaikoL1TestBase, AttestationBase {
parentHash: bytes32("12"),
blockHash: bytes32("34"),
stateRoot: bytes32("56"),
graffiti: bytes32("78")
graffiti: bytes32("78"),
__reserved: [bytes32(0), bytes32(0)]
});

// TierProof
Expand Down Expand Up @@ -345,7 +349,8 @@ contract TestSgxVerifier is TaikoL1TestBase, AttestationBase {
parentHash: bytes32("12"),
blockHash: bytes32("34"),
stateRoot: bytes32("56"),
graffiti: bytes32("78")
graffiti: bytes32("78"),
__reserved: [bytes32(0), bytes32(0)]
});

// TierProof
Expand Down Expand Up @@ -384,7 +389,8 @@ contract TestSgxVerifier is TaikoL1TestBase, AttestationBase {
parentHash: bytes32("12"),
blockHash: bytes32("34"),
stateRoot: bytes32("56"),
graffiti: bytes32("78")
graffiti: bytes32("78"),
__reserved: [bytes32(0), bytes32(0)]
});

// TierProof
Expand Down
Loading