Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [blocks]

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

0
votes
0answers
10 views

Parity synced at not existing block 4839212

I have problem with parity, cant get synchronization in archive mode to end, anything, changing arguments, max-, min-, snapshot-peers, parity verisions do not help. I have blockchain in archive mode ...
0
votes
0answers
23 views

Is latest block returned by eth.getBlockNumber fully processed

According to web3 docs, web3.eth.getBlockNumber returns the number of the most recent block. My question is simple. Is it safe to assume block's transactions and events are already in the node or ...
0
votes
0answers
10 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 ...
0
votes
0answers
21 views

What is the m_seal fields in the block header used for?

Can someone please explain what these extra fields in the block header are and what are they for? Edit: Oh, I just understood myself -- mixHash and nonse are stored here. But why is this data ...
0
votes
2answers
36 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 ...
3
votes
1answer
43 views

When is a new block created?

I am currently reading an interesting book about solidity, and I'm reading about block creation. This gives a good overview: The book mentions that the maximum size of a block is determined by the ...
1
vote
1answer
13 views

Can I get the timestamp for a transaction added to mempool?

Can I get the time stamp on when a transaction was added to the mempool and when it was successfully added to a block? Is there an API to do this?
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 ...
1
vote
1answer
32 views

Is there a smart contract recording all block hashes on in the ethereum blockchain, as they come in?

I'm wondering whether anyone has already made a contract and corresponding off-chain service which, once every 30 minutes or so, triggers the contract to record all the block hashes which have gone by ...
2
votes
1answer
25 views

Known cases of miners withholding blocks when used as randomness?

There are some applications that use the blockhash as a source of randomness, often with a payout similar to a lottery. I've heard of attacks where it would be more profitable for a miner to withhold ...
1
vote
1answer
77 views

How to get the value of the transaction?

I am using web3.py but I need help to know the value of the transaction sent. I know that the information is stored in the input but how do I parse the string. I know nothing about ABI. Here is the ...
0
votes
1answer
13 views

changing source of random number based on reward?

Would this be an acceptable way to produce a random number dependent on the reward? Say if the reward is high enough to entice a miner to manipulate the block then the contract will utilize oraclize. ...
0
votes
0answers
80 views

Modify number of confirmations

By default there are 24 confirmations but I am running a testnet with just 3 miners and I would like to change this number bucause it makes not sense to have 24. I have been checking ...
0
votes
0answers
11 views

How to read the data from block?

In my smart contract, I am inserting plain text message. I can also update the message. After updating, if I want to see the previous message, is it possible? Can I see all the data in etherscan.io?...
1
vote
0answers
23 views

How to mine a Empty Block or reject transaction?

How Can a miner can mine a empty block,reject honest transactions to be added into block ; does it mean we could tweak the miner client , if yes could someone tell how it is done and what are the ...
1
vote
1answer
123 views

How can i implement deadlines in smartContract?

Suppose I am running a gallery and ask participants to submit there paintings before a specific date. After passing that date participant should not be able to submit their entry. How can I implement ...
1
vote
1answer
15 views

Make sure I don't jump any blocks

I'm making a simple program to track transactions in and out of an address, I have a function that gets the latest block and then I run it consecutively. When I run the function sometimes the block ...
2
votes
0answers
41 views

How to read block propagation delay from ethstats.net?

I am wondering what is the average (or mdeian) time it takes to propagate a block in the Ethereum blockchain? I found ethstats.net provides a cummlative graph for block block propagation but do not ...
1
vote
1answer
20 views

How to change all the ethereum blocks from C drive to D drive — question about the answer

I'm new here and have no idea if this is the right way to respond. So I duplicated the question a have a question about: I've done the things written in the answer on the original question and I ...
0
votes
1answer
23 views

Is there multiple chains of block in ethereum network?

Since blockchain is a chain of blocks, In ethereum, 1. is there only one chain of blocks 2. are there multiple chains of blocks.
1
vote
0answers
42 views

What actually a block contains, is the data inside it a virtual or physical entity?

My understanding of a block in blockchain is that it is a data structure that contains information like Block Size, Block Header, Transaction Counter and then Transactions. Deeper in the Block Header ...
1
vote
1answer
91 views

How State variable are stored and updated?

The Smart contract and the state variables are stored in the blockchain, let us say during deployment of a smart contract the state variable and smart contracts are stored in the block 1, and in ...
1
vote
1answer
39 views

Looking for an Ethereum sniffer

I have been looking for a sniffer similar to Bitcoin P2P Network Sniffer (https://github.com/sebicas/bitcoin-sniffer) which could allow me to connect to Ethereum nodes and listen to blocks and ...
1
vote
1answer
33 views

Getting the last synced block is 0

I am trying to get last synced block but it always 0. So I have run geth --syncmode fast -cache 4096 --rpc Here is a logs INFO [12-19|09:47:50.058] Imported new state entries count=...
1
vote
2answers
61 views

Who generates the mathematical problem for miners?

In POW miners solve an problem for successfully mining a block, who provide the question to the miners ?, does all miners work on same problem ?, and how the miners verify the answer ?, if the problem ...
0
votes
1answer
33 views

how to get the last incoming transaction before date

I need to get the incoming transaction before the date currently i use https://web3api.io/api/v1/addresses/0xaD4b04Df17f2d35F81771Fa124dBD94E33587F4c/transactions?to=...
1
vote
0answers
42 views

Get blocks between dates

I am trying to get the block between dates . for that i use web3.js . per day average block is 6172 so if i need previous day block i use below code fromBlock: (await web3.eth.getBlockNumber()) - ...
0
votes
2answers
63 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.
1
vote
1answer
30 views

How will Proof of Stake affect blockhash generation

When (and if) Ethereum switches to proof of stake, how will the hash of blocks (most likely) be set?
1
vote
0answers
39 views

Ethereum Blocksci parser tool

I need a blocksci parser for ethereum. I am using https://github.com/citp/BlockSci for bitcoin . Is any similar blocksci parsing tool for ethereum?.
1
vote
2answers
34 views

0 txn in mined block [duplicate]

How is it possible for a block to be mined with 0 txn? https://etherscan.io/block/6739171 That's an easy way to get 3 ETH block rewards.
1
vote
1answer
18 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 ...
9
votes
2answers
214 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 ...
3
votes
0answers
15 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 ...
1
vote
1answer
25 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 ...
3
votes
1answer
46 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 ...
0
votes
2answers
112 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
94 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
470 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
149 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
32 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
448 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
155 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
64 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 ...
1
vote
1answer
1k 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
37 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 ...
0
votes
0answers
23 views

How the default block in Parity is set

How function setting default block (going back in history) in parity is implemented looking from algorthmic side?
4
votes
2answers
1k 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
143 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
765 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 ...