Comments (6)
Bitcoin JSON-RPC calls have no connection to consensus, and the JSON-RPC interface is only exposed locally - for a number of reasons pertaining to its insufficiency for use on the Internet. I believe they are handled in Core by exploiting the condition in BIP30 that allows a tx to exist with a duplicate hash only in the case where the preceding duplicate is fully-spent. In this case it can simply overwrite the preceding transaction. In this case the JSON-RPC interface would simply provide the latest instance. As for other services, who knows - I assume they will simply fail on the same basis.
However, same hash does not mean same tx (though this is the case of the 2 existing duplicates, masking the true nature of the problem). So in the case of a future duplication there are problems with this strategy. If there is a reorg back to a point prior to the replacement, the preceding tx has been lost and there will be problems. Also, once a replacement occurs there is no ability to recreate the preceding blocks with the replaced transactions.
The former problem can be mitigated by rebuilding the chain and attempting to avoid one of the forks. The latter problem does not impact validation, just the p2p network's ability to rebuild the chain. Ugly in either case, especially since the latter adversely impacts the former. I'm not certain about their implementation, but I'd speculate that once this happens there will be repercussions.
from insight-api.
https://github.com/bitcoin/bips/blob/master/bip-0030.mediawiki
the TX you mentioned; https://blockchain.info/tx/e3bf3d07d4b0375638d5f1db5255fe07ba2c4cb067cd81b84ee974b6585fb468
there's another; https://blockchain.info/tx/d5d27987d2a3dfc724e359870c6644b40e497bdc0589a033220fe15429d88599
from insight-api.
I've noticed this as well. Uniqueness has been enforced with https://github.com/bitcoin/bips/blob/master/bip-0034.mediawiki so it should not be an issue moving forward, and likely not worth handling as a special case. Current behavior is that e3bf3d07d4b0375638d5f1db5255fe07ba2c4cb067cd81b84ee974b6585fb468 is included in block #91880 as per bitcoind indexes.
from insight-api.
This is an incorrect interpretation of BIP34 (see BIP30). Duplicate transaction hashes are perfectly valid in Bitcoin. BIP34 simply makes it less likely and very hard to produce a duplicate intentionally.
from insight-api.
how are duplicate txids handled in bitcoin core?
Many RPC calls rely on txids as the args... could someone try calling something using a duplicate txid?
from insight-api.
Is this problem solved now?
from insight-api.
Related Issues (20)
- Request multiple transactions by list of txid
- Documentation for /api/utils/estimatefee HOT 1
- Setting up with an existing bitcoin full-node
- UTXO returns spent outputs
- Cannot broadcast transaction with huge amounts of inputs HOT 1
- Confirmation number for sent BCH transaction does not increase HOT 2
- Help. Blocks.js : 400 Bad Request Altcoin HOT 6
- "Invalid argument" instead of "invalid checksum" HOT 1
- Method not found. Code:-32601 HOT 7
- why sync not continue after 81% (446128 blocks height)
- How can I distinguish testnet and mainnet?
- what is p2p transform port?
- what is p2p transform port?
- Large block of the Bitcoin Cash
- Block Height Differences in insight
- Wrong estimate fee HOT 4
- Endpoint to get mempool txs HOT 1
- DdzFFzCqrht18zRUyie7z3PtuD3DzYs4f2fpGyme6ybojcqyovvhPsaDuSjhwmPYitRsenEcVAw6jh9XNxA2WP6Mvh22ZX9qNP5HQ5ix
- How to setup insight-api with bitcoin sv. Any kind of help is highly appreciated. HOT 1
- which repo to use? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from insight-api.