Class Block
java.lang.Object
com.algorand.algosdk.v2.client.common.PathResponse
com.algorand.algosdk.v2.client.model.Block
public class Block extends PathResponse
Block information.
Definition:
data/bookkeeping/block.go : Block
-
Field Summary
Fields Modifier and Type Field Description byte[]
genesisHash
java.lang.String
genesisId
(gen) ID to which this block belongs.ParticipationUpdates
participationUpdates
Participation account data that needs to be checked/acted on by the network.byte[]
previousBlockHash
BlockRewards
rewards
Fields relating to rewards,java.lang.Long
round
(rnd) Current round on which this block was appended to the chain.byte[]
seed
java.util.List<StateProofTracking>
stateProofTracking
Tracks the status of state proofs.java.lang.Long
timestamp
(ts) Block creation timestamp in seconds since eposhjava.util.List<Transaction>
transactions
(txns) list of transactions corresponding to a given round.byte[]
transactionsRoot
byte[]
transactionsRootSha256
java.lang.Long
txnCounter
(tc) TxnCounter counts the number of transactions committed in the ledger, from the time at which support for this feature was introduced.BlockUpgradeState
upgradeState
Fields relating to a protocol upgrade.BlockUpgradeVote
upgradeVote
Fields relating to voting for a protocol upgrade. -
Constructor Summary
Constructors Constructor Description Block()
-
Method Summary
Modifier and Type Method Description boolean
equals(java.lang.Object o)
java.lang.String
genesisHash()
void
genesisHash(java.lang.String base64Encoded)
(gh) hash to which this block belongs.java.lang.String
previousBlockHash()
void
previousBlockHash(java.lang.String base64Encoded)
(prev) Previous block hash.java.lang.String
seed()
void
seed(java.lang.String base64Encoded)
(seed) Sortition seed.java.lang.String
transactionsRoot()
void
transactionsRoot(java.lang.String base64Encoded)
(txn) TransactionsRoot authenticates the set of transactions appearing in the block.java.lang.String
transactionsRootSha256()
void
transactionsRootSha256(java.lang.String base64Encoded)
(txn256) TransactionsRootSHA256 is an auxiliary TransactionRoot, built using a vector commitment instead of a merkle tree, and SHA256 hash function instead of the default SHA512_256.Methods inherited from class com.algorand.algosdk.v2.client.common.PathResponse
toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Field Details
-
genesisHash
public byte[] genesisHash -
genesisId
public java.lang.String genesisId(gen) ID to which this block belongs. -
participationUpdates
Participation account data that needs to be checked/acted on by the network. -
previousBlockHash
public byte[] previousBlockHash -
rewards
Fields relating to rewards, -
round
public java.lang.Long round(rnd) Current round on which this block was appended to the chain. -
seed
public byte[] seed -
stateProofTracking
Tracks the status of state proofs. -
timestamp
public java.lang.Long timestamp(ts) Block creation timestamp in seconds since eposh -
transactions
(txns) list of transactions corresponding to a given round. -
transactionsRoot
public byte[] transactionsRoot -
transactionsRootSha256
public byte[] transactionsRootSha256 -
txnCounter
public java.lang.Long txnCounter(tc) TxnCounter counts the number of transactions committed in the ledger, from the time at which support for this feature was introduced. Specifically, TxnCounter is the number of the next transaction that will be committed after this block. It is 0 when no transactions have ever been committed (since TxnCounter started being supported). -
upgradeState
Fields relating to a protocol upgrade. -
upgradeVote
Fields relating to voting for a protocol upgrade.
-
-
Constructor Details
-
Block
public Block()
-
-
Method Details
-
genesisHash
public void genesisHash(java.lang.String base64Encoded)(gh) hash to which this block belongs. -
genesisHash
public java.lang.String genesisHash() -
previousBlockHash
public void previousBlockHash(java.lang.String base64Encoded)(prev) Previous block hash. -
previousBlockHash
public java.lang.String previousBlockHash() -
seed
public void seed(java.lang.String base64Encoded)(seed) Sortition seed. -
seed
public java.lang.String seed() -
transactionsRoot
public void transactionsRoot(java.lang.String base64Encoded)(txn) TransactionsRoot authenticates the set of transactions appearing in the block. More specifically, it's the root of a merkle tree whose leaves are the block's Txids, in lexicographic order. For the empty block, it's 0. Note that the TxnRoot does not authenticate the signatures on the transactions, only the transactions themselves. Two blocks with the same transactions but in a different order and with different signatures will have the same TxnRoot. -
transactionsRoot
public java.lang.String transactionsRoot() -
transactionsRootSha256
public void transactionsRootSha256(java.lang.String base64Encoded)(txn256) TransactionsRootSHA256 is an auxiliary TransactionRoot, built using a vector commitment instead of a merkle tree, and SHA256 hash function instead of the default SHA512_256. This commitment can be used on environments where only the SHA256 function exists. -
transactionsRootSha256
public java.lang.String transactionsRootSha256() -
equals
public boolean equals(java.lang.Object o)- Overrides:
equals
in classjava.lang.Object
-