package
2.0.1+incompatible
Repository: https://github.com/dipperin/dipperin-core.git
Documentation: pkg.go.dev

# README

BlockValidation

  1. Verify header

CsBFT does not modify data when verifying state roots and registering roots SaveBlock confirms data and save data when verifying status root and registration root

completeness rateblock typeconsensusmethod
completebothblock configuration correct:version ID,chain ID, etcValidateBlockVersion
completebothverify continuum of block heightValidateBlockNumber
completebothverify correctness of block hashValidateBlockHash
completebothverify block size smaller than default maximumValidateBlockSize
completenormal blockverify block difficulty meets the needValidateBlockDifficulty
completenormal blockverify block hash satisfies the difficultyValidHashForDifficulty
completebothverify correctness of block seedValidateSeed
completespecial blockverify the address of the miner of the block is boot nodeValidateBlockCoinBase
completebothverify vote root hashvalidVerificationRoot
completebothverify transaction root hashValidateBlockTxs
completebothverify state root hashvalidStateRoot
completebothverify registration root hashvalidBlockVerifier
incompletebothverify interlink root hash???
  1. Verify votes

When CsBFT verifies the vote, it only needs to verify the verification in the body. The object is the last block. When SaveBlock verifies the vote, you need to verify the two sets of votes, except for verification, the other group is see commit, and the object is the current block.

completeness rateblock typeconsensusmethod
completenormal blockcheck at least 2/3 of verifiers votevalidVotesForBlock
completespecial blockcheck there is angel node who has votedvalidVotesForBlock
completespecial blockcheck vote type is correctHaltedVoteValid
completebothverify there is no repeated votesameVote
completebothcheck the voter is the current verifierverificationSignerInVerifiers
completebothverify the correctness of signature of verifiersver.Valid()
completebothverify the correctness of verifiersvalidVotesForBlock
  1. Verify Txs
completeness rateblock typeconsensusmethod
completespecial blockverify transaction list of the special block is emptyValidateBlockTxs
completenormal blockverify the correctness of signature of transactionsValidateBlockTxs
completenormal blockverify transactions of all types meet the need of safetytxValidators
completenormal blockverify the sender's balance is sufficientValidTxSender
completenormal blockverify the size of each transaction is smaller than the default maximal valueValidTxSize

# 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
NewValidatorTx create a validator for 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
validate_block typical usage: bc := InitBlockContext(block) m := &BlockProcessor{bc, chain} m.Use(ValidateBlockNumber(bc), ValidateBlockDifficulty(bc), ValidateBlockTxs(bc), ) m.Use(VrfCheckCommits(bc), ) m.Use(UpdateState(bc)) m.Use(InsertBlock(bc)) */.
No description provided by the author
No description provided by the author
No description provided by the author
valid gas limit.
No description provided by the author
SaveBlock use.
BFT use.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
do checking for different types of transactions.
valid sender and amount.

# Structs

No description provided by the author
No description provided by the author
No description provided by the author
visit chain, db, state_root through processor */.
basic middleware, can be comprised by other middleware.
No description provided by the author

# Interfaces

No description provided by the author
go:generate mockgen -destination=./chain_interface_mock_test.go -package=middleware github.com/dipperin/dipperin-core/core/cs-chain/chain-writer/middleware ChainInterfacego:generate mockgen -destination=../../../../tests/g-mockFile/chainInterface_mock_test.go -package=g_mockFile github.com/dipperin/dipperin-core/core/cs-chain/chain-writer/middleware ChainInterface.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Type aliases

No description provided by the author
No description provided by the author
No description provided by the author