# Functions
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
It's just a hash value, and the hash value is key, so you don't need to save it.
Only hash is reserved.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
func NewEIP155Signer(chainId *big.Int) EIP155Signer {.
NewEIP2930Signer returns a signer that accepts EIP-2930 access list transactions, EIP-155 replay protected transactions, and legacy Homestead transactions.
No description provided by the author
No description provided by the author
No description provided by the author
NewEthTx creates a new transaction.
No description provided by the author
No description provided by the author
No description provided by the author
NewLondonSigner returns a signer that accepts - EIP-1559 dynamic fee transactions - EIP-2930 access list transactions, - EIP-155 replay protected transactions, and - legacy Homestead transactions.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewReceipt creates a barebone transaction receipt, copying the init fields.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
PrefixedRlpHash writes the prefix into the hasher before rlp-encoding x.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ReadReceipt retrieves a specific transaction receipt from the database, along with its added positional metadata.
No description provided by the author
RlpHash encodes x and hashes the encoded bytes.
No description provided by the author
No description provided by the author
No description provided by the author
Deprecated.
No description provided by the author
No description provided by the author
No description provided by the author
VerifyHash verify msg hash signature.
No description provided by the author
verify msg signature.
No description provided by the author
No description provided by the author
No description provided by the author
# Constants
No description provided by the author
account banned.
testing constant.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
BlockHeader version 1: add RRReceiptRoot reserved for v2.11.0 make merkle trie root with all properties in the object make receipt root as merkle trie hash of receipts Calculate blockHeader.TransactionRoot using transaction hash value with signature modify the calculation method of ElectedNextRoot 2: since v2.11.03, add ConfirmedRoot 3: since v2.12.0, add RewardedEra 4: since v3.1.0, placeholder in v2.14.2, add BridgeRoot 5: since v3.2.0, placeholder in v2.14.2, add Random 6: since v3.2.1, placeholder in v2.14.2, new strategy of generating seed (Header.FactorRoot=Sign(Body.SeedFactor), NewCommitteeSeed=Header.FactorRoot[:SeedLength]|BlockNum>=SeedBlock) 7: since v2.14.2, parameters generated by proposer for transactions: TxParams 8: since v2.14.4, all integer fields use the hash value of uint64 big-endian serialized bytes (for the convenience of solidity).
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
when a sub-chain has not been confirmed for N>=ChainStoppedThreshold consecutive blocks on the main chain, it is considered that the sub-chain has stopped.
no version.
merkle hash.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
The consensus node pledges is calculated at most according to this,(202012: from 50000->10000).
The data node pledges is calculated at most according to this, (202012: from 200000->50000, 202201: -> 500000).
Lower limit of consensus node pledges, (202012: from 50000->10000).
Lower limit of data node pledges, (202012: from 200000->50000).
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
compatible with Ethereum's transaction hash, pay attention to the tx.Hash() and tx.HashValue() methods when upgrading the version.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
double sign Audited and Revealed for the same block.
signing for different blocks at the same height in the same chain.
Audited different blocks at the same height in the same chain.
No description provided by the author
new pre-election.
pre-electing.
exiting.
No description provided by the author
starting.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ReceiptStatusFailed is the status code of a transaction if execution failed.
ReceiptStatusSuccessful is the status code of a transaction if execution succeeded.
No description provided by the author
use RLP to serialize the Receipt object.
use the merkle root of Logs to calculate the hash value of Receipt.
No description provided by the author
RewardReqeust version 1: add SubProof/MainProof/ProofedHeight/Version.
No description provided by the author
No description provided by the author
RRActVersion: 1: Account.
No description provided by the author
since v2.12.0, account delegate to a consensus node.
Deposit.
The valid value must be less than this value.
Confiscation deposit.
since v2.11.0, NewStatus>0: RRInfo.Status |= uint16(NewStatus), NewStatus<0:RRInfo.Status &= (^uint16(-NewStatus)).
since v2.12.0, account un-delegate from a consensus node.
Withdraw.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
RRInfoVersion: 1: NodeCount 2: statue 3: newpos (Avail, Voted, VotedAmount, Settles) 4: PoSv3 (Voted/VotedAmount removed, add Delegated).
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
original version.
add chainid and height to hash.
add HistoryProof and AuditorPass for auditing, use Header instead of chainid+height+BlockHash.
HashValue changes.
rollback to original version (ChainID+Height+HoB+Comm).
use HistoryProof to proof NextComm.Hash() -> BlockHash, if NextComm exists.
No description provided by the author
No description provided by the author
TKM Bridge ERC1155.
No description provided by the author
No description provided by the author
TKM Bridge ERC20.
No description provided by the author
No description provided by the author
No description provided by the author
TKM Bridge ERC721.
No description provided by the author
source ERC1155: function safeTransferFrom(address _from, address _to, uint256 _id, uint256 _value, bytes calldata _data) external; target ERC1155: function mint(address _to, uint256 _id, uint256 _value, bytes calldata _data) external; function burn(address _to, uint256 _id, uint256 _value) external;.
source ERC20: function transferFrom(address _from, address _to, uint256 _value) external returns (bool success); target ERC20: function mint(address _to, uint256 _value) external; function burnFrom(address _to, uint256 _value) external;.
source ERC721: function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes calldata data) external payable; target ERC721: function claim(uint256 _tokenId, address _to) external; function mint(address _to) external returns(uint256 _tokenId); function burn(uint256 _tokenId) external;.
since v2.14.2, HisProof for the proof from CashRequest.ProofHeight or CancelCashCheckRequest.ConfirmedHeight to ProposingBlock.Header.ParentHash.
No description provided by the author
1: There is a bug in V0, which leads to insufficient amount when creating or invoking the contract, and the transaction will be packaged, but the nonce value does not increase 2: ETH compatible, add base chain id for conversion to ETH chainid 3: update base chain id from 100007 to 70000 4: convert Transaction to ETHTransaction with correct TxType even if there is no TxType in Extras DyanamicFeeTx: if GasTipCap or GasFeeCap not nil, or AccessListTxType: if AccessList it not nil, or LegacyTxType: else.
No description provided by the author
No description provided by the author
Withdraw lags 2 eras.
# Variables
melt down currency.
No description provided by the author
No description provided by the author
No description provided by the author
build-in accounts.
No description provided by the author
No description provided by the author
forward the principal tx to vm by agent tx and all gas paid by agent.
melt down gas.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
binding account of genesis nodes.
reward account.
No description provided by the author
bridge.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Pledge threshold for consensus nodes.
Pledge threshold for data node.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Structs
AccessListTx is the data of EIP-2930 access list transactions.
AccessTuple is the element type of an access list.
1.
No description provided by the author
No description provided by the author
No description provided by the author
Even if it is an empty block, the attendance table must be filled in.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
BlockCursor Cursor information used to record blocks, including block height and block hash.
No description provided by the author
No description provided by the author
BlockReport report of Block.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
defination of bridge stored in main chain 1.
bridge mint or burn request, generated and stored in from-chain, processed in target-chain key: Height(8)+ToAccount(20)+Nonce(8), ordered with height and unique by account+nonce.
No description provided by the author
No description provided by the author
the response of the request send from SourceChain to TargetChain a response should be send from TargetChain to SourceChain to update the status of the request SourceChain is the key in the upper level of the trie which is not included in the struct.
Bridge request trie node, generate trie root for block header TargetChainID -> (Height, Account, Nonce) -> Requests.
No description provided by the author
No description provided by the author
a valid cancel request must: 1.
Verifiable Cash Check, for cross chain transfer In order to avoid synchronous recovery of ChainInfos in main chain when recovering data, the chain information is input by the user, and it is enough to check whether the local data is legal when executing (because even if the main chain data is not synchronized, the local chain information can still be known).
Check cashing request object is generated by RPC interface and submitted to the target chain through TX.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
preifx+NextEpochNum -> CommitteeIndex(block info of next committee announced) It is used to record the height of the block where the current chain releases the election results of the next consensus committee, and record the proof of the block height Hash recorded by the previous CommitteeIndex to the current block hash.
for compatible with old version hash of AccountDelta TODO delete compatible when restart the chain with new version.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Pack deltas generated by multiple blocks together.
No description provided by the author
No description provided by the author
EIP155Signer implements Signer using the EIP-155 rules.
No description provided by the author
No description provided by the author
No description provided by the author
the type in Event (BlockReport/BlockSummary).
ETHTransaction is an Ethereum transaction.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
HomesteadSigner HomesteadTransaction implements TransactionInterface using the homestead rules.
为了使ETHSigner无状态,Signer中的chainId被取消。因此,当VRS信息不全时,会导致LegacyTx的chainID()和Hash()方法的错误 Hash()方法返回错误的signature hash值,会影响签名等一系列问题。 所以,在GTKM中,LegacyTx只能存储有签名的完全信息。这一点,由所有创建ETHTransaction的地方确保。 需要签名时,可以使用Transaction对象 LegacyTx is the transaction data of regular Ethereum transactions.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Pack deltas generated by multiple blocks together.
No description provided by the author
PenaltySet is used to record the info of penalty set specified by Type.
No description provided by the author
record the transaction process result.
The pre-election records, generated by the contract call of creation of the chain or the start of the pre-election, are put into the block after the main chain is generated.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
when there is a problem with the main chain (such as stop, or a bad block), broadcast this message in the main chain to restart the main chain consensus.
Receipt represents the results of a transaction.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
TODO: add the proof from the LastHeader.Hash to the hash of the block where it's been confirmed
in main chain to ensure its validity.
No description provided by the author
No description provided by the author
No description provided by the author
Required Reserve Change.
Required Reserve Information of the node.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
the TxData compactible with ETHTransaction that support all properties in TKM Transaction including all properties in LegacyTxType/AccessListTxType/DynamicFeeTxType.
No description provided by the author
data structure of SPV of any transaction packed in any chain (main-chain or sub-chains) only blocks blocks that have been confirmed by the main chain on the sub-chain are considered final confirmation.
TXIndex Transaction index.
由于节点不能保证存储各链的历史数据,当一个节点重新执行历史块时,很有可能无法从本地获得历史数据进行验证, 导致执行结果与打包时不一致。为此,增加TxParam,由Proposer节点在打包块时,将这部分信息以自证方式保存 在块中,后续的校验则不用再使用历史数据。 Since the nodes cannot guarantee to store the historical data of each chain, when a node re-executes the historical block, it is very likely that the historical data cannot be obtained locally for verification, resulting in inconsistent execution results and packaging.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Interfaces
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
dynamic and static error messages.
No description provided by the author
KeccakState wraps sha3.state.
No description provided by the author
Signer encapsulates transaction signature handling.
TxData This is implemented by DynamicFeeTx, LegacyTx and AccessListTx.
No description provided by the author
No description provided by the author
# Type aliases
AccessList is an EIP-2930 access list.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
two blocks (A and B) in one chain, A.Height < B.Height 1.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Pack deltas generated by multiple blocks together.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
shardid -> [0]:start height, [1]:length of missing heights.
No description provided by the author
No description provided by the author
No description provided by the author
Objects placed in the block, the ongoing pre-election list sorted by (Expire, ChainID), and generate MerkleTreeHash into the block header.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Required Reserve Act Type.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
It is used to save the ordered waterlines of all other shards in the same group after the execution of this block in this chain.
No description provided by the author