Hot answers tagged

14

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 blockid that contains ref_block_prefix. Stated another way, this says the transaction can only be included in forks that build off of the reference block. Taken ...


8

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 on the wire). The action_mroot creates a mroot over all dispatched actions that were evaluated while applying transactions in the block. It is used for IBC ...


8

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). Likewise, users may use K1 or R1 keys to sign transactions.


8

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 Proof of Stake) which allows for extremely fast and consistent blocks by scheduling them to individual BPs. They do not vary in time like Bitcoin, unless a BP ...


7

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 for the time it would take the chain to start and produce a block for one action. Also, if the chain is not flowing, there would not be a mechanism for ...


7

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 the fields are serialized in. The types of these fields is at block.hpp#L18 Each type has its own serialization procedure. Most of them live in libraries/fc. ...


7

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 in Proof Of Work. The turn duration is 0.5 seconds for EOS but may be different on other EOSIO chains. Maybe this article about DPoS helps you understanding. ...


4

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, response will be a JSON with info on the transaction: $ cleos get transaction eb4b94b72718a369af09eb2e7885b3f494dd1d8a20278a6634611d5edd76b703 { "transaction_id"...


4

1 Megabyte. Block producers can change that, so it's dynamic and it doesn't need a hard fork.


4

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 database. The fork * database tracks the longest chain and the last irreversible block number. All * blocks older than the last irreversible block are freed ...


3

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-watcher, I filter all the transactions relevant to my dapp and call get_transaction for them. The thing is that you could just shortcut it by running ...


3

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 then query using mongo or something like pymongo. $ mongo ... connecting to: mongodb://127.0.0.1:27017 ... > use EOS switched to db EOS > show ...


3

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 the block to retrieve] https://developers.eos.io/eosio-cleos/reference#cleos-get-info get_info Returns an object containing various details about the ...


3

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


2

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 by including one or many p2p-peer-address entries, e.g. p2p-peer-address = ctestnet.eosdetroit.com:1339 These peers can be any nodeos, including block ...


2

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 get_ref_blocknum max_net_usage_words - upper limit on total network bandwidth (in 8 byte words) billed for this transaction max_cpu_usage_ms - upper limit on the total CPU ...


2

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 --url https://api1.eosdublin.io get transaction <Transaction ID> You could also use eosjs: const eosjs = require("eosjs") const eos = eosjs({ ...


2

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 microforks that occur - often when ProducerB starts producing its schedule off of Block 11 of ProducerA's round. This can happen due to latency conditions because of ...


2

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.


2

I found a function tapos_block_num() in eosiolib/transaction.hpp. It looks return the block number in smart contract.


1

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, they arent used in the core at all. We use minor here to allow 8/21 to remove an entry from the whitelist. https://bloks.io/account/unusedaccnts#...


1

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 from your initial query. Might be off by just a few since tge real world is not mathematically precise, especially when dealing with time and networks.


1

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/block_id/by_time?time=2019-03-04T10:36:14.5Z&comparator=gte" Have to convert Unix time to ISO8601 extended format, but that can be automated too.


1

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 BPs crashed and were not confirming blocks, they are not included in the LIB. When the BPs return, they confirm the blocks and add to LIB. In terms of hacking(...


1

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. Simplifying a bit, at any moment, the 21 block producers with the most votes are active, and the others are standby. Any vote change is a transaction, it must be signed ...


1

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://nodes.get-scatter.com:443 get block 29000000 | head -n 11 { "timestamp": "2018-07-09T15:41:24.000", "producer": "eosswedenorg", "confirmed": 240, "...


1

There is mongo_db_plugin now, as replacement for history plugin


1

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 the state you desire at given block.


1

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 active BP address including yours as long as you are running a production node with the History API Plugin. You can also get transaction information from any ...


1

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 average of 0.25 seconds from time of broadcast. In addition to DPOS, EOS.IO adds asynchronous Byzantine Fault Tolerance (aBFT) for faster achievement ...


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