Questions tagged [blocks]
This tag is for questions dealing with the structure of blocks.
350 questions
1
vote
0
answers
50
views
Block number across execution and consensus layers
How can I look up the corresponding Beacon block for an execution block by block number?
If I use the block number of an execution block to request a Beacon block, the Beacon block in the response ...
1
vote
0
answers
20
views
Where I can write block and transaction specification?
I want to see some detailed specification of how block/tx on ethereum should look like. Ideally, see the diff between Capella/Deneb.
I googled it but mostly found only general overview articles, while ...
2
votes
2
answers
36
views
Attempting to include a transaction into a certain range of blocks
I'm curious how difficult it would be to ensure that my transaction got included into a specific block. More specifically, if the current most up to date block is block X, how certain can I be that my ...
0
votes
0
answers
33
views
Find the amount of reward the node operator/validator received for including the block in that slot (in GWEI)
I've a GET /blockreward/{slot} API requirement where I need to retrieve information about the block reward for a given slot (integer) in the Ethereum blockchain.
JSON Response:
status: Whether the ...
1
vote
0
answers
10
views
Are there any examples of rollups with multiple types of blocks?
I'm curious if there are any examples of rollups that have more than one type of blocks?
Example of what kind of differences there could be between blocks:
Blocks of type Foo have 30M gas limit, ...
0
votes
1
answer
22
views
Why is each block getting under utilized in ethereum?
The current block gas limit in ethereum is 30 million units but far from getting completely filled they are way underutilized.
Is it because the gas price sent by transaction not attractive enough for ...
4
votes
1
answer
50
views
How do zkSync Blocks Work?
I am reading the zkSync documentation and seeing "L1 Batches" and "L1 Rollup Blocks." Are they the same thing?
When a batch of transactions is sent to Ethereum as an L1 batch, how ...
4
votes
1
answer
53
views
DoS when a contract with too much storage is SELFDESTRUCT-ed?
SELFDESTRUCT-ing a Smart Contract requires effectively removing the EVM storage of that contract from the Ethereum database.
What would happen if a newly-submitted tx would lead to the SELFDESTRUCT-...
0
votes
0
answers
26
views
Successfull transaction stucked because of blocks confirmation not stopping
5 hours a go I did a transaction on ERC20 from kucoin to a wallet. Kucoin says it successfull, Ethercan also successfull but the confirmation blocks keep increasing more than 1500 as I wrote this ...
0
votes
0
answers
17
views
Forking a network to simulate events
I'm trying to simulate an event by forking a network. For example:
wss.on('block', async (blockNumber) => {
// Your code here
});
How can I accomplish this? Any guidance would be ...
0
votes
1
answer
47
views
My Arbitrum Alchemy node is randomly returning -3 for block number
Basically I'm getting an error from my RPC node provider (Alchemy) where sometimes, when I query for the block_number I get the response -3.
I don't quite understand why or if this is a rate limit ...
2
votes
0
answers
45
views
What does the Geth/Erigon ethereum client do if there are not enough transactions in the pool to fully fill the new creating block?
When the transaction pool of Ethereum nodes like Geth or Erigon doesn't have enough transactions to completely fill a new block, how do these nodes respond? Do they immediately generate a partially ...
1
vote
1
answer
24
views
Transaction within block gas limits: Will it possibly run out of gas?
Is there any risk in running a transaction that needs quite some gas, even if always within the borders of block gas limits? Let's say 20M, with block limit being 30M.
The transaction runs complex ...
1
vote
2
answers
96
views
block.timestamp: will my function possibly fail?
I need to execute a function 24hrs after a certain timestamp is recorded in my contract.
So my front-end starts a countdown, taking that contract timestamp as start.
After 24 hrs, my front-end calls ...
0
votes
0
answers
51
views
Link between beacon chain slot and execution chain block
I have researched info about this topic and I seem to find no answer. If it already has been asked please kindly provide the link for it.
I would like to know the link between slot and block.
From ...
0
votes
0
answers
23
views
How does the RANDAO mechanism prevent DoS attacks in the beacon chain?
I was reading through an explainer on the Beacon Chain at ethos.dev, which mentioned that block proposers are selected via the RANDAO mechanism. This raised a question about the network's resilience ...
3
votes
0
answers
89
views
What is the difference between a block producer and a validator node? and how is this linked with 'validators' needing to pay for sandwich attacks
Are these they same or are these distinct entities.
I'm often confused when I find in articles that validators
need to pay (increased) transactions fees for a trade to be
frontrun or be sandwiched. If ...
1
vote
1
answer
42
views
How are Ethereum 2.0 (post merge) block hashes computed?
I found in this link on Ethereum Stack Exchange that a block hash is calculated by using
const blockData = [
block.parentHash,
block.sha3Uncles,
block.miner,
block....
0
votes
1
answer
15
views
Are errors emitted as logs on the blockchain?
Say if an error is caused due to a revert statement will it be emitted as an event so front end application will be aware or not?
0
votes
1
answer
396
views
Number of transactions in a block
Could someone kindly explain the reason behind the existence of 1189 transactions within block #17873752 in the Ethereum network?
0
votes
1
answer
205
views
How to advance blocks in a Hardhat test that uses block.timestamp?
I have this code for a Voting smart contract test:
it("Should return true if end time is less than the current timestamp", async function () {
const { votingSmartContract } = await ...
0
votes
2
answers
195
views
How to keep track of each account's ETH balance when parsing all historical transactions
I have downloaded the contents of each historical Ethereum block (starting with block 0) by calling eth_getBlockByNumber for every single block.
I want to write a script that iterates over each ...
0
votes
1
answer
78
views
Stuck in Smart Contract
I paid the fees on ethereum for item but received nothing what can I do for this? I think there is an error in smart contract please check for me my address is ...
0
votes
2
answers
1k
views
supplying liquidity + sniping own coin in same bundle
https://etherscan.io/tx/0x0d21d70e031089ab3e5b8083a84f122d5e995033c666dd7ce7cff982b5ba7c77
it looks like this transaction has Supply liquidity and swap Eth for its token all in one bundle.
can anyone ...
1
vote
1
answer
194
views
Does block number increase when a slot has no proposed block?
If a slot has no proposed block (ie an empty slot), does the block number still increase?
0
votes
0
answers
59
views
Transactions not ordered fairly? (BSC)
If we take a look at the first few transactions block 29930437 on Binance smart chain, there is something very interesting going on, if we compare gas prices:
Tx 0: The first transaction payed ~2132 ...
2
votes
1
answer
79
views
Number of validators in a committee for a particular slot is not equal to the number of aggregation_bits for that committee in the slot
I was trying to make a program in which I store the attestations of the validators. But When I started running the program I ran into an error, which was that the number of validators in the committee ...
1
vote
4
answers
120
views
Specific Block Data?
How can I get data from a specific block in the past? Does node providers support archive node? Any suggestions are welcome.
1
vote
0
answers
51
views
How to calculate a tx's effectiveGasPrice within a block?
Let's say I query all transactions within a block. Assuming all transactions are already settled, how can I know what will be their effectiveGasPrice ?
I'm confused that transactions specify a ...
1
vote
1
answer
1k
views
How to get internal transactions using JSON-RPC methods
In etherscan I noticed that there are transactions that have "internal transactions" inside of them, see this link: etherscan transaction.
Screenshot of the transaction:
My question is: how ...
3
votes
1
answer
852
views
What is the withdrawals field of the response of web3.eth.getBlock()?
I noticed that the withdrawal field has been added to the web3.eth.getBlock() response. Here is a small example:
{
<the usual fields>... ,
withdrawals: [
{
index: '0x3812d',
...
0
votes
0
answers
70
views
How do validators pick transactions to fill the gas usage per block?
I was looking through Etherscan and noticed blocks vary widely in gas usage from one to the other. I was wondering how do validators pick transactions that they'll include in their pending block, as ...
3
votes
1
answer
247
views
What is the "skip-block" exact definition in Ethereum 2.0?
In this article the term "skip-block" has been mentioned so briefly that it is not clear to me what its exact definition is. Is it a kind of block in Ethereum 2.0 ?
I also could not find ...
1
vote
0
answers
36
views
Does empty slot (by the proposal being offline) mean no transaction processing for 12 seconds?
guys!
When a validator chosen as the block proposal in a certain block goes offline, the slot goes empty.
Does that mean that no single transaction is successfully processed for the slot (for 12 ...
2
votes
1
answer
328
views
Who is index 0 validator in ethereum beacon chain?
Address: 0x933ad9491b62059dd065b560d256d8957a8c402cc6e8d8ee7290ae11e8f7329267a8811c397529dac52ae1342ba58c95
In beaconscan.com, the index 0 validator proposed block nearly 20,000 times and almost ...
2
votes
2
answers
545
views
Given 2 transactions to my smart contact on the same block, how can I tell which came first within the contract?
My contract requires holding a history of all interactions to it. I have a hook for everything except tokens being sent to the contract — this requires a separate array of history from everything else ...
1
vote
0
answers
344
views
Why does the Polygon PoS Chain Average Gas Limit (per block) keep changing?
Most EVM chains have a fixed gas limit and gas target per block. For Ethereum, it's 30M and 15M: https://etherscan.io/chart/gaslimit
For Polygon, the gas limit seems to change every single block. How ...
3
votes
2
answers
594
views
What is the underlying mechanism behind empty slots in Ethereum?
Ethereum docs says:
However, occasionally validators might be offline when called to propose a block, meaning slots can sometimes go empty.
What happens when the randomly chosen validator is offline?...
1
vote
0
answers
28
views
Why do some mined transactions not contain a 'to' parameter?
Sometimes there are transactions inside a block that are missing the 'to' field.
How can there be a mined transaction without a to field? What happens to this transaction?
eg. one of the transactions ...
0
votes
1
answer
561
views
How to get the exact block number in Hardhat deploy script?
I have written a code in hardhat deploy script to fetch the exact block number at which the contract has been executed, but it usually returns the block next to the original. Any idea how to get the ...
0
votes
1
answer
308
views
Block timestamp
Require(block.timestamp + 1 days - 1 hours <= numbers [14] ,
"Must lock longer than x") ;
Require(number [14] < 9999999999, "Avoid potential timestamp overflow");
Locktime = ...
5
votes
1
answer
824
views
Are uncle/ommer blocks still possible after the merge?
Uncle blocks were produced before the merge when two miners found a solution at the same time and following blocks were appended to only one of them. So my question is, are uncle/ommer blocks still ...
1
vote
2
answers
291
views
How to access the difficulty of an older block from within a smart contract?
Is it possible to access properties of an older block from within a smart contract (e.g. difficulty, timestamp etc.)?
0
votes
1
answer
35
views
How can I get a large amount of Ethereum transactions in a database without running my own node? Does a database like this exist already?
I am doing research into Ethereum transactions and I simply need a database of 1000 transactions or just about 10 blocks worth of transactions. What is the easiest and fastest way to acquire this?
Do ...
2
votes
1
answer
323
views
Coinbase transaction on ethereum
So, I learned that in bitcoin, a coinbase transaction is the first transaction that gets created in the block and it is used to give block rewards to the miner that mined the block. I was curious if ...
1
vote
1
answer
981
views
What is the difference between Relay and Builder post Merge in Ethereum?
I was listening to an episode of Bankeless where they were talking about things coming up, post merge. In that episode they mentioned block builders and relayers.
The context they mention it was ...
2
votes
1
answer
383
views
Broadcasting a transaction to be included in the next block
Since the merge we have predictable block times of around 12-13 seconds. I want to broadcast my transaction in a way that it is highly likely to get included in the next mined block, e.g. the block ...
0
votes
1
answer
15
views
Where are the docs on transaction filtering?
Say we have a user that tries to make a fake transaction. Where are the docs regulating how it is checked before it is fitted into block (pre and post PoS consensus merge )?
3
votes
1
answer
207
views
Where are the blockchain transactions stored?
I'm studying the block structure in several blockchains like Bitcoin or Ethereum. When I started to read about blockchain, many sites and books said that transactions are stored in blocks. Ok, I got ...
3
votes
2
answers
2k
views
Are Ethereum blocks flexible in terms of size or are they capped?
Many blockchains have block size limits. But I am confused when it comes to Ethereum.
On one hand, I read that its block size is flexible. But on the other hand, I strongly suspect there must be a ...