package
0.0.0-20230516101456-1d7836d562fc
Repository: https://github.com/exfury/grbchain.git
Documentation: pkg.go.dev
# Functions
FromProto sets a protobuf BlockID to the given pointer.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
CanonicalTime can be used to stringify time in a canonical way.
FromProto sets a protobuf Commit to the given pointer.
CommitToVoteSet constructs a VoteSet from the Commit and validator set.
ComputeAminoOverhead calculates the overhead for amino encoding a transaction.
DefaultBlockParams returns a default BlockParams.
DefaultConsensusParams returns a default ConsensusParams.
DefaultEvidenceParams Params returns a default EvidenceParams.
DefaultValidatorParams returns a default ValidatorParams, which allows only ed25519 pubkeys.
No description provided by the author
No description provided by the author
No description provided by the author
GenesisDocFromFile reads JSON data from a file and unmarshalls it into a GenesisDoc.
GenesisDocFromJSON unmarshalls JSON data into a GenesisDoc.
GetCodec returns a codec used by the package.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
FromProto sets a protobuf Header to the given pointer.
No description provided by the author
================================== =========== Venus4 ===============.
No description provided by the author
CanonicalizeVote transforms the given PartSetHeader to a CanonicalPartSetHeader.
CanonicalizeVote transforms the given Proposal to a CanonicalProposal.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
IsErrNotEnoughVotingPowerSigned returns true if err is ErrNotEnoughVotingPowerSigned.
2322600 is mainnet GenesisHeight.
No description provided by the author
1121818 is testnet GenesisHeight.
IsVoteTypeValid returns true if t is a valid vote type.
MakeBlock returns a new block with an empty header, except what can be computed from itself.
No description provided by the author
No description provided by the author
MaxDataBytes returns the maximum size of block's data.
MaxDataBytesUnknownEvidence returns the maximum size of block's data when evidence count is unknown.
MaxEvidencePerBlock returns the maximum number of evidences allowed in the block and their maximum total size (limitted to 1/10th of the maximum block size).
No description provided by the author
NewBlockMeta returns a new BlockMeta.
NewCommit returns a new Commit.
NewCommitSigAbsent returns new CommitSig with BlockIDFlagAbsent.
NewCommitSigForBlock returns new CommitSig with BlockIDFlagCommit.
No description provided by the author
NewDuplicateVoteEvidence creates DuplicateVoteEvidence with right ordering given two conflicting votes.
NewErrEvidenceInvalid returns a new EvidenceInvalid with the given err.
NewErrEvidenceOverflow returns a new ErrEvidenceOverflow where got > max.
No description provided by the author
No description provided by the author
No description provided by the author
NewEventBus returns a new event bus.
NewEventBusWithBufferCapacity returns a new event bus with the given buffer capacity.
UNSTABLE.
No description provided by the author
NewMockPVWithParams allows one to create a MockPV instance, but with finer grained control over the operation of the mock validator.
UNSTABLE.
Returns an immutable, full PartSet from the data bytes.
Returns an empty PartSet ready to be populated.
No description provided by the author
NewProposal returns a new Proposal.
NewResultFromResponse creates ABCIResult from ResponseDeliverTx.
NewResults creates ABCIResults from the list of ResponseDeliverTx.
No description provided by the author
No description provided by the author
No description provided by the author
NewValidatorSet initializes a ValidatorSet by copying over the values from `valz`, a list of Validators.
Constructs a new VoteSet struct used to accumulate votes for given height/round.
FromProto sets a protobuf PartSetHeader to the given pointer.
FromProto sets a protobuf Proposal to the given pointer.
No description provided by the author
No description provided by the author
RandValidator returns a randomized validator, useful for testing.
RandValidatorSet returns a randomized validator set, useful for testing.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
For testing purposes only.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
FromProto sets a protobuf SignedHeader to the given pointer.
UncompressBlockFromBytes uncompress from compressBytes to blockPart bytes, and returns the compressSign compressSign contains compressType and compressFlag the compressSign: XY means, compressType: X, compressFlag: Y.
UncompressBlockFromBytesTo uncompress payload to buf, and returns the compressSign, if payload is not compressed, compressSign will be 0, and buf will not be changed.
No description provided by the author
================================== =========== Earth ===============.
No description provided by the author
No description provided by the author
ValidateHash returns an error if the hash is not empty, but its size != tmhash.Size.
ValidateTime does a basic time validation ensuring time does not drift too much: +/- one year.
FromProto sets a protobuf Validator to the given pointer.
ValidatorListString returns a prettified validator list for logging purposes.
ValidatorSetFromProto sets a protobuf ValidatorSet to the given pointer.
FromProto converts a proto generetad type to a handwritten type return type, nil if everything converts safely, otherwise nil, error.
No description provided by the author
# Constants
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
BlockHeightKey is a reserved key used for indexing BeginBlock and Endblock events.
BlockIDFlagAbsent - no vote was received from a validator.
BlockIDFlagCommit - voted for the Commit.BlockID.
BlockIDFlagNil - voted for nil.
CompressDividing is used to divide compressType and compressFlag of compressSign the compressSign = CompressType * CompressDividing + CompressFlag.
No description provided by the author
No description provided by the author
No description provided by the author
Reserved event types (alphabetically sorted).
Reserved event types (alphabetically sorted).
Internal consensus events.
Reserved event types (alphabetically sorted).
Block level events for mass consumption by users.
Reserved event types (alphabetically sorted).
Reserved event types (alphabetically sorted).
Reserved event types (alphabetically sorted).
Reserved event types (alphabetically sorted).
Reserved event types (alphabetically sorted).
Reserved event types (alphabetically sorted).
Reserved event types (alphabetically sorted).
Reserved event types (alphabetically sorted).
Reserved event types (alphabetically sorted).
Reserved event types (alphabetically sorted).
Reserved event types (alphabetically sorted).
Reserved event types (alphabetically sorted).
Reserved event types (alphabetically sorted).
EventTypeKey is a reserved composite key for event name.
Reserved event types (alphabetically sorted).
Reserved event types (alphabetically sorted).
Reserved event types (alphabetically sorted).
Reserved event types (alphabetically sorted).
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
FlagDeltaVersion specify the DeltaVersion.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
expire unit: second.
redis url fmt (ip:port).
No description provided by the author
No description provided by the author
No description provided by the author
MaxAminoOverheadForBlock - maximum amino overhead to encode a block (up to MaxBlockSizeBytes in size) not including it's parts except Data.
100MB.
MaxChainIDLen is a maximum length of the chain ID.
MaxEvidenceBytes is a maximum size of any evidence (including amino overhead).
No description provided by the author
MaxHeaderBytes is a maximum header size (including amino overhead).
MaxTotalVotingPower - the maximum allowed total voting power.
MaxVoteBytes is a maximum vote size (including amino overhead).
MaxVotesCount is the maximum number of votes in a set.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Votes.
PriorityWindowSizeFactor - is a constant that when multiplied with the total voting power gives the maximum allowed distance between validator priorities.
Proposals.
No description provided by the author
No description provided by the author
TimeFormat is used for generating the sigs.
3.8s.
TxHashKey is a reserved key, used to specify transaction's hash.
No description provided by the author
TxHeightKey is a reserved key, used to specify transaction block's height.
# Variables
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
64kB.
DBBackend This is set at compile time.
DeltaVersion do not apply delta if version does not match if user specify the flag 'FlagDeltaVersion'(--delta-version) use user's setting, otherwise use the default value.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
MaxBlockPartsCount is the maximum number of block parts.
MaxSignatureSize is a maximum allowed signature size for the Proposal and Vote.
PB2TM is used for converting protobuf ABCI to Tendermint ABCI.
UNSTABLE.
TM2PB is used for converting Tendermint ABCI to protobuf ABCI.
No description provided by the author
# Structs
ABCIResult is the deterministic component of a ResponseDeliverTx.
Block defines the atomic unit of a Tendermint blockchain.
No description provided by the author
BlockGPResults is a circular queue of SingleBlockGPs.
BlockID defines the unique ID of a block as its Hash and its PartSetHeader.
BlockMeta contains meta information.
BlockParams define limits on the block size and gas plus minimum time between blocks.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Commit contains the evidence that a block was committed by a set of validators.
CommitSig is a part of the Vote included in a Commit.
ConsensusParams contains consensus critical parameters that determine the validity of blocks.
Data contains the set of transactions included in the block.
No description provided by the author
Deltas defines the ABCIResponse and state delta.
No description provided by the author
DuplicateVoteEvidence contains evidence a validator signed two conflicting votes.
ErrEvidenceInvalid wraps a piece of evidence and the error denoting how or why it is invalid.
ErrEvidenceOverflow is for when there is too much evidence in a block.
No description provided by the author
No description provided by the author
ErrNotEnoughVotingPowerSigned is returned when not enough validators signed a commit.
No description provided by the author
No description provided by the author
EventBus is a common bus for all events going through the system.
latest blockTime.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NOTE: This goes into the replay WAL.
All txs fire EventDataTx.
No description provided by the author
No description provided by the author
No description provided by the author
EvidenceData contains any evidence of malicious wrong-doing by validators.
EvidenceParams determine how we handle evidence of malfeasance.
GenesisDoc defines the initial conditions for a tendermint blockchain, in particular its validator set.
GenesisValidator is an initial validator.
HashedParams is a subset of ConsensusParams.
Header defines the structure of a Tendermint 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
SignedHeader is a header along with the commits that prove it.
UNSTABLE.
MockPV implements PrivValidator without any safety or persistence.
UNSTABLE.
-----------------------------------------------------------------------------.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Proposal defines a block proposal for the consensus.
SignedHeader is a header along with the commits that prove it.
SingleBlockGPs holds the gas price of all transactions in a block and will sample the lower few gas prices according to sampleNumber.
No description provided by the author
No description provided by the author
TxProof represents a Merkle proof of the presence of a transaction in the Merkle tree.
TxResult contains results of executing the transaction.
Volatile state for each Validator NOTE: The ProposerPriority is not included in Validator.Hash(); make sure to update that method if changes are made here.
No description provided by the author
ValidatorParams restrict the public key types validators can use.
ValidatorSet represent a set of *Validator at a given height.
Vote represents a prevote, precommit, or commit vote from validators for consensus.
VoteSet helps collect signatures from validators at each height+round for a
predefined vote type.
More human readable JSON of the vote set NOTE: insufficient for unmarshalling from (compressed votes) TODO: make the peerMaj23s nicer to read (eg just the block hash).
No description provided by the author
# Interfaces
BlockEventPublisher publishes all block related events.
No description provided by the author
Evidence represents any provable malicious activity by a validator.
PrivValidator defines the functionality of a local Tendermint validator that signs votes and proposals, and never double signs.
Signable is an interface for all signable things.
No description provided by the author
TMEventData implements events.EventData.
No description provided by the author
No description provided by the author
Common interface between *consensus.VoteSet and types.Commit.
# Type aliases
ABCIResults wraps the deliver tx results to return a proof.
Address is hex bytes.
No description provided by the author
BlockIDFlag indicates which BlockID the signature is for.
No description provided by the author
EvidenceList is a list of Evidence.
UNSTABLE XXX: duplicate of p2p.ID to avoid dependence between packages.
No description provided by the author
No description provided by the author
SignedMsgType is a type of signed message in the consensus.
Tx is an arbitrary byte array.
Txs is a slice of Tx.
ValidatorsByAddress implements the sort of validators by address.
ValidatorsByVotingPower implements sort.Interface for []*Validator based on the VotingPower and Address fields.