Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
dantaik committed May 3, 2023
1 parent bd203f3 commit f8c1797
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 23 deletions.
1 change: 0 additions & 1 deletion packages/protocol/contracts/L1/TaikoData.sol
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ library TaikoData {
mapping(uint256 forkChoiceId => ForkChoice) forkChoices;
uint64 blockId;
uint64 proposedAt;
uint64 deposit;
uint24 nextForkChoiceId;
uint24 verifiedForkChoiceId;
bytes32 metaHash;
Expand Down
11 changes: 2 additions & 9 deletions packages/protocol/contracts/L1/TaikoL1.sol
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,7 @@ contract TaikoL1 is
}

/**
* Prove a block is valid with a zero-knowledge proof, a transaction
* merkel proof, and a receipt merkel proof.
* Prove a block with a zero-knowledge proof.
*
* @param blockId The index of the block to prove. This is also used
* to select the right implementation version.
Expand Down Expand Up @@ -176,20 +175,14 @@ contract TaikoL1 is
)
public
view
returns (
bytes32 _metaHash,
uint256 _deposit,
address _proposer,
uint64 _proposedAt
)
returns (bytes32 _metaHash, address _proposer, uint64 _proposedAt)
{
TaikoData.Block storage blk = LibProposing.getBlock({
state: state,
config: getConfig(),
blockId: blockId
});
_metaHash = blk.metaHash;
_deposit = blk.deposit;
_proposer = blk.proposer;
_proposedAt = blk.proposedAt;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/protocol/contracts/L1/TaikoToken.sol
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ contract TaikoToken is EssentialContract, ERC20Upgradeable, IMintableERC20 {
ERC20Upgradeable.__ERC20_init({
name_: _name,
symbol_: _symbol,
decimals_: 8
decimals_: 18
});

for (uint256 i = 0; i < _premintRecipients.length; ++i) {
Expand Down
1 change: 0 additions & 1 deletion packages/protocol/contracts/L1/libs/LibProposing.sol
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ library LibProposing {

blk.blockId = state.numBlocks;
blk.proposedAt = meta.timestamp;
blk.deposit = 0;
blk.nextForkChoiceId = 1;
blk.verifiedForkChoiceId = 0;
blk.metaHash = LibUtils.hashMetadata(meta);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ struct Block {
mapping(uint256 => struct TaikoData.ForkChoice) forkChoices;
uint64 blockId;
uint64 proposedAt;
uint64 deposit;
uint24 nextForkChoiceId;
uint24 verifiedForkChoiceId;
bytes32 metaHash;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ Initialize the rollup.

#### Parameters

| Name | Type | Description |
| --------------------- | ------- | ------------------------------------------------------------ |
| \_addressManager | address | The AddressManager address. |
| \_genesisBlockHash | bytes32 | The block hash of the genesis block. |
| \_initBlockFee | uint64 | Initial (reasonable) block fee value. |
| \_initProofTimeIssued | uint64 | Initial proof time which keeps the inflow/outflow in balance |
| Name | Type | Description |
| --------------------- | ------- | ------------------------------------------------------------------- |
| \_addressManager | address | The AddressManager address. |
| \_genesisBlockHash | bytes32 | The block hash of the genesis block. |
| \_initBlockFee | uint64 | Initial (reasonable) block fee value. |
| \_initProofTimeIssued | uint64 | Initial proof time issued corresponding with the initial block fee. |

### proposeBlock

Expand All @@ -54,15 +54,14 @@ Propose a Taiko L2 block.
function proveBlock(uint256 blockId, bytes input) external
```

Prove a block is valid with a zero-knowledge proof, a transaction
merkel proof, and a receipt merkel proof.
Prove a block with a zero-knowledge proof.

#### Parameters

| Name | Type | Description |
| ------- | ------- | ---------------------------------------------------------------------------------------------- |
| blockId | uint256 | The index of the block to prove. This is also used to select the right implementation version. |
| input | bytes | An abi-encoded TaikoData.ValidBlockEvidence object. |
| input | bytes | An abi-encoded TaikoData.BlockEvidence object. |

### verifyBlocks

Expand Down Expand Up @@ -117,7 +116,7 @@ function getProofReward(uint64 provenAt, uint64 proposedAt) public view returns
### getBlock

```solidity
function getBlock(uint256 blockId) public view returns (bytes32 _metaHash, uint256 _deposit, address _proposer, uint64 _proposedAt)
function getBlock(uint256 blockId) public view returns (bytes32 _metaHash, address _proposer, uint64 _proposedAt)
```

### getForkChoice
Expand Down

0 comments on commit f8c1797

Please sign in to comment.