Questions tagged [forks]

forks are events where the blockchain consensus is not guaranteed and clients may have different states

Filter by
Sorted by
Tagged with
1
vote
0answers
26 views

Listen for Reorganized Blocks using Web3js

Assuming there is a reorganization at block height N, the block with hash H being the forked block and H' the block that is the 'actual' one. 1. Will web3.eth.subscribe('newBlockHeaders' \[, callback\]...
1
vote
0answers
11 views

How common are orphaned blocks on Ethereum?

How often do orphaned blocks happen on Ethereum? I have read about the 3000 orphaned chain of block on Ethereum Classic, what has been the longest orphaned chain on Ethereum?
0
votes
0answers
82 views

hardhat mainnet forking and impersonating an account isnt working, help!

So Im trying to fork the mainnet using hardhat, impersonate a Dai whale, and transfer its Dai to a hardhat wallet for testing a smart contract, but im running into problems. my code looks like this: ...
1
vote
0answers
54 views

Uniswap Fork: Able to add liquidity, but not able to swap

I am forking uniswap and deploying it on Rinkbey TestNet. I have successfully deployed factory, router, weth contracts. I have replaced the respective addresses in the uniswap interface code. I ...
0
votes
1answer
105 views

How to fork the mainnet

I'm pretty new to Ethereum. I'm trying to write a simple dapp, which can deposit and withdrawal from aave. In order to communicate create the contract first I need to fork the mainnet. I'm not exactly ...
4
votes
1answer
400 views

How many blocks were reversed with the DAO hard fork?

There are some facts regarding the DAO hack and the subsequent hard fork that can be found everywhere, e.g., that the hard fork happened at block height 1,920,000, that it was undertaken in an effort ...
0
votes
1answer
95 views

How do uncle blocks remain valid?

Even though Ethereum does not directly use GHOST, stale blocks can be included as uncles for a reward. How can uncle blocks remain valid, as I suppose state transitions must be non-conflicting? The ...
0
votes
0answers
16 views

Could we fork Ethereum and make Ether ERC-20 compliant?

Is it possible for some future fork to make Ethereum ERC-20 compliant? Since ERC-20 didn't exist at the beginning of Ethereum, I'm curious if it would be beneficial for Ether to interact more directly ...
0
votes
0answers
42 views

How to make a deployer in truffle tests?

For some reason, our app will only work with a forked instance of the mainnet. And hence, we want to run our test on the forked ganache. We are using truffle, so we have written all of our tests in ...
3
votes
2answers
415 views

Uniswap Router deployment error: "UniswapV2Router02" -- Cannot create instance of UniswapV2Router02; no code at address 0xxxxxxxxx

I am trying to fork Uniswap and deploy on Ropsten testnet for educational and testing purposes. From what I gathered, it seems that we need to first deploy the UniswapV2Factory contract, followed by ...
0
votes
0answers
30 views

I want to fork Ethereum with my own implementation. Like changing name or block size or something like this [duplicate]

I'm such a noob or may be this is a noob type question i just want to fork Ethereum in go(maybe in another language) with my own implementation. Anyone can guide me about that?? Is there any relevant ...
0
votes
0answers
203 views

Trying to interact with ganache-cli fork through script

const {ChainId, Fetcher, WETH, Route, Trade, TokenAmount, TradeType, Percent} = require ('@uniswap/sdk'); const ethers = require('ethers'); const chainId = ChainId.MAINNET; how would I specify it to ...
0
votes
0answers
318 views

When forking MainNet with ganache-cli and trying to interact with contract -> error thrown

Forked MainNet with Ganache-ClI wrote script to interact with on-chain DAI contract to send some Dai to account Unlocked the DAI contract const Web3 = require('web3'); const daiAbi = require('/Users/...
2
votes
1answer
63 views

Which fork implemented EIP-141? (invalid opcode)

EIP-141 https://eips.ethereum.org/EIPS/eip-141 was introduced in 2017, but I cannot find it in any of the meta lists for forks https://eips.ethereum.org/meta. Is there a fork under which it was ...
1
vote
1answer
36 views

How would a 50/50 netsplit play out on Ethereum 2 (beaconchain)?

I'd like to know what would happen in terms of penalization of staked validators if there was some sort of major global netsplit that -- for the sake of this question -- resulted in exactly 50% of all ...
2
votes
1answer
1k views

HardHat deploy script works on testnet but not on forked hardhat network

The error that I am getting when running this is: Error: Invalid RpcBlockWithTransactions or null I have a contract called PriceConsumerV3 and it makes a view function call on a contract. I am ...
2
votes
1answer
117 views

Fork in Proof-of-Stake?

Regarding the fact that in Proof-of-Stake, a stakeholder will be elected randomly as the next author of the next block in each epoch (or each round or slot), logically, in each round (or slot) there ...
1
vote
1answer
35 views

What is the criteria to resync chain using proof of stake?

In PoW, nodes always resync their own chain to the longest chain in the network in order to respect the work the miners have done. In PoS, as I understand in its simplest form, the miner with the ...
3
votes
0answers
79 views

When running a geth node, how can I know when reorg occur?

I want to add a script to notify the dev team if re-org bigger than 200 blocks took place. How can I achieve it?
0
votes
1answer
30 views

How can i create more that one node for test purposes?

I really need to have more than one node to test my smart contract. I'm using remix and i also installed ganache, however, ganache doesn't allow me to have more than one node as I hoped for... I have ...
1
vote
0answers
19 views

Cost of forking Augur

Augur Version 2 is scheduled for launch on July 28th 2020. How can the cost of forking Augur version 2 (by disputing a market resolution) be calculated in REP? How dies this cost compare to the cost ...
0
votes
0answers
172 views

gas estimation about tests on Ganache forked mainnet

I come up with this solution with gas estimation. Could someone help check whether it is feasible? If we want to send a transaction, first, we just fork the newest mainnet blockchain using ganache-...
2
votes
1answer
244 views

Fork Choice Rule in Ethereum 2.0?

According to the "Fork choice rule" in Ethereum 2.0 (sharding), how to choose a branch in a fork? (A) or (B) ? (A) branch, which has the most blocks in it. (similar to "longest chain" rule in PoW)...
0
votes
2answers
79 views

Could smart contract use a fork block?

If generated two forked block A and B. Can the smart contract in block A access to transaction in block B? I know that PoS is consensus algorithm working by check all stake in block. The verifier ...
2
votes
1answer
88 views

What is the Muir Glacier hardfork?

What is the Muir Glacier hardfork on the Ethereum mainnet?
2
votes
1answer
676 views

How to fork current eth mainnet chain in new private blockchain from block #####

I want to run my own eth fork from mainnet (keeping history of transactions, balances & etc). How can I start my new geth instance that will start working after ###### block of mainnet chain? I ...
0
votes
0answers
35 views

PIVX fork CryptoDezire Coin SendRawTransaction not working

A CDZC coin basically fork of PIVX . I am trying to send coin via rpc calls. Successfuly created RawTxn, SignRawTxn but unable to SendRawTxn. `await rpc.listunspent().then(async r => { ...
0
votes
0answers
96 views

Does uncle blocks in poa forks contains transactions?

Since that forks can happen in poa networks (I asked how to prevent forks here); What does means ? is uncle blocks contains transactions or they are just empty blocks ?
1
vote
1answer
100 views

How to prevent fork in poa network?

I discover that forks in poa network can happen! I have 4 nodes (trusted nodes) I want to create a poa network with no forks, is it possible ?
1
vote
1answer
48 views

"Fork choice rule" : A general term? or a specific algorithm?

Is "Fork choice rule" a general term including all the algorithms used for choosing a branch among other branches in a fork (including longest chain rule etc) ? Or is it a specific algorithm designed ...
0
votes
0answers
47 views

What way there is to implement a new signing scheme in Ethereum?

I want to deploy a new signing scheme for the Ethereum transactions as an alternative to the currently implemented ECDSA. This will be for future research purposes on post-quantum signing schemes. The ...
2
votes
0answers
87 views

How can I extract sidechains (transient forks) from a geth node before they get discarded?

According to my understanding, transient forks (also known as sidechains in geth's source code) are discarded or overwritten when a reorganization happens. But before that, when the node detects a ...
2
votes
2answers
68 views

Does the ETH blockchain have fundamentally more branching than BTC?

Intuitively speaking, ETH seemed to have simply increased the average block generation rate from one every 10 min in BTC to 1 every 15 seconds. There doesn't seem to be any other protection against ...
0
votes
0answers
102 views

Why does my private network transaction use a different amount of gas than my mainnet transaction performed immediately after?

I am forking the mainnet from my own geth node with ganache-cli --fork option. Immediately after the fork, I simulate a transaction to a contract on the forked, private network. I then immediately ...
1
vote
1answer
94 views

Possible replay attack when paying to smart contract

I am afraid of a possible replay attack when paying to a smart contract. Given these 3 assumptions An action gas cost may change according to the state of the blockchain (even if its the same action)....
0
votes
1answer
50 views

Constantinople gas change, reentrancy possibilities

With the new reduced fee for using SSTORE for 'dirty' storage slots, is it possible to re-enter a function from a send() or transfer() and have the contract call send() or transfer() again? Or is it ...
2
votes
0answers
48 views

Ropsten issues - two forks happening, transactions showing in both places

There seems to be a few issues going on with ropsten right now: https://twitter.com/sbetamc/status/1092167042709573633 https://twitter.com/stevenleeg/status/1092546643604459521 At the same time, a ...
1
vote
0answers
321 views

Why is my geth node stuck on block 7130891?

My geth mainnet node (version 1.8.21) has stopped on block 7130891. Interestingly, eth.syncing returns false and eth.blockNumber constantly returns 7130891. It was working up until ~24 hours ago. ...
0
votes
1answer
26 views

Will there be an Ethereum Constantinople Fork coin and which exchanges would be supporting it?

There are reports of nodes that still haven't upgraded their Ethereum nodes and they are on the Ethereum Constantinople fork. Would a new coin exist and which exchanges have shown support for ...
2
votes
1answer
31 views

Which semantics are used for old contracts executed now?

Suppose an old contract is called now that contains an opcode that was invalid then but has some meaning now. What happens when this opcode is executed during a recent transaction: Will execution fail ...
2
votes
0answers
49 views

Geth Clique: can change config params in genesis and still retain the existing blocks?

I have altered my custom Geth private chain Clique PoA, but it seems after I do that I encounter: BAD BLOCK Error: invalid receipt root hash Is it possible to: change the Geth code add a new hard ...
1
vote
1answer
169 views

What happens with transaction after the block fork?

Do I need to generate transaction again after fork? How many confirmations are minimal to be sure of the transaction?
1
vote
1answer
164 views

Fork mainnet into PoA/clique network

How to to fork Ethereum main net (from latest block) into a non-official chain that can only be mined by PoA/clique using geth? Preference for keeping geth code untouched if possible. As expected, ...
1
vote
3answers
191 views

How is the state "undone/reverted" after a longer chain is determined?

So say there is block_a, and block_b, both at height 1677. And a node accepts block_a, but then recieves block_b + block_c (which is mined on top of block_b), how exactly are the state changes made in ...
5
votes
4answers
744 views

Maximum known Ethereum fork length

What is the maximum known Ethereum fork length? What is the maximum Ethereum fork length in theory? Edit: please read fork length as maximum number of uncle blocks.
1
vote
1answer
1k views

Whats the cheapest way to fork an ERC20 token when you have all addresses and values?

If you have a copy of the mapping of the owners/allowance of the tokens you'd like to fork. I couldn't find any contracts that seemed to be able to this.
1
vote
2answers
76 views

Will my transaction get lost if it's in a block which was forked due to double-spending?

I have a contract which I need to update occasionally. This update has nothing to do with "real money transfer". It deals only with the value of a state (global) variable in my contract. Also, I am ...
0
votes
1answer
53 views

Is the result of getBlockByNumber final?

Will the result of getBlockByNumber change due to the longest chain issue? Say, I called getBlockByNumber(100000) now and got block A. 10 mins later, it turns out block A is not in the longest chain. ...
1
vote
1answer
124 views

Spoon vs fork vs airdrop

Can someone explain the exact differences between the three? I'm most familiar with the fork, where the rules of generating blocks change creating a fork where miners can choose to follow the old ...
1
vote
0answers
46 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 ...