Lorem ipsum dolor sit amet, consectetur adipiscing elit lobortis arcu enim urna adipiscing praesent velit viverra sit semper lorem eu cursus vel hendrerit elementum morbi curabitur etiam nibh justo, lorem aliquet donec sed sit mi dignissim at ante massa mattis.
Vitae congue eu consequat ac felis placerat vestibulum lectus mauris ultrices cursus sit amet dictum sit amet justo donec enim diam porttitor lacus luctus accumsan tortor posuere praesent tristique magna sit amet purus gravida quis blandit turpis.
At risus viverra adipiscing at in tellus integer feugiat nisl pretium fusce id velit ut tortor sagittis orci a scelerisque purus semper eget at lectus urna duis convallis. porta nibh venenatis cras sed felis eget neque laoreet suspendisse interdum consectetur libero id faucibus nisl donec pretium vulputate sapien nec sagittis aliquam nunc lobortis mattis aliquam faucibus purus in.
“Nisi quis eleifend quam adipiscing vitae aliquet bibendum enim facilisis gravida neque velit euismod in pellentesque massa placerat”
Eget lorem dolor sed viverra ipsum nunc aliquet bibendum felis donec et odio pellentesque diam volutpat commodo sed egestas aliquam sem fringilla ut morbi tincidunt augue interdum velit euismod eu tincidunt tortor aliquam nulla facilisi aenean sed adipiscing diam donec adipiscing ut lectus arcu bibendum at varius vel pharetra nibh venenatis cras sed felis eget.
A blockchain “re-org”, short for "blockchain reorganization," is an event that can occur in a blockchain network when two or more miners find and broadcast valid blocks at roughly the same time. Since there is no definitive "first" block, some nodes in the network might initially see one block as the most recent while other nodes see another.
When this happens, there can be a temporary fork in the blockchain, where different nodes see different versions of the blockchain. This can cause confusion as nodes may not be in agreement about the correct state of the network.
To resolve this situation, the network must agree on which version of the blockchain to keep as the true version. This agreement is typically achieved through a consensus mechanism such as proof of work, or proof of stake, where the network collectively decides which blocks to keep based on which chain is the longest or has the most work done on it, or some other mechanism.
If a re-org results in a significant change to the blockchain, such as a rollback of previously confirmed transactions, it can have significant implications for the network's security and can be exploited by bad actors. Therefore, it is essential to handle re-orgs properly and quickly to maintain the integrity and security of the blockchain network.
For NFT data, re-orgs are problematic as they may result in conflicting information on who holds a particular token, or where / how it was transferred, causing problems for end user applications.
SimpleHash gracefully handles chain re-orgs across the networks we support, meaning that developers don’t need to worry about handling these situations in their apps.
As new blocks are ingested by the SimpleHash indexer, it constantly checks if each block has a parent block that has not yet been seen within the system. If the indexer identifies such a parent block, it indicates a re-org event. In response, the indexer re-indexes the relevant blocks, by deleting the blocks determined not to be part of the chain, and inserting the ones that are deemed to be correct according to the chain consensus mechanism.
For the REST API, the changes to the provenance data, which refers to who holds which tokens, are reflected in near-real-time once the re-indexing process is completed, usually taking less than a few seconds. This means that REST API users will see the updated transaction data shortly after the re-org event has occurred.
For developers who are subscribed to transfer events for a specific chain, wallet, NFT or collection, webhooks are fired to indicate any changes to transactions after the re-org event. This ensures that developers receive real-time updates on the updated transactions, allowing them to keep their systems up-to-date with the most current blockchain state.
Using SimpleHash, developers can have confidence that chain re-orgs will be reflected quickly and reliably, allowing them to focus on their end-user applications, not the intricacies of different blockchain finality mechanisms.
About SimpleHash
SimpleHash is the world’s leading provider of NFT data, and a leader in implementation of new NFT standards. Developers using the API can get instant access to metadata, media, transaction history, sales, floor prices, listings, rarity scores and collection info across 20 chains. To get started, read through our API docs, or reach out at hello@simplehash.com
Be first to hear as we launch new features.