Skip to main content

Questions tagged [block-interval]

Questions concerned with the expected or actual time between the discovery of two blocks.

Filter by
Sorted by
Tagged with
1 vote
1 answer
21 views

Frequent forks dilemma in old ethereum(when it was only POW)

Decreasing block time causes more transactions to be processed, but that also causes frequent forks. frequent forks have 2 downsides: hashrate is wasted and 51% attack becomes easier. In the very ...
Neo's user avatar
  • 103
1 vote
2 answers
83 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 ...
user130657's user avatar
2 votes
1 answer
62 views

Are block.timestamp and block.number still problematic under Proof of Stake?

As stated in the SWC116 (https://swcregistry.io/docs/SWC-116/) using block.timestamp and block.number in Smart Contracts under Proof of Work was problematic. Block.timestamp could be influenced by ...
Yleisnero's user avatar
3 votes
2 answers
616 views

Why are Ethereum slots 12 seconds?

In Ethereum Proof of Stake, how was this particular slot time of 12 seconds decided upon? Credit: https://old.reddit.com/r/ethereum/comments/gb8j89/eth20_slot_time_a_question/
eth's user avatar
  • 86.2k
0 votes
2 answers
734 views

Blockhash and Block Timestamp manipulation in PoS

I was looking at generating some psuedo-random numbers in an Etheresum smart contract and understand that it is possible for miners to manipulate the blockhash and block.timestamp. The Solidity ...
chriscrutt's user avatar
0 votes
1 answer
41 views

Execute an ethereum transaction every X amount of blocks within a smart contract?

I would like to build a smart contract where users deposit crypto into a lottery like system. Every 10 blocks that have passed on the underlying chain I want to generate a random number and send out a ...
Denis Ivanov's user avatar
0 votes
1 answer
53 views

Creating a smart contract with ipfs

I created a site with the help of ipfs, my goal is to create a smart contract with the ipfs CID of this site. but i have no idea about this, can anyone help?
yavuz's user avatar
  • 1
1 vote
0 answers
100 views

High block mining time even with low difficulty

We have a private network running on Hyperledger Besu. We are using ethash, and it had a fixed difficulty of 3625. That was producing blocks fairly quickly, averaging about 8-10 seconds, with some as ...
pdmoerman's user avatar
  • 131
1 vote
0 answers
24 views

Oscillating blocktime issue

I have three private blockchain networks: production development QA production and QA both have blockTime of 10 seconds and are behaving as expected. When I read their block timestamps, there is ...
Sky's user avatar
  • 2,352
1 vote
2 answers
394 views

Why PoS block not strictly generated on 12 seconds

I'm trying to estimate the block arrival time in etherum PoS. I was given to understand that every 12 seconds, a new block will be generated. I did a simple calculation but the result is not expected. ...
Bai Bing's user avatar
  • 113
13 votes
3 answers
2k views

Miner-modifiability of block timestamp after the Merge

Under proof of work, the Ethereum block interval varied, but miners could modify the block timestamp by +/-15 seconds, as long as the modified value was greater than the parent timestamp, without the ...
Luke Hutchison's user avatar
1 vote
0 answers
16 views

How stable is the block time after Ethereum PoS? [duplicate]

I understand that PoW basically depends on luck. If the target block time is 10 minutes, if lucky, 3 minutes, if unlucky, will not be able to find the hash even after 30 minutes. How stable is the ...
user3524577's user avatar
3 votes
1 answer
216 views

What explains the relative infrequency of block time differences coinciding with EIP-100 thresholds?

When I plot a histogram of timestamp differences between consecutive blocks, I see some irregularities around the EIP-100 thresholds. Because the adjustment factor includes integer division by 9, ...
Shane's user avatar
  • 131
1 vote
1 answer
171 views

Would it be possible to change the 15 seconds block time to 1 min?

Do you know if it is possible for ethereum forks to increase the 15s block time to for instance 1 min block time or 2 minutes block time? Moreover I noticied that when we start new blockchain the ...
Kevin Wad's user avatar
  • 327
1 vote
0 answers
66 views

How to increase block time in a fork of Ethereum?

I have questions about blocktime, please answer the ones you can. Help very appreciated! Do you know if it is possible for ethereum forks to increase the 15s block time to for instance 1 min block ...
Kevin Wad's user avatar
  • 327
1 vote
2 answers
221 views

What is the relationship between block time and the time I send a transaction?

As I understand, the average block time is 16 seconds, and it ranges from 10-30 seconds. Does that imply that each individual transaction on the current block was sent no longer than 30 seconds ago? (...
akkp's user avatar
  • 13
0 votes
0 answers
174 views

Latency between block production and data reception

I am trying to measure the latency between the block production (eg block.timestamp) and the data reception (eg Date.now()); I tried with different nodes (Infura, Amazon Managed Blockchain and my very ...
Charles's user avatar
0 votes
1 answer
212 views

Update rewards per second

I'm currently working on a staking contract and would like to get EVERY SECOND the updated number of rewards the user gets for staking tokens. Are there any technical limitations to get the updated ...
Javakid's user avatar
1 vote
1 answer
86 views

What if running a function longs more than block time?

In a blockchain with a typically small block time such as Polygon (or any other chain in general), what happens if executing of a a) transaction b) view function longs more time than a block time? ...
Ehsan Khodarahmi's user avatar
7 votes
1 answer
1k views

By what duration can a miner manipulate block.timestamp?

By what duration can a miner manipulate block.timestamp? Can they manipulate it by 10min, 5sec, 2hrs...? From here I can see that the average block time on the ethereum blockchain is 13 seconds. This ...
YulePale's user avatar
  • 1,853
2 votes
2 answers
1k views

How to get block -> timestamp in bulk, incl. possible 3rd party api

I'm looking to get my hands on a historical block -> timestamp mapping. Although it's possible to get this data using web3.eth.getBlock it's rather costly to do it for all individual blocks. Since ...
Geert-Jan's user avatar
  • 169
2 votes
0 answers
85 views

Ropsten light node block number ~1000 greater than it should be

I'm running geth on Ropsten, using geth --ropsten --syncmode "light" --http.addr localhost --http.port 8545 --rpc My most recent block number is 10266786 (and increasing), whereas etherscan....
nnsk's user avatar
  • 101
0 votes
1 answer
268 views

What does this block of code do?

Can anyone explain or point me to a specific source where I can learn about .providers functions. In particular I am trying to understand what this block of code does: for (let i = 0; i < 257; i++) ...
mtheorylord's user avatar
0 votes
1 answer
40 views

Auction period using block.number

I have something like: contract example{ uint endBlock; constructor(uint _elitism) public { endBlock= block.number + 40; // 10 min of time } ...
Joncarre's user avatar
  • 281
1 vote
2 answers
751 views

Can you use block times as a measure of duration?

I have read that it takes about 12 seconds for an ethereum block to be mined. Let’s us say I have a contract mined on block 100, can I set a function that can only be run at block 200 or more? Thus ...
YulePale's user avatar
  • 1,853
1 vote
0 answers
272 views

What is the theoretical average latency of data transmission?

I concluded a pretty simple test to measure some latencies. I connected to two providers (Infura and Quiknode) with Web3.js and subscribed to new block headers. Then I compared the time of arrival and ...
Wyctus's user avatar
  • 226
1 vote
1 answer
1k views

Ethereum block timestamp

Is the timestamp of a block referring to the time that block is created or when it's mined by a miner? Suppose I subscribe to new incoming blocks using the following NodeJS code (with web3): web3.eth....
Fabrizio Sandri's user avatar
0 votes
2 answers
2k views

how estimate average time for transactions to smart contract

I have created a decentralized application on the Ethereum Blockchain network. This application receives data from different addresses on the blockchain network and saves this data in the blockchain ...
esraa's user avatar
  • 7
0 votes
0 answers
280 views

Testing response times using Ganache

If you want to simulate repsonse time of your smart contract, how realisitc is it to use ganache? I'm thinking that in a live network, ropsten for example, there would be a lot more transactions ...
Conviley's user avatar
  • 390
1 vote
1 answer
343 views

How to adjust "time slots" in Ethereum 2.0 (Sharding + PoS)?

In Ethereum 2.0 (Sharding and PoS), blocks are produced at a regular schedule, say once every t seconds. What does this time slot depend on? The number of validators in the network who deposited ...
Questioner's user avatar
  • 2,680
2 votes
0 answers
414 views

How to reduce block time for existing ethreum blockchain network?

I had deployed my private blockchain network back in 2018-08-12 16:12:48 +0600 (1 year, 167 days ago). Since then it is working. At that time the block time was 20-30 seconds which was acceptable for ...
sharif2008's user avatar
2 votes
1 answer
4k views

How to calculate average time it takes for a transaction to be added to Ethereum blockchain?

In the following article (LINK) we read: "despite the fact that at the time of this writing a new block is produced approximately every 10–20 seconds the average time it actually takes for a ...
Questioner's user avatar
  • 2,680
0 votes
2 answers
170 views

Rinkeby not producing blocks

transactions are not getting mined on rinkeby testnet and last block time is almost 2 hours ago. How did such things happen in a decentralised network?
Akshay Dev's user avatar
3 votes
1 answer
484 views

Are the timestamps of blocks for Ethereum only accepted when they are monotonically increasing?

Are the timestamps of blocks for Ethereum only accepted when they are monotonically increasing? If yes, why? And why other blockchains like Bitcoin and other blockchains with shorter block time can ...
Shulai's user avatar
  • 51
0 votes
0 answers
50 views

How can I use bitcoin block stamp as seed for random number generation?

I am trying to create an ethereum based smart contract that shall generate random number. After searching around, I get to know that ethereum block stamp is vulnerable to miners hacks and false ...
Fariha Abbasi's user avatar
1 vote
2 answers
159 views

Decentralized Time server to get time in Dapps? [closed]

So basically i want to ask that how can we programmatically get the accurate, exact and current time in a DApp, without relying on the system's time or a centralized time server ? Is there a ...
Muhammad Yasir's user avatar
3 votes
2 answers
2k views

Avoid using "now"

I am using "now" to save the block timestamp details. But there is a warning to avoid its usage. If we need to avoid it what is the best alternative to it.
iappmaker's user avatar
  • 813
5 votes
1 answer
200 views

What happens to immutable contracts when Ethereum 2.0 will likely change the 15s block time?

Immutable contracts that need to have a time system for handling their functions process are mostly based on block.number system. They assume there is about 15seconds between each block and thus ...
Kevin Wad's user avatar
  • 327
0 votes
1 answer
410 views

How can I wait if it's not possible in smart contracts? [duplicate]

From my understanding, waiting in a solidity smart contract would create a total disaster for the whole Ethereum's blockchain. I can see in some circumstances that solidity offers block.timestamp ...
Sophie259's user avatar
3 votes
4 answers
3k views

Is there any library to estimate timestamp of future block?

I am in need of a library that estimates a date or some sort of timestamp when fed with a future block number (on mainnet or any major testnet). For instance, https://etherscan.io/block/countdown/...
Paul Razvan Berg's user avatar
4 votes
5 answers
4k 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 ...
Kevin Wad's user avatar
  • 327
2 votes
1 answer
113 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 ...
Steve Ellis's user avatar
  • 1,357
2 votes
0 answers
40 views

How is the block interval constrained in Ethereum 2.0

Sorry if i get any of the terminology wrong here, i'm no expert when it comes to PoS protocols. How does Ethereum 2.0 control for blocktime, typically we have the idea of a function that can be ...
CuriousCasey's user avatar
0 votes
1 answer
228 views

Can we freeze amount of token, amount of time with smart contract code?

Is there a smart contract code to freeze amount of token amount of time. For example i have 20 ether, with a smart contract code can i freeze it 1 year, even i can not touch it? With that code our ...
Gokhan Acar's user avatar
1 vote
1 answer
187 views

How to test time-dependent contracts on the mainnet?

In Ganache, I use evm_mine to simulate the passage of time. Assuming block times are accurate enough, what are the best practices to test some contracts on the mainnet or a testnet which depend on ...
Paul Razvan Berg's user avatar
2 votes
1 answer
33 views

Are there any EIP to speed up block times to stay competitive with other blockchains like EOS with .5 second block times?

Doing some research on EOS and it "seems" impressive or its just hyped up marketing. They have .5 second block times which I can see to be very beneficial for dapp development response times. Are ...
Patoshi パトシ's user avatar
0 votes
1 answer
55 views

Sharding: Shards with different properties?

I am currently trying to get more into sharding but there's one question I haven't found any answer to yet. Could sharding introduce shards with different properties? For example could Shard A have ...
Chris's user avatar
  • 1,322
0 votes
3 answers
708 views

How to allow an account to withdraw from another one?

The goal is to create a contract which allows party B to withdraw from party A's account according to some formula. I don't want to use an escrow model, rather just to: Let A attest that they are ...
Paul Razvan Berg's user avatar
15 votes
9 answers
17k views

How to get the block number which is the closest to a given timestamp?

Is there any method(ology) in web3 which allows to get the block number at a given date? In particular, I have two dates as an input and I want to effectively get all events between those two dates. ...
nikitaeverywhere's user avatar
6 votes
1 answer
116 views

What happened to the average blocktime during this period?

What happened to Ethereums blocktime from April to October last year (2017)? In the whitepaper, Vitalik said the difficulty should adjust at a maximum rate of 0.1% per block (around 100% per 12 ...
Edward Haigh's user avatar