Questions tagged [block-header]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
0 answers
12 views

Ethereum yellow paper is-sibling property

I'm reading the yellow paper and having some problems understanding equation 169 from here - also below: s(U,H) = (P(H) = P(U) ∧ H != U ∧ U !∈ B(H)_U) I can understand the first two conditions: The ...
user avatar
  • 121
0 votes
0 answers
17 views

Block header hash calculation in Eth2

Context: I am very curious about what kind of block information we can get from a smartcontract in Ethe2.0. In this question, I will just ask just about "blockhash". I will go directly to ...
user avatar
0 votes
1 answer
23 views

How determine is the hash finalized?

For some reason, I am require to store the hash to database. I would like to know is there any criteria to determine that the hash is finalize? For example, Block #15000000 have hash value of ...
user avatar
  • 101
0 votes
1 answer
61 views

How Uncles (Ommers) Hash include in headers?

I'm confused with the definition of uncle block. I read every articles and they say basically uncle block is a block that valid but lose the race to main blockchain. All the blocks' hashes that lose ...
user avatar
0 votes
0 answers
8 views

How to use transactions to built an MPT?

What are the kyes and values in the MPT?
user avatar
0 votes
0 answers
11 views

How does mixhash avoid DDoS?

I have read here about the need for the mixhash. When miners verity block, should they calculate mixhash and verityit it first? and then calculate block hash to check that it meets the difficulty ...
user avatar
0 votes
0 answers
89 views

Is it theoretically possible to remove the receipt root hash in the Ethereum block header?

I was just wondering if Ethereum would still work without a receipt root hash? Is it theoretically possible?
user avatar
0 votes
0 answers
24 views

Fastest way to scrape `gasUsed` from every block for the last few months without a full node?

Is there any way to scrape block headers for a specific field without going through the effort and resources of syncing a full node? I'm open to using any software or 3rd party hosted data. ...
user avatar
1 vote
1 answer
1k views

The current provider doesn't support subscriptions: HDWalletProvider on Polygon (matic) blockchain

I use wss://rpc-mainnet.maticvigil.com/v1/MY-APP-ID as my polygon dApp provider, however I cannot subscribe on newBlockHeaders event with the following error: Error: The current provider doesn't ...
user avatar
1 vote
0 answers
211 views

What is the theoretical average latency of data transmission?

I concluded a pretty simple test to measure some latencies. I connected to two providers (Infura and Quiknode) with Web3.js and subscribed to new block headers. Then I compared the time of arrival and ...
user avatar
  • 106
0 votes
0 answers
13 views

Function L_H in YellowPaper

What's the difference between a Block header H and the header after it has been passed to function L_H? L_H is defined in Section 4.4.3 Equation 32 and is used in Section 4.4.2 Equation 29(2nd) Yellow ...
user avatar
  • 177
1 vote
0 answers
18 views

Get number of logs in block

Given logs are streamed to a client via the eth_subscribe(“logs”) rpc method with a logIndex, is there a way to tell the number of total logs in a block from its header?
user avatar
  • 111
1 vote
1 answer
189 views

Compute transactions trie root hash from a BlockBodies message using ethereumjs

Given a decoded BlockBodies message, I want to compute the root hash of the transactions trie, so that I can match it against block headers that my node has downloaded. After reviewing How Ethereum ...
user avatar
0 votes
1 answer
123 views

Is Ethereum block header a list?

Decoding a RLP encoded block using Eth specifications do we get header as list? But as per format i.e., [[blockHeader,transactionList,uncleList],totalDifficulty], blockHeader should have been string. ...
user avatar
  • 1
1 vote
1 answer
115 views

Fetching block template from node

The most famous opensource pool uses eth_getBlockByNumber method with parameter "pending" to get block template and generate jobs from it. But now, in parity, I found that this parameter is deprecated ...
user avatar
  • 163
3 votes
1 answer
181 views

Verify a block exists

I want to verify that a block exists in a trust-less manner - i.e. with on chain validation. This rules out the option of using an oracle. I'm aware of this function: blockhash(uint blockNumber) ...
user avatar
0 votes
1 answer
3k views

Block header hash calculation [duplicate]

What inputs go into the RLP and Keccak function to calculate the block header hash? I looked up the header struct. Which of those values are fed into the RLP, Keccak? Were nonce and mixed hash left ...
user avatar
2 votes
1 answer
980 views

block hash from block-header rlp [duplicate]

Given the RLP of a block header, how do i get the block hash? https://github.com/ethereum/go-ethereum/blob/master/core/types/block.go#L99 The above link says: Hash returns the block hash of the ...
user avatar
  • 381
6 votes
2 answers
2k views

block-header hash verification

As part of a validation service I am working on, I need to be able to verify that the blockHeader hash was created correctly. Based on my understanding following are the steps to regenerate the header ...
user avatar
  • 381
0 votes
2 answers
364 views

can only change header's extra data to mine a new block? [closed]

Fix 'nonce' and 'mixDigest', only change 'extra' to mine a new block.
user avatar
  • 1
0 votes
1 answer
35 views

Strange Ropsten Bug - transactionsRoot and recieptsRoot has same value

I'm testing some stuff on Ropsten network and I've found strange block: 4138624 When I run (using web3 injected in Metamask): web3.eth.getBlock(4138624,function(err,res){ console.log(res); }) I'm ...
user avatar
1 vote
1 answer
48 views

Why is LH repeated in equation 35 of the yellow paper?

Excerpt from page 5 of the yellow paper, version e94ebda: I understand that LX is the preparation function for serialising X, as follows: LB for blocks LH for block headers LU for ommer block ...
user avatar
0 votes
0 answers
210 views

how to check if a block has a transaction to an address only by using the block header

Question is self explanatory. How can I check if a block has a transaction to or from an address only by using the block header? Question is prompted by this comment - How to explore all ...
user avatar
  • 357
1 vote
1 answer
120 views

Addresses in paths of State Patricia Trie

Every block header has 3 patricia trees. In State Patricia Trie, the paths are the sha3 of the ethereum addresses, and the value for any particular address is encoded with RLP. But, what addresses ...
user avatar
1 vote
1 answer
129 views

What would an Etheruem-like blockchain look like if each block were just an IPFS hash?

I see a lot of people tout the enormous benefits of using IPFS as a store of data. Meanwhile, the Ethereum blockchain is over 1TB in size, with quesitonable need to keep the earlier blocks. In ...
user avatar
2 votes
2 answers
899 views

Is a block number unique or does it change if the block becomes uncle? Does the transaction hash include a block hash as input?

Is a block number unique or do I need to save block hash to identify a block? Does transaction hash include a block hash as input?
user avatar
  • 563
4 votes
2 answers
559 views

How Geth and Parity resolve timestamps when validating block headers?

Geth and Parity nodes differ in a fundamental way when they validate block headers. Background According to the yellow paper 4.3 timestamp: A scalar value equal to the reasonable output of Unix's ...
user avatar
1 vote
0 answers
239 views

Ethereum Node Connection Error

I'm having trouble getting into my Mist wallet as of a few days ago. Error starting protocol stack: missing block number for head header hash.Having trouble with Ethereum's mist wallet. I have the ...
user avatar
4 votes
2 answers
2k views

Block header format

Does anyone understand what each element of a block header represents? I have an example block header represented here: [ cd7bd64fba4cc782fe5474d3640882afece5887180591e72f80ce6916cf73526, ...
user avatar
  • 472
4 votes
2 answers
714 views

How is the nonce in a the block header arrived at?

My understanding is that the nonce in the header of an Ethereum block is an integer within a certain range (greater than 0). However, when I look at the blocks through an online block explorer, such ...
user avatar
  • 2,468
1 vote
0 answers
187 views

Rolled back headers dropping the peer right after. geth 1.6.0 [duplicate]

As you can see in this picture I get the same problem over and over again. Headers aren't downloading, they always roll back to header # 1379306. Does any body know what would be the problem here?
user avatar
1 vote
1 answer
370 views

Can contracts access the block header extraData field?

The yellow paper (see section 4.4) defines an extraData header field as follows: An arbitrary byte array containing data relevant to this block. This must be 32 bytes or fewer Can contracts ...
user avatar
  • 2,450
2 votes
1 answer
98 views

How large are header scalar values?

The Yellow paper talks about "scalar values" in section 4.4 to describe block header fields. E.g. difficulty: A scalar value corresponding to the dif- ficulty level of this block. This can be ...
user avatar
  • 2,450
4 votes
1 answer
2k views

How large are the Ethereum block headers?

I am interested in knowing the block header size to estimate the overhead of running an Ethereum light client.
user avatar
  • 2,450
54 votes
3 answers
37k views

What is an Event?

What is an Event? Are they only used in Solidity? How are events defined? How are events initiated? Is there a standard term for an event's invocation (do you say an event "happened", "was called",...
user avatar
  • 7,934
1 vote
1 answer
816 views

How are the blocks traversed?

How are the blocks traversed? Is it using a linked list concept to traverse? If I need to see all block details, will it traverse from the genesis block to the requested block or will it traverse ...
user avatar
  • 201
8 votes
3 answers
840 views

Block header structure change under Proof of Stake?

The yellow paper describes the below block header structure: This includes difficulty, beneficiary, mixHash and nonce values. Presumably these will be redundant under Proof-of-Stake. How will the ...
user avatar
  • 7,934
4 votes
0 answers
682 views

geth throwing header invalid error all the time

lately my ethereum node is repeatedly throwing this error: E0811 16:44:00.646126 core/blockchain.go:1128] uncle[0](30508438) header invalid: nonce for #2004585 [...
user avatar
5 votes
2 answers
730 views

What is the beneficiary in block header?

There is the data called "beneficiary" in block header. What is this data?
user avatar
4 votes
1 answer
667 views

Is block's timestamp current block's or previous block's timestamp?

When I call function giveTime, is the time stamp "now" from the block where my call is mined or from the previous block? contract Time { uint time; function giveTime() { time=now; } ...
user avatar
  • 1,069
14 votes
1 answer
31k views

What is a block hash?

When we look at this block - what does the first number Hash: 0xfe88c94d860f01a17f961bf4bdfb6e0c6cd10d3fda5cc861e805ca1240c58553 actually mean? How is it calculated? "Nonce" is the value that is ...
user avatar
  • 1,069
29 votes
2 answers
6k views

Why are there no leading zeroes in ethereum block hash?

The block hash has to be below certain difficulty, right? In bitcoin this means, that there are many leading zeroes in hash value, eg. for bitcoin block #402329 hash is ...
user avatar
  • 1,069
1 vote
2 answers
804 views

What's the header hash displayed in the miner?

Is the "hash" value reported by geth: eth.getBlock("849245").hash, for example, the same "hash" that is given to the miner in the work package? Sorry if this is a naive query. The reason for the ...
user avatar
  • 1,858
37 votes
3 answers
10k views

Can a contract safely rely on block.timestamp?

How safe is it to use block.timestamp as contract expiration time? If a miner provides an incorrect timestamp in a block header, how much can it be off before it is rejected by other nodes? Is there a ...
user avatar
  • 8,251
105 votes
7 answers
84k views

Ethereum block architecture

Where can I find a description (preferably a diagram like below) showing the block structure in an Ethereum blockchain? Credits: Wikipedia
user avatar
  • 5,030