Skip to main content

Consensus Contract

AEDPoS contract

Used to manage block producers and synchronize data. Implements aelf Standards ACS1, ACS4, ACS6, ACS10, and ACS11.

Contract Methods

Method NameRequest TypeResponse TypeDescription
InitialAElfConsensusContractAEDPoS.InitialAElfConsensusContractInputgoogle.protobuf.EmptyInitialize the consensus contract.
FirstRoundAEDPoS.Roundgoogle.protobuf.EmptyInitializes the consensus information in the first round.
UpdateValueAEDPoS.UpdateValueInputgoogle.protobuf.EmptyUpdate consensus information.
NextRoundAEDPoS.NextRoundInputgoogle.protobuf.EmptyUpdate consensus information, create a new round.
NextTermAEDPoS.NextTermInputgoogle.protobuf.EmptyUpdate consensus information, create a new term.
UpdateTinyBlockInformationAEDPoS.TinyBlockInputgoogle.protobuf.EmptyUpdate consensus tiny block information.
SetMaximumMinersCountgoogle.protobuf.Int32Valuegoogle.protobuf.EmptySet the maximum count of miners, by default, is unlimited.
ChangeMaximumMinersCountControllerAuthorityInfogoogle.protobuf.EmptyChange the authority information for maximum miners count.
RecordCandidateReplacementAEDPoS.RecordCandidateReplacementInputgoogle.protobuf.EmptyNotify AEDPoS Contract of candidate replacement.
GetCurrentMinerListgoogle.protobuf.EmptyAEDPoS.MinerListGet the list of current miners.
GetCurrentMinerPubkeyListgoogle.protobuf.EmptyAEDPoS.PubkeyListGet the list of current miners in hexadecimal format.
GetCurrentMinerListWithRoundNumbergoogle.protobuf.EmptyAEDPoS.MinerListWithRoundNumberGet the list of current miners and current round number.
GetRoundInformationgoogle.protobuf.Int64ValueAEDPoS.RoundGet information of the round according to round number.
GetCurrentRoundNumbergoogle.protobuf.Emptygoogle.protobuf.Int64ValueGet the current round number.
GetCurrentRoundInformationgoogle.protobuf.EmptyAEDPoS.RoundGet the current round information.
GetPreviousRoundInformationgoogle.protobuf.EmptyAEDPoS.RoundGet the previous round information.
GetCurrentTermNumbergoogle.protobuf.Emptygoogle.protobuf.Int64ValueGet the current term number.
GetCurrentTermMiningRewardgoogle.protobuf.Emptygoogle.protobuf.Int64ValueGet the welfare reward for the current term.
GetMinerListAEDPoS.GetMinerListInputAEDPoS.MinerListGet the list of miners according to term number.
GetPreviousMinerListgoogle.protobuf.EmptyAEDPoS.MinerListGet the list of miners in the previous term.
GetMinedBlocksOfPreviousTermgoogle.protobuf.Emptygoogle.protobuf.Int64ValueGet the amount of mined blocks in the previous term.
GetNextMinerPubkeygoogle.protobuf.Emptygoogle.protobuf.StringValueGet the miner that produces the next block.
IsCurrentMineraelf.Addressgoogle.protobuf.BoolValueCheck if the account address is on the miner list for the current round.
GetNextElectCountDowngoogle.protobuf.Emptygoogle.protobuf.Int64ValueGet the left time before the next election takes effect (seconds).
GetPreviousTermInformationgoogle.protobuf.Int64ValueAEDPoS.RoundGet term information according to term number.
GetRandomHashgoogle.protobuf.Int64Valueaelf.HashGet random hash (Compatibility note).
GetMaximumBlocksCountgoogle.protobuf.Emptygoogle.protobuf.Int32ValueGet the maximum of tiny blocks produced by a miner each round.
GetMaximumMinersCountgoogle.protobuf.Emptygoogle.protobuf.Int32ValueGet the maximum count of miners.
GetMaximumMinersCountControllergoogle.protobuf.EmptyAuthorityInfoGet the authority information for maximum miners count.
GetMainChainCurrentMinerListgoogle.protobuf.EmptyAEDPoS.MinerListGet the list of miners in the main chain.
GetPreviousTermMinerPubkeyListgoogle.protobuf.EmptyAEDPoS.PubkeyListGet the list of miners in the previous term.
GetCurrentMiningRewardPerBlockgoogle.protobuf.Emptygoogle.protobuf.Int64ValueQuery the current mining reward for each block.
SetMinerIncreaseIntervalgoogle.protobuf.Int64Valuegoogle.protobuf.EmptySet the current miner growth time interval.
GetMinerIncreaseIntervalgoogle.protobuf.Emptygoogle.protobuf.Int64ValueGet the current miner growth time interval.

AElf.Standards.ACS1

ACS1 Standard Methods

Method NameRequest TypeResponse TypeDescription
SetMethodFeeacs1.MethodFeesgoogle.protobuf.EmptySet the method fees for the specified method.
ChangeMethodFeeControllerAuthorityInfogoogle.protobuf.EmptyChange the method fee controller.
GetMethodFeegoogle.protobuf.StringValueacs1.MethodFeesQuery method fee information by method name.
GetMethodFeeControllergoogle.protobuf.EmptyAuthorityInfoQuery the method fee controller.

AElf.Contracts.Consensus.AEDPoS

AEDPoS contract

Used for managing block producers and synchronizing data.

Implement aelf Standards ACS1, ACS4, ACS6, ACS10, and ACS11.

Contract Methods

Method NameRequest TypeResponse TypeDescription
InitialAElfConsensusContractAEDPoS.InitialAElfConsensusContractInputgoogle.protobuf.EmptyInitialize the consensus contract.
FirstRoundAEDPoS.Roundgoogle.protobuf.EmptyInitializes the consensus information in the first round.
UpdateValueAEDPoS.UpdateValueInputgoogle.protobuf.EmptyUpdate consensus information.
NextRoundAEDPoS.NextRoundInputgoogle.protobuf.EmptyUpdate consensus information, create a new round.
NextTermAEDPoS.NextTermInputgoogle.protobuf.EmptyUpdate consensus information, create a new term.
UpdateTinyBlockInformationAEDPoS.TinyBlockInputgoogle.protobuf.EmptyUpdate consensus tiny block information.
SetMaximumMinersCountgoogle.protobuf.Int32Valuegoogle.protobuf.EmptySet the maximum count of miners, by default, is unlimited. If you want to control the count of miners, you need to set it through parliament.
ChangeMaximumMinersCountControllerAuthorityInfogoogle.protobuf.EmptyThe authority information for SetMaximumMinersCount, by default, is governed by parliament.
RecordCandidateReplacementAEDPoS.RecordCandidateReplacementInputgoogle.protobuf.EmptyElection Contract can notify AEDPoS Contract to aware candidate replacement happened.
GetCurrentMinerListgoogle.protobuf.EmptyAEDPoS.MinerListGet the list of current miners.
GetCurrentMinerPubkeyListgoogle.protobuf.EmptyAEDPoS.PubkeyListGet the list of current miners (hexadecimal format).
GetCurrentMinerListWithRoundNumbergoogle.protobuf.EmptyAEDPoS.MinerListWithRoundNumberGet the list of current miners and current round number.
GetRoundInformationgoogle.protobuf.Int64ValueAEDPoS.RoundGet information of the round according to round number.
GetCurrentRoundNumbergoogle.protobuf.Emptygoogle.protobuf.Int64ValueGet the current round number.
GetCurrentRoundInformationgoogle.protobuf.EmptyAEDPoS.RoundGet the current round information.
GetPreviousRoundInformationgoogle.protobuf.EmptyAEDPoS.RoundGet the previous round information.
GetCurrentTermNumbergoogle.protobuf.Emptygoogle.protobuf.Int64ValueGet the current term number.
GetCurrentTermMiningRewardgoogle.protobuf.Emptygoogle.protobuf.Int64ValueGet the welfare reward the current term.
GetMinerListAEDPoS.GetMinerListInputAEDPoS.MinerListGet the list of miners according to term number.
GetPreviousMinerListgoogle.protobuf.EmptyAEDPoS.MinerListGet the list of miner in previous term.
GetMinedBlocksOfPreviousTermgoogle.protobuf.Emptygoogle.protobuf.Int64ValueGet the amount of mined blocks in previous term.
GetNextMinerPubkeygoogle.protobuf.Emptygoogle.protobuf.StringValueGet the miner that produces the next block.
IsCurrentMineraelf.Addressgoogle.protobuf.BoolValueCheck to see if the account address is on the miner list for the current round.
GetNextElectCountDowngoogle.protobuf.Emptygoogle.protobuf.Int64ValueQuery the left time before the next election takes effects (seconds).
GetPreviousTermInformationgoogle.protobuf.Int64ValueAEDPoS.RoundGet term information according term number.
GetRandomHashgoogle.protobuf.Int64Valueaelf.HashGet random hash (Keep this for compatibility).
GetMaximumBlocksCountgoogle.protobuf.Emptygoogle.protobuf.Int32ValueGet maximum tiny blocks produced by miner each round.
GetMaximumMinersCountgoogle.protobuf.Emptygoogle.protobuf.Int32ValueGet the maximum count of miners.
GetMaximumMinersCountControllergoogle.protobuf.EmptyAuthorityInfoThe authority information for GetMaximumMinersCount, by default, is governed by parliament.
GetMainChainCurrentMinerListgoogle.protobuf.EmptyAEDPoS.MinerListGet the list of miners in main chain.
GetPreviousTermMinerPubkeyListgoogle.protobuf.EmptyAEDPoS.PubkeyListGet the list of miners in previous term.
GetCurrentMiningRewardPerBlockgoogle.protobuf.Emptygoogle.protobuf.Int64ValueQuery the current mining reward for each block.
SetMinerIncreaseIntervalgoogle.protobuf.Int64Valuegoogle.protobuf.EmptySet the current miner growth time interval.
GetMinerIncreaseIntervalgoogle.protobuf.Emptygoogle.protobuf.Int64ValueGet the current miner growth time interval.

AElf.Standards.ACS4

ACS4 Standard Methods

Method NameRequest TypeResponse TypeDescription
GetConsensusCommandgoogle.protobuf.BytesValueacs4.ConsensusCommandGenerate a consensus command based on the consensus contract state and the input public key.
GetConsensusExtraDatagoogle.protobuf.BytesValuegoogle.protobuf.BytesValueGenerate consensus extra data when a block is generated.
GenerateConsensusTransactionsgoogle.protobuf.BytesValueacs4.TransactionListGenerate consensus system transactions when a block is generated. Each block will contain only one consensus transaction, which is used to write the latest consensus information to the State database.
ValidateConsensusBeforeExecutiongoogle.protobuf.BytesValueacs4.ValidationResultBefore executing the block, verify that the consensus information in the block header is correct.
ValidateConsensusAfterExecutiongoogle.protobuf.BytesValueacs4.ValidationResultAfter executing the block, verify that the state information written to the consensus is correct.

AElf.Standards.ACS6

ACS6 Standard Methods

Method NameRequest TypeResponse TypeDescription
GetRandomBytesgoogle.protobuf.BytesValuegoogle.protobuf.BytesValueGet random number according to block height.

AElf.Standards.ACS10

ACS10 Standard Methods

Method NameRequest TypeResponse TypeDescription
Donateacs10.DonateInputgoogle.protobuf.EmptyDonates tokens from the caller to the treasury. If the tokens are not native tokens in the current chain, they will be first converted to the native token.
Releaseacs10.ReleaseInputgoogle.protobuf.EmptyRelease dividend pool according the period number.
SetSymbolListacs10.SymbolListgoogle.protobuf.EmptySet the token symbols dividend pool supports.
GetSymbolListgoogle.protobuf.Emptyacs10.SymbolListQuery the token symbols dividend pool supports.
GetUndistributedDividendsgoogle.protobuf.Emptyacs10.DividendsQuery the balance of undistributed tokens whose symbols are included in the symbol list.
GetDividendsgoogle.protobuf.Int64Valueacs10.DividendsQuery the dividend information according to the height.

AElf.Standards.ACS11

ACS11 Standard Methods

Method NameRequest TypeResponse TypeDescription
UpdateInformationFromCrossChaingoogle.protobuf.BytesValuegoogle.protobuf.EmptyUpdate the consensus information of the side chain.
GetChainInitializationInformationgoogle.protobuf.BytesValuegoogle.protobuf.BytesValueGet the current miner list and consensus round information.
CheckCrossChainIndexingPermissionaelf.Addressgoogle.protobuf.BoolValueVerify that the input address is the current miner.

Contract Types

AElf.Contracts.Consensus.AEDPoS

AEDPoS.AElfConsensusHeaderInformation

FieldTypeDescriptionLabel
sender_pubkeybytesThe sender public key.
roundRoundThe round information.
behaviourAElfConsensusBehaviourThe behaviour of consensus.

AEDPoS.AElfConsensusHint

FieldTypeDescriptionLabel
behaviourAElfConsensusBehaviourThe behaviour of consensus.
round_idint64The round id.
previous_round_idint64The previous round id.

AEDPoS.AElfConsensusTriggerInformation

FieldTypeDescriptionLabel
pubkeybytesThe miner public key.
in_valueaelf.HashThe InValue for current round.
previous_in_valueaelf.HashThe InValue for previous round.
behaviourAElfConsensusBehaviourThe behaviour of consensus.
encrypted_piecesEncryptedPiecesEntryThe encrypted pieces of InValue.repeated
decrypted_piecesDecryptedPiecesEntryThe decrypted pieces of InValue.repeated
revealed_in_valuesRevealedInValuesEntryThe revealed InValues.repeated

AEDPoS.AElfConsensusTriggerInformation.DecryptedPiecesEntry

FieldTypeDescriptionLabel
keystring
valuebytes

AEDPoS.AElfConsensusTriggerInformation.EncryptedPiecesEntry

FieldTypeDescriptionLabel
keystring
valuebytes

AEDPoS.AElfConsensusTriggerInformation.RevealedInValuesEntry

FieldTypeDescriptionLabel
keystring
valueaelf.Hash

AEDPoS.Candidates

FieldTypeDescriptionLabel
pubkeysbytesThe candidate public keys.repeated

AEDPoS.ConsensusInformation

FieldTypeDescriptionLabel
valuebytes

AEDPoS.GetMinerListInput

FieldTypeDescriptionLabel
term_numberint64The term number.

AEDPoS.HashList

FieldTypeDescriptionLabel
valuesaelf.Hashrepeated

AEDPoS.InitialAElfConsensusContractInput

FieldTypeDescriptionLabel
is_term_stay_oneboolWhether not to change the term.
is_side_chainboolIs a side chain.
period_secondsint64The number of seconds per term.
miner_increase_intervalint64The interval second that increases miners.

AEDPoS.IrreversibleBlockFound

FieldTypeDescriptionLabel
irreversible_block_heightint64The irreversible block height found.

AEDPoS.IrreversibleBlockHeightUnacceptable

FieldTypeDescriptionLabel
distance_to_irreversible_block_heightint64Distance to the height of the last irreversible block.

AEDPoS.LatestPubkeyToTinyBlocksCount

FieldTypeDescriptionLabel
pubkeystringThe miner public key.
blocks_countint64The count of blocks the miner produced.

AEDPoS.MinerInRound

FieldTypeDescriptionLabel
orderint32The order of the miner producing a block.
is_extra_block_producerboolIs the extra block producer in the current round.
in_valueaelf.HashGenerated by secret sharing and used for validation between miners.
out_valueaelf.HashCalculated from the current in value.
signatureaelf.HashCalculated from the current in value and signatures of the previous round.
expected_mining_timeTimestampThe expected mining time.
produced_blocksint64The amount of produced blocks.
missed_time_slotsint64The amount of missed time slots.
pubkeystringThe public key of this miner.
previous_in_valueaelf.HashThe InValue of the previous round.
supposed_order_of_next_roundint32The supposed order of mining for the next round.
final_order_of_next_roundint32The final order of mining for the next round.
actual_mining_timesTimestampThe actual mining time, miners must fill the actual mining time when they do the mining.repeated
encrypted_piecesMinerInRound.EncryptedPiecesEntryThe encrypted pieces of InValue.repeated
decrypted_piecesMinerInRound.DecryptedPiecesEntryThe decrypted pieces of InValue.repeated
produced_tiny_blocksint64The amount of produced tiny blocks.
implied_irreversible_block_heightint64The irreversible block height that the current miner recorded.

AEDPoS.MinerInRound.DecryptedPiecesEntry

FieldTypeDescriptionLabel
keystring
valuebytes

AEDPoS.MinerInRound.EncryptedPiecesEntry

FieldTypeDescriptionLabel
keystring
valuebytes

AEDPoS.MinerList

FieldTypeDescriptionLabel
pubkeysbytes The miners public key list.repeated

AEDPoS.MinerListWithRoundNumber

FieldTypeDescriptionLabel
miner_listMinerList The list of miners.
round_numberint64 The round number.

AEDPoS.MinerReplaced

FieldTypeDescriptionLabel
new_miner_pubkeystring The new miner public key.

AEDPoS.MiningInformationUpdated

FieldTypeDescriptionLabel
pubkeystring The miner public key.
mining_timegoogle.protobuf.Timestamp The current block time.
behaviourstring The behaviour of consensus.
block_heightint64 The current block height.
previous_block_hashaelf.Hash The previous block hash.

AEDPoS.MiningRewardGenerated

FieldTypeDescriptionLabel
term_numberint64 The number of term the mining reward is generated.
amountint64 The amount of mining reward.

AEDPoS.PubkeyList

FieldTypeDescriptionLabel
pubkeysstring The miners public key list.repeated

AEDPoS.RandomNumberRequestInformation

FieldTypeDescriptionLabel
target_round_numberint64 The random hash is likely generated during this round.
orderint64
expected_block_heightint64

AEDPoS.RecordCandidateReplacementInput

FieldTypeDescriptionLabel
old_pubkeystring
new_pubkeystring

AEDPoS.NextRoundInput

FieldTypeDescriptionLabel
round_numberint64 The round number.
real_time_miners_informationRound.RealTimeMinersInformationEntry Current miner information, miner public key -> miner information.repeated
main_chain_miners_round_numberint64 The round number on the main chain.
blockchain_ageint64 The time from chain start to current round (seconds).
extra_block_producer_of_previous_roundstring The miner public key that produced the extra block in the previous round.
term_numberint64 The current term number.
confirmed_irreversible_block_heightint64 The height of the confirmed irreversible block.
confirmed_irreversible_block_round_numberint64 The round number of the confirmed irreversible block.
is_miner_list_just_changedbool Is miner list different from the the miner list in the previous round.
round_id_for_validationint64 The round id, calculated by summing block producers’ expecting time (second).
random_numberbytes The random number.

AEDPoS.NextTermInput

FieldTypeDescriptionLabel
round_numberint64 The round number.
real_time_miners_informationRound.RealTimeMinersInformationEntry Current miner information, miner public key -> miner information.repeated
main_chain_miners_round_numberint64 The round number on the main chain.
blockchain_ageint64 The time from chain start to current round (seconds).
extra_block_producer_of_previous_roundstring The miner public key that produced the extra block in the previous round.
term_numberint64 The current term number.
confirmed_irreversible_block_heightint64 The height of the confirmed irreversible block.
confirmed_irreversible_block_round_numberint64 The round number of the confirmed irreversible block.
is_miner_list_just_changedbool Is miner list different from the the miner list in the previous round.
round_id_for_validationint64 The round id, calculated by summing block producers’ expecting time (second).
random_numberbytes The random number.

AEDPoS.Round.RealTimeMinersInformationEntry

FieldTypeDescriptionLabel
keystring
valueMinerInRound

AEDPoS.SecretSharingInformation

FieldTypeDescriptionLabel
previous_roundRound The previous round information.
current_round_idint64 The current round id.
previous_round_idint64 The previous round id.

AEDPoS.TermInfo

FieldTypeDescriptionLabel
term_numberint64
round_numberint64

AEDPoS.TermNumberLookUp

FieldTypeDescriptionLabel
mapTermNumberLookUp.MapEntry Term number -> Round number.repeated

AEDPoS.TermNumberLookUp.MapEntry

FieldTypeDescriptionLabel
keyint64
valueint64

AEDPoS.TinyBlockInput

FieldTypeDescriptionLabel
round_idint64 The round id.
actual_mining_timegoogle.protobuf.Timestamp The actual mining time.
produced_blocksint64 Count of blocks produced.

AEDPoS.UpdateValueInput

FieldTypeDescriptionLabel
out_valueaelf.Hash Calculated from current in value.
signatureaelf.Hash Calculated from current in value and signatures of previous round.
round_idint64 To ensure the values to update will apply to the correct round by comparing round id.
previous_in_valueaelf.Hash Publishes previous in value for validation of previous signature and previous out value.
actual_mining_timegoogle.protobuf.Timestamp The actual mining time; miners must fill actual mining time when they mine.
supposed_order_of_next_roundint32 The supposed order of mining for the next round.
tune_order_informationUpdateValueInput.TuneOrderInformationEntry The tuning order of mining for the next round, miner public key -> order.repeated
encrypted_piecesUpdateValueInput.EncryptedPiecesEntry The encrypted pieces of InValue.repeated
decrypted_piecesUpdateValueInput.DecryptedPiecesEntry The decrypted pieces of InValue.repeated
produced_blocksint64 The amount of produced blocks.
miners_previous_in_valuesUpdateValueInput.MinersPreviousInValuesEntry The InValue in the previous round, miner public key -> InValue.repeated
implied_irreversible_block_heightint64 The irreversible block height that the miner recorded.

AEDPoS.UpdateValueInput.DecryptedPiecesEntry

FieldTypeDescriptionLabel
keystring
valuebytes

AEDPoS.UpdateValueInput.EncryptedPiecesEntry

FieldTypeDescriptionLabel
keystring
valuebytes

AEDPoS.UpdateValueInput.MinersPreviousInValuesEntr

FieldTypeDescriptionLabel
keystring
valueaelf.Hash

AEDPoS.UpdateValueInput.TuneOrderInformationEntry

FieldTypeDescriptionLabel
keystring
valueint32

AEDPoS.VoteMinersCountInput

FieldTypeDescriptionLabel
miners_countint32
amountint64

AEDPoS.AElfConsensusBehaviour

NameNumberDescription
UPDATE_VALUE0
NEXT_ROUND1
NEXT_TERM2
NOTHING3
TINY_BLOCK4

AElf.Standards.ACS1

acs1.MethodFee

FieldTypeDescriptionLabel
symbolstring The token symbol of the method fee.
basic_feeint64 The amount of fees to be charged.

acs1.MethodFees

FieldTypeDescriptionLabel
method_namestring The name of the method to be charged.
feesMethodFee List of fees to be charged.repeated
is_size_fee_freebool Optional based on the implementation of SetMethodFee method.

AElf.Standards.ACS4

acs4.ConsensusCommand

FieldTypeDescriptionLabel
limit_milliseconds_of_mining_blockint32 Time limit of mining next block.
hintbytes Context of Hint is diverse according to the consensus protocol we choose, so we use bytes.
arranged_mining_timegoogle.protobuf.Timestamp The time of arrange mining.
mining_due_timegoogle.protobuf.Timestamp The expiration time of mining.

acs4.TransactionList

FieldTypeDescriptionLabel
transactionsaelf.Transaction Consensus system transactions.repeated

acs4.ValidationResult

FieldTypeDescriptionLabel
successbool Is successful.
messagestring The error message.
is_re_triggerbool Whether to trigger mining again.

AElf.Standards.ACS10

acs10.Dividends

FieldTypeDescriptionLabel
valueDividends.ValueEntry The dividends, symbol -> amount.repeated

acs10.Dividends.ValueEntry

FieldTypeDescriptionLabel
keystring
valueint64

acs10.DonateInput

FieldTypeDescriptionLabel
symbolstring The token symbol to donate.
amountint64 The amount to donate.

acs10.DonationReceived

FieldTypeDescriptionLabel
fromaelf.Address The address of donors.
pool_contractaelf.Address The address of dividend pool.
symbolstring The token symbol Donated.
amountint64 The amount Donated.

acs10.ReleaseInput

FieldTypeDescriptionLabel
period_numberint64 The period number to release.

acs10.SymbolList

FieldTypeDescriptionLabel
valuestring The token symbol list.repeated

AElf.Standards.ACS11

AElf.Types

aelf.Address

FieldTypeDescriptionLabel
valuebytes

aelf.BinaryMerkleTree

FieldTypeDescriptionLabel
nodesHash The leaf nodes.repeated
rootHash The root node hash.
leaf_countint32 The count of leaf node.

aelf.Hash

FieldTypeDescriptionLabel
valuebytes

aelf.LogEvent

FieldTypeDescriptionLabel
addressAddress The contract address.
namestring The name of the log event.
indexedbytes The indexed data.repeated
non_indexedbytes The non indexed data.

aelf.MerklePath

FieldTypeDescriptionLabel
merkle_path_nodesMerklePathNodeThe merkle path nodes.repeated

aelf.MerklePathNode

FieldTypeDescriptionLabel
hashHash The node hash.
is_left_child_nodebool Whether it is a left child node.

aelf.SInt32Value

FieldTypeDescriptionLabel
valuesint32

aelf.SInt64Value

FieldTypeDescriptionLabel
valuesint64

aelf.ScopedStatePath

FieldTypeDescriptionLabel
addressAddress The scope address, which will be the contract address.
pathStatePathThe path of contract state.

aelf.SmartContractRegistration

FieldTypeDescriptionLabel
categorysint32 The category of contract code (0: C#).
codebytes The byte array of the contract code.
code_hashHash The hash of the contract code.
is_system_contractbool Whether it is a system contract.
versionint32 The version of the current contract.

aelf.StatePath

FieldTypeDescriptionLabel
partsstring The partial path of the state path.repeated

aelf.Transaction

FieldTypeDescriptionLabel
fromAddress The address of the sender of the transaction.
toAddress The address of the contract when calling a contract.
ref_block_numberint64 The height of the referenced block hash.
ref_block_prefixbytes The first four bytes of the referenced block hash.
method_namestring The name of a method in the smart contract at the To address.
paramsbytes The parameters to pass to the smart contract method.
signaturebytes When signing a transaction it’s actually a subset of the fields...

aelf.TransactionExecutingStateSet

FieldTypeDescriptionLabel
writesTransactionExecutingStateSet.WritesEntry The changed states.repeated
readsTransactionExecutingStateSet.ReadsEntry The read states.repeated
deletesTransactionExecutingStateSet.DeletesEntry The deleted states.repeated

aelf.TransactionExecutingStateSet.DeletesEntry

FieldTypeDescriptionLabel
keystring
valuebool

aelf.TransactionExecutingStateSet.ReadsEntry

FieldTypeDescriptionLabel
keystring
valuebool

aelf.TransactionExecutingStateSet.WritesEntry

FieldTypeDescriptionLabel
keystring
valuebytes

aelf.TransactionResult

FieldTypeDescriptionLabel
transaction_idHash The transaction id.
statusTransactionResultStatusThe transaction result status.
logsLogEvent The log events.repeated
bloombytes Bloom filter for transaction logs.
return_valuebytes The return value of the transaction execution.
block_numberint64 The height of the block that packages the transaction.
block_hashHash The hash of the block that packages the transaction.
errorstring Failed execution error message.

aelf.TransactionResultStatus

NameNumberDescription
NOT_EXISTED0The execution result of the transaction does not exist.
PENDING1The transaction is in the transaction pool waiting to be packaged.
FAILED2Transaction execution failed.
MINED3The transaction was successfully executed and successfully...
CONFLICT4When executed in parallel, there are conflicts with other...
PENDING_VALIDATION5The transaction is waiting for validation.
NODE_VALIDATION_FAILED6Transaction validation failed.

AuthorityInfo

FieldTypeDescriptionLabel
contract_addressaelf.Address The contract address of the controller.
owner_addressaelf.Address The address of the owner of the contract.