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
1
vote
1answer
36 views

Does a non-miner node validate both single transactions and an entire block?

My understanding is that an originating node broadcasts a transaction to its neighbours, who all validate the transaction to ensure (a) the signature is valid and (b) the state change is valid, before ...
2
votes
1answer
68 views

Is there any point in adding msg.sender to an event?

I am asked to provide the value of msg.sender as part of an event emitted in a function. It is something like: contract MyContract { event MyEvent(address indexed sender, uint256 input, uint256 ...
1
vote
2answers
225 views

How to get multiple blocks timestamps with a single JSON RPC call?

Is there a way to get data similar to the ones provided by web3.eth.getBlock(blockNumber) but with multiple blocks at once? The goal is to get the timestamps for 100 blocks in a row without ...
1
vote
0answers
154 views

Same Block Received More Than Once With Same Block Parameters

Use Case: I am implementing a deposit system where I will get a block as it is mined and parse transactions to check for a deposit of Ether or a specific token. Getting the same block twice will ...
1
vote
1answer
742 views

How can I retrieve the transaction hash / block hash of a contract that has already been deployed?

If you use Web3.py to deploy a Solidity contract to the blockchain, you can retrieve a transaction hash, like this: tx_hash = w3.eth.sendRawTransaction(signed.rawTransaction) Once you have that ...
0
votes
1answer
195 views

How to read previous blocks data?

I'm new to block chain technology. I'm trying to store and read blocks using testRPC along web3.js. I'm able to get the latest block data but not able to fetch previous blocks data. Please some one ...
1
vote
1answer
36 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 ...
1
vote
1answer
612 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
0answers
168 views

What does total number of blocks per day mean in Etherscan?

I tried to figure out what does total number of blocks per day means here and on the Internet, but i failed. For example, the number of blocks on 26 Aug is 5947 [here https://etherscan.io/chart/blocks]...
1
vote
1answer
79 views

Why are timestamps stored in a uint (256 bit) when they would fit in a uint64?

A (signed) 64 bit timestamp can store a date much larger than the age of the universe. On many platforms this would be a micro-optimization, but in the context of Ethereum, we want to squeeze every ...
2
votes
1answer
3k views

Block time and confirmation time

I have been reading in different papers and comments these two concepts and I would like to know the difference between them(if there is, sometimes it is a bit confusing). I understand that the block ...
1
vote
0answers
41 views

Why is my transaction not included into blocks with smaller gas prices in them?

I created a transaction with gas price 1.1 GWEI. It has been pending for 3 hours, and yet - during just the last 75 blocks - several 1 GWEI transactions have been included. In other words, gas price ...
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 ...
0
votes
1answer
199 views

How to get erc20 contract deploy time / block number

I am building a framework for ERC20 tokens. Aim is to scan all events (Transfer and Approve) generated by ERC20 contract, for which I am using web3.js getPastEvents. I have set the toBlock to web3....
0
votes
0answers
835 views

Ethereum Blockchain Size calculation from Etherscan

I was looking into Etherscan.io charts of Ethereum Block Count and Ethereum Average Block Size. Both of them have the data since 07/30/2015 and if one multiply both time-series (Ex. 07/30/2015 - 644 ...
1
vote
1answer
43 views

Couldn't reach block gas limit

When i try to send a lot of transaction, every block looks like only use half of its gas limit. How can i make block to use all its gas limit until it can't handle more transaction?
0
votes
1answer
63 views

Can I set the block size in genesis block by puppeth?

Found the block size is set to 30K in genesis block. How can I modify this value to 100K or 1M by puppeth?
0
votes
1answer
29 views

I have done simple data transaction on ropsten, it's stll increasing blocks confirmation

Why there are so many block confirmations in small transaction? How blocks are working while transaction?
1
vote
2answers
53 views

All my blocks has deleted

I have a private network for testing. My problem is when ever I stop running geth network, all of my mined blocks are gone. I run like geth --datadir "ethereum/node1" --port 30301 --networkid 1234 --...
0
votes
0answers
74 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 ...
1
vote
3answers
182 views

Transaction receiving ether from a contract address

Are transactions sending ether from contract addresses to normal addresses listed in block.transactions or are they not trivial to detect? If not in block.transactions than how to detect?
0
votes
1answer
31 views

What is saved on every block on Ethereum?

In Bitcoin every block has the information about the transaction (A sends money to B, C to D etc). And everytime a new transaction (someone sends money to another address) is sent, the miners will ...
1
vote
0answers
84 views

Showing block confirmations on a user transaction, best practices?

I'm working on a site that allows users to deploy smart contracts via MetaMask. Basically they customize it, it gets compiled, and then the user deploys it by via a MetaMask transaction. I would like ...
1
vote
1answer
89 views

Examples of light-client interactions to extract Merkle proofs?

I'd be grateful for pointers to working examples of interacting with the geth/parity light-client protocols. I'm particularly interested in working code which shows how to extract the Merkle proof ...
0
votes
2answers
37 views

Uploading big contract to the Ethereum blockchain

As far as I understand, there is a limit on the block size. But what if I want to upload a large contract that exceeds the blocksize? Will it not be allowed?
0
votes
1answer
102 views

Why is that the 'blocks count' is always in multiples of 192?

I'm running light node client for rinkeby using command: geth --rinkeby --syncmode=light --rpc --rpcapi personal,db,net,eth,web3 The terminal runs continuously and I don't quit it when I close the ...
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?
1
vote
2answers
2k views

How do I get the latest block using etherscan api?

I'm trying to get the latest block (it's height) using Ethereum Developer APIs of etherscan. For example, I can get it from blockcypher using the following URL: https://api.blockcypher.com/v1/eth/...
0
votes
2answers
293 views

Ethereum blockchain node & block terminology

I was studying about the basic blockchain terminology and got confused the point of node & block. In some links, both seem similar whereas in some both explained differently. I don't exactly know ...
1
vote
0answers
40 views

What precisely classifies an off-chain block as a fork?

I am looking for validation (or invalidation) of my assumption of what strictly counts as a fork in Ethereum. If you start filters to multiple ETH nodes at the same time, you will very often see 2 or ...
0
votes
1answer
37 views

Can the recipient of a block reward spend the funds in the same block?

From my understanding, when a new block is mined, the coinbase address's balance is incremented by the block reward amount. If this address had a zero balance before the block was mined and the block ...
0
votes
1answer
49 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 ...
2
votes
2answers
396 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?
2
votes
0answers
318 views

Unexpected behavior with `block.timestamp` in truffle test

I am doing some experiments with block.timestamp(which is now's alias). I wrote some code to see if block.timestamp really represents the timestamp of the last mined block. From the documentation: ...
1
vote
1answer
31 views

Is there another purpose for ether besides buying gas?

Were ether coins invented only in order to buy gas? Or can I trade it too (like in bitcoin) ? thank you
0
votes
2answers
478 views

What does ethereum's blockchain look like?

What does Ethereum's blockchain looks like? Are there only transactions of the states' changes, or are the accounts in every block? Thank you
0
votes
2answers
42 views

Block immutability

I am working on a blockchain learning project and i have a general question about block immutability. I know that when a block data is altered the chain becomes invalid am wondering what happens if I ...
1
vote
1answer
147 views

Web3.js function(s) to help determine the block numbers inside a date range?

I just learned today that you can query past events using the Web3.js 1.0.0 getPastEvents() function. That function supports filtering via the fromBlock and toBlock call parameters, so you can limit ...
1
vote
0answers
127 views

How to determine whether block is orphaned?

I've been working on a high stakes contract, which is deployed using the web3 v1.0 library. An important condition for robustness is ensuring the contract has been confirmed 12 blocks prior (at the ...
0
votes
1answer
51 views

How can I use geth to browse through the blocks in a local testnet?

I have installed a local Ethereum testnet and I need to browse the blockchain to search for some information without using any smart contract. How can I do that?
2
votes
1answer
421 views

Given a block number, how do I find the block hash using Nethereuem?

Using Nethereum, I would like to get the block hash given a block number (i.e. block height).
0
votes
3answers
580 views

How Exactly is Smart Contract Validation Performed?

I have yet to find a coherent explanation of how a smart contract - that potentially can have complex interactions with other smart contracts - is actually validated. Please no hand waving here. What ...
1
vote
1answer
49 views

Where are blockchain environmental globals stored?

Where are contract globals like msg.sender and block.number stored? It is in memory or storage?
1
vote
0answers
87 views

Uncle blocks and their Relationship to Chain Size

How much do uncle blocks affect the overall chain size? Is the amount of added security they provide for the chain comparable to how much extra data they add to the chain? If, for some reason, all ...
0
votes
1answer
400 views

Ethereum's block times are under 10 seconds compared to most other coins which are in minutes. Why and How?

Ethereum's blocktimes is under 10 seconds but other coins like BTC, LTC, and others are usually in minutes. How does ethereum solve the problems to why those other blocktimes are in minutes? Basically ...
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 ...
0
votes
1answer
78 views

I have some question about Smart Contract [closed]

Where is the Smart Contract Data stored? How does it get activated, as every contract has a logical outcome? What happens to the block or the transaction in which the smart contract has been concluded?...
0
votes
3answers
67 views

Question on the security of forks

Reading the whitepaper of Ethereum I came up with the following questions on forks. Let me explain: Lets say that I send 1 ETHER to an address A1 to buy something and this transaction gets logged on ...
0
votes
1answer
70 views

Can miners freely chose the order of transactions within a block?

Can miners freely choose the order of transactions within a block or are there any restrictions like the transactions need to be sorted by gas price?
0
votes
1answer
34 views

Becomes a transaction part of a new block?

I volunteered to challenge functional questions for a meetup where we simulate Ethereum by the use of Post-Its. I want to stay as close to the technical reality as possible. Would you be willing to ...