Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

Questions tagged [blocks]

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

Filter by
Sorted by
Tagged with
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 ...
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): $...
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 ...
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?
20
votes
2answers
4k 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 ...
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
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 ...
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_) { ...
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 ...
14
votes
1answer
10k 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.
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 ...
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?
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 ...
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?...
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/...
8
votes
2answers
4k views

Difficulty and total difficulty

This is the info of one of the blocks in my private blockchain: { difficulty: 759585, extraData: "0xd783010409844765746887676f312e362e32856c696e7578", gasLimit: 4712388, gasUsed: 0, hash: "...
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 ...
8
votes
1answer
2k views

What action would actually lead to an invalid block and what happens to the valid transactions in that block

I'm trying to figure out how an invalid block would come into existence and what happens (technically) to valid transactions in the invalid block. From what I understand, invalid transactions (like ...
8
votes
1answer
384 views

Does more ether = more voting power 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 the more ether you ...
8
votes
2answers
225 views

Possible error in white paper validation algorithm?

If we take the block validation algorithm described in the white paper (Section Blockchain and Mining), it states at point 6: Let TX be the block's transaction list, with n transactions. For all i ...
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
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
1answer
1k views

My friend sent me a screenshot of a transaction hash, but when I search for it I find divergent data. What happened?

This is the transaction hash: 0x90e923ee01d9dfeb95ee176819eeec67d247fc6cb009c8cdc4d8ae1939e5ecc6 And this is the screenshot my friend sent me: If you check the hash in Etherscan, some informations ...
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
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 ...
6
votes
1answer
822 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 ...
6
votes
1answer
306 views

How to detect if block was forked?

It's is possible to track by API, if block was forked/orphaned? Will be glad to see some example.
5
votes
2answers
4k views

What does every field in block means

Can you give a detailed description for every field in Ethereum's block structure? For example: > eth.getBlock(123) { author: "0xbb7b8287f3f0a933474a79eae42cbca977791171", difficulty: ...
5
votes
1answer
4k views

How to use blockchain as a Database?

I'm pretty new to the concept of blockchain and use cases so please bear with me if this sounds to vague or elementary. As, I researched more on this, I wanna know how can we use blockchain as a ...
5
votes
1answer
878 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 ...
5
votes
1answer
778 views

How does mining software choose transactions?

How does mining software choose transactions from a memory pool to include them in a block? Does mining software just include transactions in order each time it receives them? Or they choose ...
5
votes
1answer
414 views

What are the mechanisms that use the Ethereum network to decide when a block B is done and we are going to mine block B+1?

I know from the Ethereum Stats that a block is mined on average within 14 secs. But that is only on average. I want to know, step by step if possible, what are he mechanisms to say "okay, this block ...
5
votes
2answers
2k views

What is the mean transaction size and average number of transactions per block on the Ethereum blockchain?

I found an April 7, 2017 post on Bitcoin Stack Exchange saying that Over roughly the past two months, the mean transaction size was about 506 bytes, and the average count of transactions per ...
5
votes
2answers
1k views

Transaction logged at geth node, but unable to locate Transaction entry on Ropsten

When sending new transactions one at a time (meaning separated by 1 or several minutes in time) they are correctly broadcasted and mined. But when sending several of them one after another (spearated ...
5
votes
1answer
2k views

Why is there block gas limit?

Why is there block gas limit? Should it just be the sum of gas limit used by each transactions inside the block? Why do we need an extra field for it instead of calculate it?
5
votes
1answer
2k views

Web3 retrieving latest transactions [duplicate]

Is there any way in the Web3 Javascript API to retrieve the latest, let's say five, transactions that were done on the blockchain? The only option I can think of, is by using web3.eth.getBlock(web3....
5
votes
1answer
31 views

Will block numbers be sequential on a sharded blockchain

When Ethereum shards (assuming it does) will the block numbers across the multiple shards be unique? I doubt it (I don't think the shards can have sequential block numbers and be independent of the ...
4
votes
2answers
1k views

What is the timestamp of a confirmed transaction based on?

Specifically, if we look at any transaction on the Ethereum blockchain, is the TimeStamp based on when the transaction is generated (like when you click generate transaction on MEW), or is it based on ...
4
votes
1answer
19k views

How long does it take for the ethereum blockchain to synchronize? [duplicate]

For the past few days I've been synchronizing my mist wallet with the blockchain (using geth). My laptop has been working all day and all night. I've already synced more than 880000 blocks. How many ...
4
votes
1answer
442 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; } ...
4
votes
1answer
1k views

When are “pending” transactions dropped from the blockchain?

When are transactions dropped from the blockchain? Suppose I broadcast a transaction to the blockchain, then it is a pending transaction waiting to be mined. But when are pending transactions ...
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 ...
4
votes
2answers
843 views

what is the logic behind rewarding 5 ETH for mining a block?

Is it in someway related to the transaction cost charged by ethereum for each transaction ?
4
votes
2answers
2k views

Basic Blockchain Implementation: how is the blockchain on a given node “synced” with that on another node?

Here's my understanding of the execution flow of blockchain: Consider two nodes, node1 and node2. Let's say there are 10 users on node1. They're making transactions, but none of these are actually ...
4
votes
1answer
134 views

Should uncles factor into average network block time and difficulty calculations?

It's unclear to me if uncles should factor into averages like block time and difficulty. The fact that they are associated with a parent block and have a timestamp and difficulty, leads me to believe ...
4
votes
1answer
50 views

Timestamp in Ethereum

I have a smart contract where the user inputs temperature readings, I'd like to add a time stamp to relate those reading with a current time of submission. I understand that in Ethereum we only have ...
4
votes
1answer
89 views

Is there a way to force uncle blocks generation in a testnet?

In a local testnet, what could be done to force uncle blocks generation? I'm mining with multiple geth instances (different accounts) on a common CPU and very low difficulty genesis block.
4
votes
0answers
74 views

Will forthcoming ability to make transactions private hide gas usage and mining information?

I understand that people are working on allowing for more private transactions on the public Ethereum mainnet. This would involve hiding (at the very least) the from, to, value and probably input ...