Hot answers tagged

14 votes
Accepted

Can someone explain the transaction struct?

expiration -> after this time the transaction can never be included in a block. ref_block_num / ref_block_prefix -> this transaction can only in blockchains where the highest block_num%0xff has a ...
bytemaster's user avatar
  • 1,434
8 votes
Accepted

How often/consistent are blocks on EOS?

Blocks on EOS are produced every 500ms (milliseconds) by Block Producers, or BPs for short (sometimes known as Witnesses or Delegates). Unlike Bitcoin and other PoW coins, EOS uses DPoS (Delegated ...
Someguy123's user avatar
8 votes
Accepted

Block data structure

The transaction_mroot is the Merkle root of the transaction_receipts included in the block. The block_mroot is not part of latest master (it is now implicit, factored into signature but not actually ...
bytemaster's user avatar
  • 1,434
8 votes
Accepted

What block hash function and transaction signature method does EOS use?

Block producers use SHA-256 to generate the digest and ECDSA to sign the block. Producers may sign using a K1 key (secp256k1 curve, used by Bitcoin) or an R1 key (P-256 curve, a NIST standard). ...
Todd Fleming's user avatar
  • 2,005
7 votes

Why does eos produce continuous blocks?

Blocks always need to be produced due to there always being the potential for an action to be sent to the chain. If blocks are not produced, that action would then have additional latency added to it ...
Nat's user avatar
  • 3,425
7 votes
Accepted

Is the block digest c++ specific?

Here's how the C++ code calculates the block digest: digest_type::hash(*this) serializes the block into a binary form, then runs the binary through sha-256. block.hpp#L125 identifies the order that ...
Todd Fleming's user avatar
  • 2,005
7 votes

How often/consistent are blocks on EOS?

Blocks are produced turnwise by so called "block producers" within the Delegated Proof of Stake protocol. This prevents all "miners" from rushing for the right hash like it is done ...
tmm's user avatar
  • 2,114
4 votes

how to know if a transaction was include in block?

Yes, this is more involved in EOS. You need to connect to a node which implements the history_api_plugin. Then you can use cleos, the command line tool to check for the status of the transaction, ...
Ami Heines's user avatar
  • 1,686
4 votes
Accepted

What is EOSIO max block size?

1 Megabyte. Block producers can change that, so it's dynamic and it doesn't need a hard fork.
Jordi Goyanes's user avatar
4 votes
Accepted

What is a fork database?

From the code: /** * @class fork_database * @brief manages light-weight state for all potential unconfirmed forks * * As new blocks are received, they are pushed into the fork ...
confused00's user avatar
  • 5,554
3 votes

Can we get all the actions from all blocks?

You can get the inline actions in get_actions RPC History API endpoint or inside the details of a transaction using also the RPC API get_transaction. So that's exactly what I'm doing in that eos-node-...
Leo Ribeiro's user avatar
  • 3,023
3 votes
Accepted

How can I download all ledger blocks as a JSON dump?

The best way I found to download the ledger in a structured format is to use eosio::mongo_db_plugin on latest EOSIO release, run $ nodeos --mongo-uri mongodb://127.0.0.1:27017 --replay-blockchain, and ...
confused00's user avatar
  • 5,554
3 votes

How to get current block number in smart contract?

I found a function tapos_block_num() in eosiolib/transaction.hpp. It looks return the block number in smart contract.
Wayne's user avatar
  • 241
3 votes

How to get current block number in smart contract?

In cleos you would do: cleos get info This returns the head_block_num and the last_irreversible_block_num. To receive addition information on the blocks returned. cleos get block [number or ID of ...
Nat's user avatar
  • 3,425
3 votes
Accepted

Why does eos block hash id not include character like "ghijklmnopqistuvwxyz"?

That would be because the hash is in HEX representation and not WIF or any other encoding. Hex is short for hexadecimal and comprises of the 10 digits 0-9 and the letters a-f
Ami Heines's user avatar
  • 1,686
2 votes
Accepted

How does a node acquire new blocks from the network?

When you start a nodeos process for the first time, a config file is generated automatically at .local/share/eosio/nodeos/config/config.ini by default. In the config.ini file, peers can be specified ...
robrigo's user avatar
  • 440
2 votes

Can someone explain the transaction struct?

expiration - the time at which a transaction expires ref_block_num - specifies a block num in the last 2^16 blocks. ref_block_prefix - specifies the lower 32 bits of the blockid at ...
Nat's user avatar
  • 3,425
2 votes
Accepted

EOS: How to get structured data within transaction?Is there restful API for this/

Yes there is. You can get this data from nodes that are running with the history_plugin plugin. You could use the HTTP API directly as in /v1/history/get_transaction, or you could use cleos: cleos --...
Andres Berrios's user avatar
2 votes

What does it mean that block is irreversible

You must wait for a block height to be lower than the current Last Irreversible Block (also known as LIB) to be considered irreversible. With the quick speed of the network, it is common to see ...
Josh Kauffman's user avatar
2 votes

What is a fork database?

Fork database is all the valid reversible blocks your node received, once the longest branch has the irreversible block, the branches from the irreversible block will be removed.
Jimmy Guo's user avatar
  • 1,066
1 vote

What are the permissions on the eosio.prods accounts used for

Answer courtesy of Michael Yeates on Telegram https://t.me/c/1139062279/173476 Major and minor are just lower threshold permissions which can be used for anything which requires a lower threshold,...
theblockstalk's user avatar
1 vote

How to find the number of the first block after a specific moment (unix time)?

When the blockchain operates normally, you get a new block every half a second. So you can start with any block you want and calculate the diff in seconds times 2 to get the number of blocks to diff ...
Ami Heines's user avatar
  • 1,686
1 vote
Accepted

How to find the number of the first block after a specific moment (unix time)?

Looks like dfuse comes to the rescue. The /v0/block_id/by_time endpoint can be used as follows (example from the link): curl -H "Authorization: Bearer $TOKEN" \ "https://mainnet.eos.dfuse.io/v0/...
Gassa's user avatar
  • 598
1 vote

How is the the crash of a BP handled?

As far as I know, there aren't any alert mechanisms that notify the BPs. In terms of block production, they skip the BP that crashed(with a moderate time delay). Given that there are more than 1/3 ...
junep89's user avatar
  • 208
1 vote

Back up EOS ecosystem

There is no single "central" server in a decentralized project like EOS.IO. All block producers, active or standby, maintain the same database containing everyone's votes on block producers. ...
Gassa's user avatar
  • 598
1 vote
Accepted

Block Meta Data

You can specify how many of the first lines you want in terminal with | head -n 11 then for the last 5 you can add | tail -n 5. This will effectively skip the transaction section. ./cleos -u https:/...
Nat's user avatar
  • 3,425
1 vote
Accepted

Preferred way to find a transaction's block

There is mongo_db_plugin now, as replacement for history plugin
damianodamiano's user avatar
1 vote

Is it possible to see the state of a multi index table for a given block number?

In a full node, only current state of persistent memory is available. If you want to checkout a history state, you can try to use demux(https://github.com/EOSIO/demux-js) to replay the chain and get ...
Tong Shen's user avatar
  • 475
1 vote

list of confirmed and unconfirmed transactions of address / account

To get the unconfirmed transactions, you can call curl -d '{"limit":5,"json":false}' https://mainnet.eoscanada.com/v1/chain/get_scheduled_transactions Replace https://mainnet.eoscanada.com with any ...
mounibec's user avatar
1 vote
Accepted

How exactly is the block height defined in EOS?

According to the whitepaper: Transaction Confirmation Typical DPOS blockchains have 100% block producer participation. A transaction can be considered confirmed with 99.9% certainty after an ...
confused00's user avatar
  • 5,554

Only top scored, non community-wiki answers of a minimum length are eligible