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 Long
bonus
the potential bonus payout for this block.Long
feesCollected
the sum of all fees paid by transactions in this block.byte[]
genesisHash
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
Address
proposer
Long
proposerPayout
the actual amount transferred to the proposer from the fee sink.BlockRewards
rewards
Fields relating to rewards,Long
round
(rnd) Current round on which this block was appended to the chain.byte[]
seed
List<StateProofTracking>
stateProofTracking
Tracks the status of state proofs.Long
timestamp
(ts) Block creation timestamp in seconds since eposhList<Transaction>
transactions
(txns) list of transactions corresponding to a given round.byte[]
transactionsRoot
byte[]
transactionsRootSha256
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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
String
genesisHash()
void
genesisHash(String base64Encoded)
(gh) hash to which this block belongs.String
previousBlockHash()
void
previousBlockHash(String base64Encoded)
(prev) Previous block hash.String
proposer()
void
proposer(String proposer)
the proposer of this block.String
seed()
void
seed(String base64Encoded)
(seed) Sortition seed.String
transactionsRoot()
void
transactionsRoot(String base64Encoded)
(txn) TransactionsRoot authenticates the set of transactions appearing in the block.String
transactionsRootSha256()
void
transactionsRootSha256(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
-
-
-
-
Field Detail
-
bonus
public Long bonus
the potential bonus payout for this block.
-
feesCollected
public Long feesCollected
the sum of all fees paid by transactions in this block.
-
genesisHash
public byte[] genesisHash
-
genesisId
public String genesisId
(gen) ID to which this block belongs.
-
participationUpdates
public ParticipationUpdates participationUpdates
Participation account data that needs to be checked/acted on by the network.
-
previousBlockHash
public byte[] previousBlockHash
-
proposer
public Address proposer
-
proposerPayout
public Long proposerPayout
the actual amount transferred to the proposer from the fee sink.
-
rewards
public BlockRewards rewards
Fields relating to rewards,
-
round
public Long round
(rnd) Current round on which this block was appended to the chain.
-
seed
public byte[] seed
-
stateProofTracking
public List<StateProofTracking> stateProofTracking
Tracks the status of state proofs.
-
timestamp
public Long timestamp
(ts) Block creation timestamp in seconds since eposh
-
transactions
public List<Transaction> transactions
(txns) list of transactions corresponding to a given round.
-
transactionsRoot
public byte[] transactionsRoot
-
transactionsRootSha256
public byte[] transactionsRootSha256
-
txnCounter
public 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
public BlockUpgradeState upgradeState
Fields relating to a protocol upgrade.
-
upgradeVote
public BlockUpgradeVote upgradeVote
Fields relating to voting for a protocol upgrade.
-
-
Method Detail
-
genesisHash
public void genesisHash(String base64Encoded)
(gh) hash to which this block belongs.
-
genesisHash
public String genesisHash()
-
previousBlockHash
public void previousBlockHash(String base64Encoded)
(prev) Previous block hash.
-
previousBlockHash
public String previousBlockHash()
-
proposer
public void proposer(String proposer) throws NoSuchAlgorithmException
the proposer of this block.- Throws:
NoSuchAlgorithmException
-
proposer
public String proposer() throws NoSuchAlgorithmException
- Throws:
NoSuchAlgorithmException
-
seed
public void seed(String base64Encoded)
(seed) Sortition seed.
-
seed
public String seed()
-
transactionsRoot
public void transactionsRoot(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 String transactionsRoot()
-
transactionsRootSha256
public void transactionsRootSha256(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 String transactionsRootSha256()
-
-