Questions tagged [blocks]

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

Filter by
Sorted by
Tagged with
1
vote
0answers
88 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
98 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
51 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
113 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
326 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
43 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
46 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
61 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
461 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
362 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
34 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
513 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
44 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
170 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
145 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
60 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
456 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
780 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
54 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
89 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 ...
1
vote
1answer
425 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 ...
7
votes
1answer
968 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
87 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
81 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
77 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
38 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 ...
3
votes
1answer
230 views

API to enumerate the blocks from a specific day

I'm trying to find an API that lists all the blocks from a specific day, as we can do with bitcoin: https://blockchain.info/pt/blocks/1515628800000?format=json I've searched etherscan.io and ...
2
votes
1answer
5k views

What is the size of the Ethereum blockchain for full and light nodes? [duplicate]

What is the size of the Ethereum blockchain for full and light nodes? What is the size of the Ethereum blockchain, and where can I look it up? Furthermore, does the size depend on the particular ...
1
vote
0answers
257 views

How to verify whether a certain transaction is mined by the newest block programmatically?

What I thought I should do I implemented this functionality with Bitcoin Core through zmq support. Keep "my transactions" through zmq's rawtx topic. When received zmq's rawblock, decode the raw ...
2
votes
0answers
306 views

Solidity - check PoW difficulty

If given block data and a difficulty number, is it possible to verify that the header produced is at or above the provided difficulty from within Solidity? For example, suppose I have the following ...
1
vote
1answer
82 views

Get the time a block was mined

My front-end displays the timestamps of various contract actions that have taken place. However, the current block.timestamp it's using isn't very accurate, because the miner has some leeway in ...
0
votes
1answer
63 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 ...
1
vote
2answers
74 views

Who are the miners?

In blockchain there are some miners who calculate hash and get reward but my question is who are the miners or how can I be a miner (assume). If there are then I can be connected to a miner? I am ...
1
vote
3answers
400 views

How to architect scalable ethereum blockchain network?

I have set up the private ethereum block by doing the following steps. 1- Initialised same genesis.json on 2 systems. 2- Started geth console by using same network id. 3- Added these two systems (...
0
votes
3answers
595 views

How to get address balance after particular block was issued

How to get address balance if you know the block number? In solidity you can call address.balance, but without specifying particular block. Is there a way to do this in solidity or only py/js?
2
votes
1answer
683 views

How is the block gas limit dynamically adjusted?

What mechanism lies behind adjusting the block gas limit dynamically? Is it the miner that mined the most recent block who decides whether to adjust the gas limit or not? How much can the block gas ...
3
votes
1answer
814 views

Block header format

Does anyone understand what each element of a block header represents? I have an example block header represented here: [ cd7bd64fba4cc782fe5474d3640882afece5887180591e72f80ce6916cf73526, ...
5
votes
1answer
2k views

When are “pending” transactions dropped from the blockchain?

When are transactions dropped from the blockchain? Suppose I broadcast a transaction to the blockchain, then it is a pending transaction waiting to be mined. But when are pending transactions ...
25
votes
3answers
16k views

Is it possible to cancel a transaction?

Is it possible to cancel a transaction after it has been broadcasted, but before it has been mined? This could be useful on sending an erroneous transaction containing invalid data.
2
votes
1answer
568 views

Max data storage per block

I'm wondering how much data a smart contract can store per block. Ex: The gas limit is currently ~6,700,000, and it costs 20,000 gas to store 32-byte word. So the EVM can store a maximum of 335 bytes ...
0
votes
1answer
85 views

How to transfer tokens after 6 blocks? [duplicate]

I have created a smart contract that expects to receive ether via Etherum Wallet desktop app or MyEtherWallet site. The contract then sends equivalent amount of tokens to the ether sender on the same ...
3
votes
1answer
1k views

Meaning of Imported New Chain Segment

This is not a troubleshooting question, I'm not having problems with geth or the blockchain sync, but I'm curious about the meaning of a text that appears at the end: Imported new chain segment. I ...
4
votes
2answers
1k views

What is the timestamp of a confirmed transaction based on?

Specifically, if we look at any transaction on the Ethereum blockchain, is the TimeStamp based on when the transaction is generated (like when you click generate transaction on MEW), or is it based on ...
0
votes
2answers
708 views

How to get a list of ALL block hashes yet?

I'm looking for a way/link/service to get a list of ALL (~4400000) block hashes yet. Any idea how to get that? Thanks
1
vote
1answer
985 views

How to get the full miner reward

Okay so let's say I'm looking to get block 1000000 miner reward: { difficulty: 12549332509227, extraData: "0xd783010303844765746887676f312e352e31856c696e7578", gasLimit: 3141592, gasUsed: ...
1
vote
1answer
545 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 ...
1
vote
1answer
398 views

Is it possible for transaction not to be processed with low Gwei? [duplicate]

Is it possible for transactions not to be processed with low Gwei? Or will always be processed just will take some time? Assume I do 1000s of transactions with 1 Gwei, can I rest assured that all ...
2
votes
1answer
79 views

Does increasing gas price decrease number of txs in a block?

Assume I figure out a way to pay 5+ ETH in gas costs for a transaction. Will this make my transaction the only transaction in the block because the block reward is currently 5 eth?