Skip to content

Commit

Permalink
Merge branch 'main' into xiaodino/refactor-indexer-add-target
Browse files Browse the repository at this point in the history
  • Loading branch information
mask-pp authored Feb 22, 2024
2 parents f587be2 + 11af1cc commit abd8989
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 43 deletions.
Binary file not shown.
1 change: 0 additions & 1 deletion packages/protocol/contracts/L1/TaikoData.sol
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ library TaikoData {
bytes32 blockHash;
bytes32 stateRoot;
bytes32 graffiti;
bytes32[2] __reserved;
}

/// @dev Struct representing state transition data.
Expand Down
9 changes: 9 additions & 0 deletions packages/protocol/script/SetRemoteBridgeSuites.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ contract SetRemoteBridgeSuites is DeployCapability {
address public timelockAddress = vm.envAddress("TIMELOCK_ADDRESS");
address public addressManagerAddress = vm.envAddress("ADDRESS_MANAGER_ADDRESS");
uint256[] public remoteChainIDs = vm.envUint("REMOTE_CHAIN_IDS", ",");
address[] public remoteSignalServices = vm.envAddress("REMOTE_SIGNAL_SERVICES", ",");
address[] public remoteBridges = vm.envAddress("REMOTE_BRIDGES", ",");
address[] public remoteERC20Vaults = vm.envAddress("REMOTE_ERC20_VAULTS", ",");
address[] public remoteERC721Vaults = vm.envAddress("REMOTE_ERC721_VAULTS", ",");
Expand All @@ -32,6 +33,10 @@ contract SetRemoteBridgeSuites is DeployCapability {
require(
remoteChainIDs.length == remoteBridges.length, "invalid remote bridge addresses length"
);
require(
remoteChainIDs.length == remoteSignalServices.length,
"invalid remote SignalService addresses length"
);
require(
remoteChainIDs.length == remoteERC20Vaults.length,
"invalid remote ERC20Vault addresses length"
Expand All @@ -51,13 +56,17 @@ contract SetRemoteBridgeSuites is DeployCapability {
uint64 chainid = uint64(remoteChainIDs[i]);

if (securityCouncilPrivateKey == 0) {
register(addressManagerAddress, "signal_service", remoteSignalServices[i], chainid);
register(addressManagerAddress, "bridge", remoteBridges[i], chainid);
register(addressManagerAddress, "erc20_vault", remoteERC20Vaults[i], chainid);
register(addressManagerAddress, "erc721_vault", remoteERC721Vaults[i], chainid);
register(addressManagerAddress, "erc1155_vault", remoteERC1155Vaults[i], chainid);
continue;
}

registerByTimelock(
addressManagerAddress, "signal_service", remoteSignalServices[i], chainid
);
registerByTimelock(addressManagerAddress, "bridge", remoteBridges[i], chainid);
registerByTimelock(addressManagerAddress, "erc20_vault", remoteERC20Vaults[i], chainid);
registerByTimelock(
Expand Down
3 changes: 1 addition & 2 deletions packages/protocol/test/L1/TaikoL1LibProvingWithTiers.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -790,8 +790,7 @@ contract TaikoL1LibProvingWithTiers is TaikoL1TestBase {
parentHash: parentHash,
blockHash: blockHash,
stateRoot: stateRoot,
graffiti: 0x0,
__reserved: [bytes32(0), bytes32(0)]
graffiti: 0x0
});

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// TierProof
Expand Down

0 comments on commit abd8989

Please sign in to comment.