Questions tagged [blocks]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
7 views

Blockchain with fixed number of blocks using geth

I want to create a private blockchain with geth. In my case, the smart contract should be deployed (for example in block 9) and every block after this block should be deleted after creation. I want to ...
3
votes
0answers
21 views

Strange blocks behaviour, transactions are dropped from a validated block

I have faced a very strange issue on Goerli Testnet using infura. The number of transactions in a blocks dropped from 168 transactions to 164. I'm working on a blocks tracker, after receiving the ...
1
vote
1answer
17 views

How can I grab a list of all txHashes from the current/previous block with JSON-RPC

I would like to grab the list of txHashes in the current block or the previous block. I would like to grab this from a json-rpc api. Is this possible? All I found was grabbing info about the block not ...
1
vote
0answers
9 views

Highest known block in the peer network - permissioned ethereum network

We are starting to define the best metrics to monitor a permissioned Besu network. One important point to monitor is the block height of a node and from other nodes in order to discover if the node is ...
0
votes
2answers
12 views

Can there be two blocks with the same number?

I am trying to index blockchain data and I am thinking of what's a unique way to identify a block. Is it enough to use block number as the primary identifier and is there a possibility that the data ...
0
votes
0answers
20 views

Smart Contract - How to Copy or Clone it?

All - Could someone tell me if it is possible to copy or obtain a smart contract code that has been proven to work on the blockchain in the past. I have a block number and the smart contract address, ...
4
votes
2answers
74 views

Ensuring correct block order with subscribe on “newHeads”

I have an issue with processing new blocks through a WebSocket connection on a local node. Sometimes I receive multiple events with the same blockNumber but different blockHashes. I understood from ...
1
vote
0answers
14 views

How to subscribe to newly minted blocks?

I am trying to figure out the most efficient way to poll latest blocks. I found that there is a newBlockHeaders event that I can subscribe to using web3js. What is not clear to me is how to track the ...
1
vote
1answer
37 views

Who generates block details

Who generates/computes the block header and other details such as ParentHash, TxHash, etc.? I refer to above image for details but I am not sure who generates these details.
0
votes
1answer
41 views

Mining with 1.06GH/s

So right now I'm using 2miners and I rented 1.06GH/s to mine Ethereum. It says every 2 months I should find a block solo at 11k reward. Pool mining I'll get .55eth if pool finds a block now. It never ...
2
votes
1answer
32 views

Avoid using block.timestamp

I need to define a specific time phase. Therefore, I wanted to use opening timestamp and closing timestamp using block.timestamp. I get the following warning: Linter: security/no-block-members: Avoid ...
0
votes
1answer
49 views

If you are a miner can you accept your own transactions at no cost? [duplicate]

Let us say I am a miner. Can I accept my transactions into the blockchain at no fee to myself? And what do I lose? Let us assume someone is running a dapp. Can they mine transactions of that dapp to ...
0
votes
0answers
6 views

Can't manage to send transactions on following block

I have a web socket subscription to binance smart chain, which triggers an event every time a new block is issued. Once a new block number n is issued, I send a transaction and expect it to be mined ...
1
vote
2answers
117 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 ...
0
votes
0answers
38 views

Running --no-ancient-blocks on a synced node

I have an up to date OpenEthereum node that is taking a long time to sync it's ancient blocks, Which has left it syncing a batch of ancient blocks, while falling behind, then syncing up to date. Put ...
1
vote
0answers
24 views

Able to Produce Blocks but Still Balance is Zero

Kindly find the following results below from my Mac Terminal: miner.start(1) --> null miner.stop() --> null eth.getBalance(eth.accounts[0]) --> 350000000000000000000 eth.syncing --> ...
1
vote
1answer
41 views

How the maker ensured the transaction was placed at a certain point within the same block?

I was observing the MARSH allocation recently and found a bot behavior of extreme luck. One single transaction outperformed many others and the maker paid 101 ETH to the miner for a single transaction....
0
votes
1answer
34 views

What is the purpose of setting web3.eth.Contract.defaultBlock?

In web3 object, the default value of web3.eth.Contract.defaultBlock is always "latest". But what could be the case to modify defaultBlock value? Thanks
1
vote
0answers
15 views

Can block timestamp be smaller than the time a transaction has been sent?

I have seen cases where the time that I sent my transaction (logged on local PC) is actually 'later' (by 10s of seconds) than the block.timestamp of the block that my transaction entered. I checked if ...
1
vote
0answers
22 views

If a block header is 80bytes, then why does a full node need ~100GB of storage

So, I'm a little confused about how data is stored in a block. If You can get the state of all accounts from the State Root of a block header, then that means that you can get the state of every ...
0
votes
0answers
15 views

Geth/Parity node - When is a new block imported

Based on my observations and also on block-timestamps-vs-received-timestamp, I suppose that a block "n" is imported into geth or parity node, only after a block "n+1" is mined. Is ...
0
votes
0answers
27 views

From what source does etherscan.io aggregate and broadcast data that appears on the blockchain ledger?

as blocks are hashed together as transactions pile up and are broadcasted on the Ethereum blockchain, how exactly does the website etherscan.io in turn publish and broadcast all that information in ...
0
votes
0answers
15 views

Locating the block my miner found?

I am using PhoenixMiner on Nanopool. It notes in the past week (2/10-2/17) I had a maximum reported share of 209622.1TH. I assume this share produced a block provided the average difficulty this week ...
0
votes
1answer
99 views

Reduce gas costs with longer block confirmation times (like in Bitcoin)

In Bitcoin, fees tend to decrease as you target longer block confirmation times. For example, a standard transaction with 1 input and 2 outputs has a fee of approx. $3.06 for confirmation within 6 ...
0
votes
1answer
25 views

ROPSTEN: Duplicate Blocks adding transactions using Geth Real-Time Event API

I'm using the Geth Real-Time Event to get the new blocks via web-socket and there's a subscription called "newHeads" for that propose. The thing is sometimes the socket returns a duplicate ...
0
votes
1answer
26 views

How to handle forks, dropped/reverted blocks

I'm building an ethereum wallet, I've setup geth. I'm planning to subscribe to new transactions on geth websocket, I can't figure out how to deal with dropped blocks and hardfork. let's say a user ...
0
votes
0answers
51 views

Can a single transaction use up all the block gas limit?

The current Ethereum block gas limit is ~12M, I see 100+ transactions are added per block on average. My question is can a single transaction use up all the Block gas limit (~12M) or miners will ...
0
votes
1answer
21 views

How are difficulty of finding a proof of work dynamically regulated without a central body? [duplicate]

The probability of a miners to mine a block dynamically changes so that blocks are mined at regular intervals.How does block chains accomplish this without a central regulating body,
1
vote
1answer
294 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....
0
votes
0answers
87 views

is it possible to change block' gas limit?

I'm trying to execute some heavy transactions. Before execute it, Remix advises me about the gas limit: Ok, then I change my gas limit on Metamask to 9,000,000 (I'm on Ropsten network): And finally, ...
1
vote
1answer
29 views

Failed mined transactions

Is transaction "status" flagged inside the block when it's mined? Like if a transaction is mined but failed due to out of gas or not meeting contract conditions, is the transaction marked as ...
1
vote
1answer
666 views

Ropsten “exceeds block gas limit”

I am on GETH, 1.9.23 and I have had a smart contract running for more than 3 months now. Suddenly, all transaction failed with "exceeds block gas limit". I checked the Ropsten Testnet and ...
1
vote
1answer
46 views

where is receipt tree stored?

Simple question. I know that state trie is stored in each node's drive. but they are not stored on actual state. Question 1) What about receipt tree ? do they get stored separately too from the chain ...
0
votes
1answer
33 views

in which currency does state trie's balance is stored?

My question is very simple and I couldn't find the answer for it. There's a state trie in ethereum. Each state trie has address as key and value as an object which has balance as one of the keys. I am ...
0
votes
0answers
234 views

Truffle - multiple transactions per block

i try to simulate a large transaction load and therefore want to execute multiple transactions in a truffle test. I changed the block-time to five seconds and generate the transactions, but only one ...
0
votes
0answers
10 views

How to read the Ethereum Block header and check contract

I have downloaded some Ethereum block headers, such is one example (omitted some details for conciseness): {"difficulty": 7314508281338, "extraData": "...
0
votes
1answer
35 views

Is Ethereum blockchain really temper proof or immutable?

Suppose there is a user A which transfers some ethers to user B through a proper transaction. So is it possible to alter the transaction. Something like going back to the block which contains the ...
0
votes
1answer
15 views

Cost at block number

Is their any API available that gets me the price of Eth in USD for example at a particular blocknumber?
1
vote
1answer
89 views

A way to capture actual gas used per transaction

Two questions, related: Is the getGasUsed() on the TransactionReceipt truly the actual gas used, not the gasLimit or the gas estimate? Looks like it but... Is the actual gas used obtainable ("...
1
vote
0answers
25 views

Generating blocks without mining,

I have private test network, and I need to simulate forks. Is any possibility to immediately set number block fork-1 (in PoA or any other protocol) ? If yes, what is the easiest way to do it ??
1
vote
1answer
57 views

State Changes within a Block

I read somewhere that the 'state' is only updated at the end of each block. I've also read that each block contains a specific sequence of transactions, and thus implicitly 'updates' the state within ...
2
votes
1answer
343 views

When MetaMask removes the Cancel button for a transaction?

When I start a transaction, MetaMask shows it with Cancel button. When does this Cancel button disappear? Maybe after one confirmation? After N (what is N?) confirmations?
0
votes
1answer
23 views

Uniquely identifying and lexicographically sorting transactions

Is event.blockNumber + '-' + event.logIndex unique for an Ethereum transaction (that is no two different transactions having it the same)? If not, is event.blockNumber + '-' + event.logIndex + event....
0
votes
1answer
33 views

Solo block verification

If I have one block from bitcoin blockchain. I can check that block is valid without having the previous blocks. (solo block verification) Imagine I have one block from Ethereum blokchain. Can I check ...
2
votes
0answers
73 views

is “newBlockHeaders” in web3 emits a legit block?

I'm using web3.eth.subscribe('newBlockHeaders') to track transaction I sent to the blockchain. My question is that is the block emitted from "newBlockHeaders" legit or in other words, the block has ...
1
vote
0answers
17 views

Block number as part of header rationale

It seems to me that block number is something that can be derived correctly by a node locally (from the parent block relationship). What was the purpose of including it in block header -> making it a ...
0
votes
1answer
61 views

Blockhash Minus-256 Problem [duplicate]

What is meant by Blockhash Minus-256 Problem? I am reading an article at: Bad Randomness It talks about Blockhash Minus-256 problem but does not explain much about it. As a result I can’t ...
0
votes
1answer
154 views

Blockhash: Register the block number

I am reading the following article from a website: bad randomness In the context of Blockhash the author says: For instance, a good protocol (formulating a random trial as a “bet”) is the following: ...
2
votes
3answers
248 views

What is meant by on-chain randomness? What is the difference between on-chain and off-chain operations in the context of randomness?

I want to understand on-chain and off-chain operations in the context of randomness. Kindly provide me an example so that its clear to me. I got one post here: What are offchain and onchain ...
7
votes
1answer
1k views

How to retrieve ERC20 from a hacked address monitored by a bot?

Check it out: https://discordapp.com/channels/554623348622098432/633092550407749652/714325610050355260 The address that was hacked: https://etherscan.io/address/...

1
2 3 4 5 6