... | @@ -10,31 +10,38 @@ |
... | @@ -10,31 +10,38 @@ |
|
```
|
|
```
|
|
- tag 指该行数据的类别, 其具体类型为:
|
|
- tag 指该行数据的类别, 其具体类型为:
|
|
```rust
|
|
```rust
|
|
pub enum Tag {
|
|
|
|
#[default]
|
|
pub enum Tag {
|
|
ChainId
|
|
#[default]
|
|
BlockCoinbase,
|
|
Nil,
|
|
BlockTimestamp,
|
|
ChainId,
|
|
BlockNumber,
|
|
BlockNumber,
|
|
BlockDifficulty,
|
|
BlockHash,
|
|
BlockGasLimit,
|
|
// block coinbase and timestamp
|
|
BlockBaseFee,
|
|
BlockCoinbaseAndTimestamp,
|
|
BlockHash,
|
|
// block gas limit, and the BaseFee
|
|
TxStatus,
|
|
BlockGasLimitAndBaseFee,
|
|
// combine From and Value together to reduce number of lookups
|
|
// the total number of txs and logs in a block, and the block difficulty
|
|
TxFromValue,
|
|
BlockTxLogNumAndDifficulty,
|
|
// combine To and CallDataLength together to reduce number of lookups
|
|
|
|
TxToCallDataSize,
|
|
// TxIsCreateAndStatus : include tx is create and call data gas cost, and tx status
|
|
TxIsCreate,
|
|
TxIsCreateAndStatus,
|
|
TxGasLimit,
|
|
// combine From and Value together to reduce number of lookups
|
|
TxGasPrice,
|
|
TxFromValue,
|
|
TxCalldata, //TODO make sure this equals copy tag PublicCalldata
|
|
// combine To and CallDataLength together to reduce number of lookups
|
|
TxLog,
|
|
TxToCallDataSize,
|
|
TxLogSize,
|
|
// tx gas limit and tx gas price
|
|
CodeSize,
|
|
TxGasLimitAndGasPrice,
|
|
}
|
|
TxCalldata,
|
|
|
|
TxLog,
|
|
|
|
TxLogData,
|
|
|
|
// bytecode size
|
|
|
|
CodeSize,
|
|
|
|
// bytecode hash
|
|
|
|
CodeHash,
|
|
|
|
}
|
|
```
|
|
```
|
|
- block_tx_idx 指交易id;当该行数据为BlockHash的时候指的是最近的block number
|
|
- block_tx_idx 指该条目的idx,在block相关的条目,表示该block在chunk的idx。在交易相关的条目,等于block_idx * 2^32 + tx_idx,tx_idx表示表示该tx在block的idx。当tag=BlockHash, 表示允许获取该条目的max_block_idx.
|
|
|
|
|
|
## 多功能列 Versatile columns
|
|
## 多功能列 Versatile columns
|
|
为了减少列的使用,缩减电路规模,设计了多功能的列。在不同的行数据类别下,这些列存放不同的数据。目前设计有4个多功能列,代码里呈现为:
|
|
为了减少列的使用,缩减电路规模,设计了多功能的列。在不同的行数据类别下,这些列存放不同的数据。目前设计有4个多功能列,代码里呈现为:
|
... | | ... | |