-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(protocol): expose getUncleProofDelay function (#7058)
* expose avgProofTime for block id so users of bridge can see expectation of when their L2 block which contains their transaction can roughly be expected * rename * lint * chore(docs): auto commit solidity docs Co-authored-by: cyberhorsey <[email protected]>
- Loading branch information
1 parent
1206494
commit dd0f011
Showing
12 changed files
with
229 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
pnpm --filter "@taiko/proto" lint-staged | ||
pnpm --filter "@taiko/protocol" lint-staged |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
## IProofVerifier | ||
|
||
### verifyZKP | ||
|
||
```solidity | ||
function verifyZKP(bytes verificationKey, bytes zkproof, bytes32 blockHash, address prover, bytes32 txListHash) external pure returns (bool verified) | ||
``` | ||
|
||
### verifyMKP | ||
|
||
```solidity | ||
function verifyMKP(bytes key, bytes value, bytes proof, bytes32 root) external pure returns (bool verified) | ||
``` | ||
|
||
## ProofVerifier | ||
|
||
### verifyZKP | ||
|
||
```solidity | ||
function verifyZKP(bytes verificationKey, bytes zkproof, bytes32 blockHash, address prover, bytes32 txListHash) external pure returns (bool) | ||
``` | ||
|
||
### verifyMKP | ||
|
||
```solidity | ||
function verifyMKP(bytes key, bytes value, bytes proof, bytes32 root) external pure returns (bool) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
## TaikoData | ||
|
||
### Config | ||
|
||
```solidity | ||
struct Config { | ||
uint256 chainId; | ||
uint256 maxNumBlocks; | ||
uint256 blockHashHistory; | ||
uint256 zkProofsPerBlock; | ||
uint256 maxVerificationsPerTx; | ||
uint256 commitConfirmations; | ||
uint256 maxProofsPerForkChoice; | ||
uint256 blockMaxGasLimit; | ||
uint256 maxTransactionsPerBlock; | ||
uint256 maxBytesPerTxList; | ||
uint256 minTxGasLimit; | ||
uint256 anchorTxGasLimit; | ||
uint256 feePremiumLamda; | ||
uint256 rewardBurnBips; | ||
uint256 proposerDepositPctg; | ||
uint256 feeBaseMAF; | ||
uint256 blockTimeMAF; | ||
uint256 proofTimeMAF; | ||
uint64 rewardMultiplierPctg; | ||
uint64 feeGracePeriodPctg; | ||
uint64 feeMaxPeriodPctg; | ||
uint64 blockTimeCap; | ||
uint64 proofTimeCap; | ||
uint64 boostrapDiscountHalvingPeriod; | ||
uint64 initialUncleDelay; | ||
bool enableTokenomics; | ||
} | ||
``` | ||
|
||
### BlockMetadata | ||
|
||
```solidity | ||
struct BlockMetadata { | ||
uint256 id; | ||
uint256 l1Height; | ||
bytes32 l1Hash; | ||
address beneficiary; | ||
bytes32 txListHash; | ||
bytes32 mixHash; | ||
bytes extraData; | ||
uint64 gasLimit; | ||
uint64 timestamp; | ||
uint64 commitHeight; | ||
uint64 commitSlot; | ||
} | ||
``` | ||
|
||
### ProposedBlock | ||
|
||
```solidity | ||
struct ProposedBlock { | ||
bytes32 metaHash; | ||
uint256 deposit; | ||
address proposer; | ||
uint64 proposedAt; | ||
} | ||
``` | ||
|
||
### ForkChoice | ||
|
||
```solidity | ||
struct ForkChoice { | ||
bytes32 blockHash; | ||
uint64 provenAt; | ||
address[] provers; | ||
} | ||
``` | ||
|
||
### State | ||
|
||
```solidity | ||
struct State { | ||
mapping(uint256 => bytes32) l2Hashes; | ||
mapping(uint256 => struct TaikoData.ProposedBlock) proposedBlocks; | ||
mapping(uint256 => mapping(bytes32 => struct TaikoData.ForkChoice)) forkChoices; | ||
mapping(address => mapping(uint256 => bytes32)) commits; | ||
uint64 genesisHeight; | ||
uint64 genesisTimestamp; | ||
uint64 __reservedA1; | ||
uint64 statusBits; | ||
uint256 feeBase; | ||
uint64 nextBlockId; | ||
uint64 lastProposedAt; | ||
uint64 avgBlockTime; | ||
uint64 __avgGasLimit; | ||
uint64 latestVerifiedHeight; | ||
uint64 latestVerifiedId; | ||
uint64 avgProofTime; | ||
uint64 __reservedC1; | ||
uint256[42] __gap; | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
## TaikoEvents | ||
|
||
### BlockVerified | ||
|
||
```solidity | ||
event BlockVerified(uint256 id, bytes32 blockHash) | ||
``` | ||
|
||
### BlockCommitted | ||
|
||
```solidity | ||
event BlockCommitted(uint64 commitSlot, uint64 commitHeight, bytes32 commitHash) | ||
``` | ||
|
||
### BlockProposed | ||
|
||
```solidity | ||
event BlockProposed(uint256 id, struct TaikoData.BlockMetadata meta) | ||
``` | ||
|
||
### BlockProven | ||
|
||
```solidity | ||
event BlockProven(uint256 id, bytes32 parentHash, bytes32 blockHash, uint64 timestamp, uint64 provenAt, address prover) | ||
``` | ||
|
||
### Halted | ||
|
||
```solidity | ||
event Halted(bool halted) | ||
``` |
Oops, something went wrong.