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 [block-interval]

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

0
votes
1answer
8 views

Is there any library for estimates 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/...
0
votes
2answers
40 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 ...
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
0answers
22 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 ...
0
votes
1answer
31 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 ...
1
vote
1answer
37 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 ...
2
votes
1answer
18 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 ...
0
votes
1answer
32 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 ...
0
votes
3answers
105 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 ...
0
votes
0answers
28 views

How to get more constant output with Ganache

I'm using Ganache v1.2.1 for a simulation of my deployed smart contracts. I set the blocktime to 5 seconds. Sometimes I use around 3.000.000 gas per block (gas limit is set way higher). The problem is ...
2
votes
3answers
409 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. ...
6
votes
1answer
45 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 ...
0
votes
1answer
328 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 ...
1
vote
0answers
143 views

How can i increase the block number in testrpc?

I have the contract which has the dependencies on the block.number so in my javascript test cases I want block number jump. I know about the eth_mine but it will mine only the current block or work ...
2
votes
1answer
206 views

Can we just increase block gas limit and decrease block time to raise TPS? [duplicate]

Given transaction gas limit (TGL), TPS = block gas limit (BGL) / TGL / block time (BT). But we don't increase TPS by simply raising BGL and decreasing BT. What's the downside exactly? Bigger BGL leads ...
1
vote
2answers
76 views

See how long a transaction took to confirm

Given a finalized transaction, is there a way to see how long it took? Perhaps using blocks to calculate an estimate? Take this one for instance. I have been trying to calculate transaction times ...
0
votes
1answer
1k views

How can I get current time?

My project is fully based on time. Is there any way to get current time without using NOW? NOW is just returns time when block was mined and always shows "transaction will fail" when I do require(now &...
1
vote
1answer
1k views

Speed of Ethereum for real time DApp

Currently the block time is around 17s but the confirmation time is even longer around 2-3 minutes. Moreover, as I understand even if the transactions-per-second are 7 we still need to wait the ...
10
votes
2answers
2k views

What is the safest minimum block time to use without having any problem on Proof-of-Authority consensus?

On the following blog, at very last paragraph, Vitalik Buterin mentioned that: Hence, a 3-second target block time (and 5s actual block time) may be quite viable. As usual, we’ll be more ...
0
votes
1answer
47 views

Which is going to be the very last block of 2017?

I know that the last moment of the year depends in which time zone you are. But lets assume that we want the very last moment, so let's consider the last time zone (+12), I believe is Fiji or New ...
0
votes
2answers
388 views

Transactions and contract state

Imagine I have a contract that allows people to buy tokens. After some time, only one token left, but two persons try to buy this token at nearly the exact same time from the same node (a web server)....
2
votes
2answers
375 views

Why can't a blockchain process more transactions then a single node can?

I'm reading about the on-chain scalability solutions. At the moment I'm looking at sharding. Currently, in all blockchain protocols each node stores all states (account balances, contract code ...
1
vote
1answer
420 views

How reliable is it to use Block number to calculate Time in Smart contract?

I have seen contracts use block numbers to manage when the crowdsale should start and stop. How reliable is this? I understand the average time in ethereum is 17secs between blocks, but can this be ...
2
votes
1answer
888 views

Why is avg. block time growing so much latley [duplicate]

how come average block time is growing this much latley? In March it was around 14.5 and today is around 24. I know that hash rate is growing fast, but shouldn't every difficulty adjustment reset avg. ...
0
votes
0answers
55 views

Can we assume an average time to mine a block?

How safe is the assumption that, 10 years from now, it will take a certain amount of time (say, ~16s) to mine a block? If we cannot safely assume future block solving times, how else can we measure ...
0
votes
2answers
2k views

How to estimate block number at future date/time?

I am creating a smart contract that will allow actions to be taken during a specific time period. Ideally, I would like to let users know in advance the start block/end block that the contract will ...
0
votes
1answer
5k views

What is the transaction confirmation time for ERC20 based token? [duplicate]

In case of Bitcoin, it is 10 min. What is the case for ETH or ERC20 based token? And what's the confirmation time change after Casper update?
0
votes
2answers
355 views

What happens if no (unique) longest chain of blocks exists, so that the current state of Ethereum is ambigious? [duplicate]

What happens if no (unique) longest chain of blocks exists, so that the current state of Ethereum is ambigious? I know that the longest chain of blocks are always taken to be the current state of ...
1
vote
1answer
143 views

Can someone download and run a local version of my contract?

Say I have a smart contract the preforms a specific function and is used in a decryption process off-chain. Would it be possible for Molly to download the entire contract and run it on their own local ...
0
votes
2answers
80 views

Estimating days with block solving frequency: sanity check

The current block is 710908. If 212 blocks are solved per hour, then 30 days from now, we should roughly be at block 863548: 710908 + (30 * 24 * 212) = 863548 But... that's a lot bigger than 710908! ...
1
vote
2answers
1k views

How time difference can be calculated by block.number and how it is different from block.timestamp?

I have been looking into the code recently done by some developers, they are using block.number + numbers to calculate the time difference. For example if I want to lock fund for some 6 months or 180 ...
2
votes
1answer
472 views

Does block difficulty adjust with different gas limits?

Ethereum has a dynamic gas limit, a market governed by the miners. Does the block difficulty change if the gas limit is changed? For example with an increased gas limit from 3 million GAS to 6 million ...
3
votes
1answer
1k views

Once PoS and Casper is reached, what stops block times from dropping into the millisecond range?

After reading through Vlad's Casper Post, I am under the impression that Casper consensus will be reached when the validators all agree on a bit (more or less). If this is the case, why can the '...
8
votes
1answer
1k views

Ethereum's definition of difficulty and hash rate

I'm trying to make sense of geth's hashrate and Ethereum's difficulty setting. I'm running a private test net and set the difficulty to a fixed value (to big.NewInt(250)) as described by https://...
3
votes
1answer
249 views

Could I give higher priority to transactions to mined right away?

For example on Linux we can give higher priority to processes for Linux Kernel to schedule. I am the owner of my Private Ethereum Network. As an owner, could I give higher priority to deploy or mine ...
14
votes
1answer
3k views

Is Solidity block.number more secure than timestamp?

In Solidity, some properties such as block.timestamp are attackable by miners and are not (strongly) protected by the protocol. How about block.number, could a miner introduce a randomly high number? ...
3
votes
1answer
542 views

fast blocktime in private net

I need a long-running private Ethereum net (at least for 2 weeks) with fast block times. I have a single machine which is mining. When setting the difficulty very low, the block-time is very fast in ...
1
vote
0answers
34 views

Geth 1.5 Extreamly Slow to Sync on Ubuntu 16.04 LTS (Will Never Catch Up) [duplicate]

I set out to do a full geth chaindata sync on a new Ubuntu 16.04 LTS machine, and after the first 80-90% of the blockchain downloaded quite fast, the sync speed dropped considerably, to the point ...
2
votes
2answers
381 views

Why doesn't ethereum have a fast relay network like Bitcoin?

I'm talking about nodes that miners connect to that help relay blocks fast, to reduce hash power wastage and forks: http://bitcoinrelaynetwork.org/ and http://www.falcon-net.org/
5
votes
1answer
2k views

Ensuring a transaction is included in a specific block

I have been sending myself transactions back and forward between MEW and Parity trying to get a transaction included in a specific block number however I seem to be always 3 - 6 blocks behind where I ...
2
votes
1answer
97 views

Timely block times on private network

I've been working on building and testing a private ethereum network using geth and commodity AWS hardware. I'm curious if it's realistic to expect 14s block times in this case? What I see is very ...
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 ...
5
votes
1answer
700 views

How can we reduce the transaction time in ethereum?

I created a single node using geth --dev and tried transacting between two personal accounts using: eth.sendTransaction({from: 'first_acc', to: 'second_acc', value:web3.toWei(1, "ether")}) This ...
1
vote
1answer
813 views

What happens if the block time changes to 5 seconds?

Related to this and this. The difficulty adjustment algorithm is: block_diff = parent_diff + parent_diff // 2048 * max(1 - (block_timestamp - parent_timestamp) // 10, -99) + int(...
2
votes
1answer
89 views

How are the confirmation times distributed in Homestead?

Now that we know about the empirical distribution of block times, what would the confirmation times look like?
13
votes
2answers
1k views

How would a miner cope with a huge block time?

Given that: According to the white and yellow paper a block's timestamp must be bigger than the parent's. According to the white paper a block's timestamp can be within 15 min of the parent ...
9
votes
2answers
598 views

What is the measured distribution of block times since Homestead?

The variance of block times should arguably follow a Poisson distribution. But by casual observation I've seen blocks fast as 4 s or 1 m 15 s. The average is around 14 s since Homestead. If it follows ...
4
votes
2answers
265 views

Is code execution time limited by the block time?

I'm fairly new to Ethereum, and I'm still trying to grasp the potential uses. I keep seeing articles using encrypted instant messaging as a potential application. But, there is a problem with this: ...
6
votes
1answer
933 views

How does Ethereum regulate the time between blocks?

I was reading "Explanation of genesis file" and I found the description of the timestamp: A scalar value equal to the reasonable output of Unix’ time() function at this block inception. This ...
9
votes
2answers
927 views

What is the target block time for Casper?

With PoW, the block time is around 17 seconds. What is the target block time for Casper's PoS?