Questions tagged [blocks]

This tag is for questions dealing with the structure of blocks.

Filter by
Sorted by
Tagged with
18
votes
3answers
4k views

What is the default ordering of transactions during mining, in e.g. geth?

I know that the yellow paper does not specify how transactions are to be ordered in a block and this is up to the miner to decide. But I am interested in how this is practically handled (I assume not ...
40
votes
2answers
22k views

Is there a limit for transaction size?

Is there a theoretical limit for transaction data size when you send a transaction to Ethereum network? Ref. Is there a (theoretical) limit for amount of data that a contract can store?
37
votes
3answers
64k views

How to delete or reset the blockchain in geth? (OSX)

I have a currupt Blockchain and want to hard reset the chain. what do I need to delete in order to start downloading the chain from scratch? I know that there are 2 ethereum folders (I am on OSX): $...
63
votes
1answer
10k views

Why is the average block time 17 seconds?

The network stats show a constant average blocktime of around 17 seconds. Whenever you check it is around 16~18 seconds. Reading the blog post by vitalik buterin it states the block time should be 12 ...
16
votes
2answers
2k views

What happens when a smart contract gets several similar calls in the same block?

What happens when a smart contract gets several similar calls in the same block? Consider for instance this greeter: contract greeter { string name; function setName(string name_) { ...
20
votes
3answers
4k views

Why does ethereum creates a new block,without even a single transaction? [duplicate]

I'm running a private Ethereum blockchain. When I set one of the nodes to mine, that node continuously creates blocks, even if there are no transactions inside of it. What is the purpose of this?
12
votes
4answers
7k views

How can I get the data of the latest 10 blocks via web3.js?

How can I get latest 10 block data by using web3.js like most block explorer does?
20
votes
2answers
3k 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 ...
23
votes
3answers
11k views

Is it possible to cancel a transaction?

Is it possible to cancel a transaction broadcast to the blockchain? Suppose I broadcast a transaction and want to cancel it before it has been mined. Is this possible? This could be useful on ...
6
votes
3answers
3k views

Block gas limit exceeded when compiling contract Solidity browser

Using Solidity Browser ( https://ethereum.github.io/browser-solidity/ ) to mine a contract on testnet with injected web3 and metamask account, throws this error: callback contain no result Gas ...
6
votes
2answers
2k views

Blocks are not being downloaded [duplicate]

After the attacks the clients are shit. At the moment, I am unable to download any blocks, except if I delete all the chaindata and it starts again. I have less than 6k blocks left to download and I ...
11
votes
3answers
27k views

Storing document/file in blockchain [duplicate]

I am planning to do a POC on blockchain for uploading and verifying documents. I was wondering if I can store a complete document in blockchain. After some research on net most of the example, I found ...
4
votes
1answer
6k views

How to speed up transaction confirmation time?

I recently ran some tests on one of my testnet nodes and found out that my average transaction takes between 30 seconds to 2 minutes to confirm, despite the block times being at around 15 seconds. I ...
9
votes
2answers
12k views

What is the exact data structure of each block?

is there any document / diagram describing Ethereum block structure in similar way as https://en.bitcoin.it/wiki/Block? I know I can find implementation at https://github.com/ethereum/pyethereum/...
18
votes
1answer
6k views

Are gas limit in transaction and block gas limit different?

What does gas limit mean? Are there two meanings of gas limit? gas limit in a transaction block gas limit
14
votes
3answers
2k views

How to parse blocks with Python?

I'm building a basic analytics framework for the Ethereum blockchain. As a first step I need to extract the data and I'd like to do this in Python. I've been using Geth as a client on OSX and so, as ...
14
votes
1answer
9k views

What are Ethereum transaction receipts and what are they used for?

I've seen mention in a few places that blocks store transaction receipts, but I haven't really seen an explanation of what they are and why they exist.
15
votes
1answer
4k views

Relationship between Transaction Trie and Receipts Trie

Reading through the Yellow paper, I can see that each block header includes the Keccak 256 hash of the root of the trie for transactions and transaction receipts. I am struggling to understand how and ...
0
votes
1answer
1k views

What are the differences (and relationship) between the steps used to (1) validate a transaction and (2) confirm a block?

On the Ethereum blockchain, what is the difference (and relationship between) (1) the process used to validate a transaction and (2) the process used to confirm a block? It seems that these processes ...
10
votes
2answers
2k views

What does it mean to “seal a block”?

In both the Ethereum chain specification format and in Parity's documents on private chains, you see the term seal a block. What exactly does that term mean? How is it different than mining a block?...
8
votes
2answers
1k views

If all nodes execute smart contracts, why do only block creators get the gas fee?

I have a question regarding smart contract execution. It is my understanding that when a user requests a smart contract, miners will execute the smart contract, and bundle its output in a block ...
8
votes
2answers
2k views

How do I know if a submitted block became an uncle?

We need to detect that the submitted work became an uncle. How would I do this with geth api? I thought of checking the submitted block number later for any uncles that match my block's hash. Is there ...
5
votes
1answer
873 views

Why are there so many empty blocks?

Within the first 4 million blocks, I found that a significant fraction of them are empty. If miners are rewarded for writing transactions, wouldn't be in their best interests to at least partially ...
1
vote
3answers
193 views

Increase block number on Ganache

How can we increase block.number on Ganache for testing purpose ? If not possible do you know an alternative like passing X fake transactions to artificially increase block.number. Or if we have to ...
7
votes
1answer
293 views

Can you (as a node) manually choose what block to bet on in Casper?

Ethereum plans to move to the Casper proof of stake algorithm in a future version of the network. However, as nodes are betting on which block will be produced next, does that mean (as a node) you can ...
6
votes
2answers
2k views

What happens to transactions in orphaned/forked blocks?

From my investigation and reading a lot about this, it seems like the transaction is just removed and the ether returns back to some address. With Bitcoin, orphaned blocks are initially accepted by ...
6
votes
1answer
819 views

How are block proposals made in Casper?

A blog post says this about block proposals in Casper: A NXT-style random number generator is used to determine who can generate a block at each height; essentially, this involves taking missing ...
3
votes
1answer
890 views

How does Ethereum avoid inaccurate timestamps in blocks?

A contract can reference the currently being mined contract's timestamp. This means that changing the timestamp of an in-progress to be mined block requires executing all contracts referencing that ...
2
votes
1answer
605 views

How is the block gas limit dynamically adjusted?

What mechanism lies behind adjusting the block gas limit dynamically? Is it the miner that mined the most recent block who decides whether to adjust the gas limit or not? How much can the block gas ...
2
votes
1answer
121 views

When 2 blocks or more are distributed at the same time, but the longest one delayed

I have a problem understanding the concept of handling two or more blocks that distributed at the same time (in the blockchain network). As far as I understood, When I get 2 or more blocks at the ...
2
votes
1answer
231 views

What happens if a miner who didn't soft fork mines an “invalid” block?

Can someone explain, technically, what would happen if a majority of the miners adopted a soft fork (forward-compatible) making some tx invalid and then a miner who didn't fork happened to mine a ...
1
vote
2answers
944 views

What is the full block reward? [duplicate]

The Ethereum launch process states that with the release of Homestead, the Ether mining will be at 100% rather than 10% of the usual reward rate. Does that mean the full block reward would be 50 ...
1
vote
1answer
22 views

Is state read from the current or previous block for external function calls?

Given that a computer must execute in a sequence, I assume the VM is also doing so before deciding the final block state. Let's say my contract calls an external function from another contract that ...
1
vote
1answer
600 views

How the blocks and tries are stored

Newbie here! I still not sure if I understood how some structures of Ethereum are physically stored (assuming Geth implementation) State Trie: only one off-chain Merkle Patricia Tries stored using ...
1
vote
1answer
113 views

Need for Merkle path of a transaction to verify its membership in a particular block

I have read about the Merkle path of a transaction (path in Block B's Merkle tree from the txn T to the Merkle root) being needed to verify that txn T is included in block B, and I understand that. ...
0
votes
1answer
48 views

Latest block of multiple mining nodes

Lets say I have a private chain with 3 nodes (all mining) A, B and C. I want to get the latest block of my chain. I connect to node A and get this information with getBlock("latest"). Lets imagine ...