-
Notifications
You must be signed in to change notification settings - Fork 289
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
blockchain: Add UtxoBackend interface. #2652
Commits on May 22, 2021
-
blockchain: Remove UtxoCacher DB Tx dependency.
This removes the dependency that the UtxoCacher interface and UtxoCache implementation currently have on the database.Tx interface. This is necessary since the UtxoCache will move away from the current database interface in favor of an interface that is better suited for the UTXO database in a subsequent commit.
Configuration menu - View commit details
-
Copy full SHA for 6713b50 - Browse repository at this point
Copy the full SHA 6713b50View commit details -
blockchain: Add UtxoBackend interface.
This adds a UtxoBackend interface and LevelDbUtxoBackend type, which implements that interface. This UtxoBackend interface will allow different backend implementations to be used by the UtxoCache rather than interacting directly with the database layer as it does currently. In subsequent commits, interface methods and the corresponding implementation will be added to UtxoBackend one at a time in order to ease the review process as things move around.
Configuration menu - View commit details
-
Copy full SHA for 08f00c6 - Browse repository at this point
Copy the full SHA 08f00c6View commit details -
blockchain: Export UtxoSetState.
This exports the UtxoSetState type since it will be used in the UtxoBackend interface in a subsequent commit.
Configuration menu - View commit details
-
Copy full SHA for 38245b4 - Browse repository at this point
Copy the full SHA 38245b4View commit details
Commits on May 25, 2021
-
blockchain: Add FetchEntry to UtxoBackend.
This adds the FetchEntry method to the UtxoBackend interface and LevelDbUtxoBackend implementation. A summary of the changes is as follows: - Add FetchEntry method to UtxoBackend interface - Add FetchEntry method to LevelDbUtxoBackend - Move dbFetchUtxoEntry to LevelDbUtxoBackend - Add backend tests for FetchEntry - Update UtxoCache to fetch entries from the backend rather than from the database directly
Configuration menu - View commit details
-
Copy full SHA for 12b1413 - Browse repository at this point
Copy the full SHA 12b1413View commit details -
blockchain: Add PutUtxos to UtxoBackend.
This adds the PutUtxos method to the UtxoBackend interface and LevelDbUtxoBackend implementation. A summary of the changes is as follows: - Add PutUtxos method to UtxoBackend interface, which atomically updates the UTXO set and state - Add PutUtxos method to LevelDbUtxoBackend - Move dbPutUtxoEntry to LevelDbUtxoBackend - Add backend tests for PutUtxos - Update UtxoCache to use PutUtxos rather than updating the database directly
Configuration menu - View commit details
-
Copy full SHA for fdeccb7 - Browse repository at this point
Copy the full SHA fdeccb7View commit details -
blockchain: Add FetchState to UtxoBackend.
This adds the FetchState method to the UtxoBackend interface and LevelDbUtxoBackend implementation. A summary of the changes is as follows: - Add FetchState method to UtxoBackend interface - Add FetchState method to LevelDbUtxoBackend - Add backend tests for FetchState - Update UtxoCache to use FetchState rather than querying the database directly - Remove dbPutUtxoSetState and dbFetchUtxoSetState since they are no longer used - Add FetchBackendState to the UtxoCache so that the state can be fetched through the cache
Configuration menu - View commit details
-
Copy full SHA for 2ca281c - Browse repository at this point
Copy the full SHA 2ca281cView commit details -
blockchain: Add FetchStats to UtxoBackend.
This adds the FetchStats method to the UtxoBackend interface and LevelDbUtxoBackend implementation. A summary of the changes is as follows: - Add FetchStats method to UtxoBackend interface - Add FetchStats method to LevelDbUtxoBackend - Move dbFetchUtxoStats to LevelDbUtxoBackend - Add FetchStats to the UtxoCache so that the stats can be fetched through the cache
Configuration menu - View commit details
-
Copy full SHA for 736431e - Browse repository at this point
Copy the full SHA 736431eView commit details -
blockchain: Add FetchInfo to UtxoBackend.
This adds the FetchInfo, InitInfo, and PutInfo methods to the UtxoBackend interface and LevelDbUtxoBackend implementation. A summary of the changes is as follows: - Add FetchInfo, InitInfo, and PutInfo methods to UtxoBackend interface - Add FetchInfo, InitInfo, and PutInfo methods to LevelDbUtxoBackend - Move dbPutUtxoDatabaseInfo, dbFetchUtxoDatabaseInfo, and associated variables to LevelDbUtxoBackend - Move initUtxoDbInfo, createUtxoDbInfo, and associated variables to LevelDbUtxoBackend - Rename and export utxoDatabaseInfo to UtxoBackendInfo - Add backend tests for putting and fetching the UTXO backend info - Add utxoBackend to BlockChain Config since BlockChain handles initializing the UTXO backend - Remove utxoDbInfo from BlockChain and instead access the UTXO backend info through the UTXO backend
Configuration menu - View commit details
-
Copy full SHA for fc5b682 - Browse repository at this point
Copy the full SHA fc5b682View commit details -
blockchain: Move LoadUtxoDB to UtxoBackend.
This moves LoadUtxoDB and the associated helper functions and variables from utxodb.go to utxobackend.go since LoadUtxoDB is specific to the LevelDbUtxoBackend implementation of the UtxoBackend interface.
Configuration menu - View commit details
-
Copy full SHA for 995ad0d - Browse repository at this point
Copy the full SHA 995ad0dView commit details -
blockchain: Add Upgrade to UtxoBackend.
This adds the Upgrade method to the UtxoBackend interface and LevelDbUtxoBackend implementation. A summary of the changes is as follows: - Add Upgrade method to UtxoBackend interface - Add Upgrade method to LevelDbUtxoBackend - Remove initUtxoState and instead handle upgrading through the UtxoCache Initialize method - Pass the UTXO backend into upgradeUtxoDb rather than the entire BlockChain instance
Configuration menu - View commit details
-
Copy full SHA for bde64ff - Browse repository at this point
Copy the full SHA bde64ffView commit details -
multi: Remove UTXO db in BlockChain and UtxoCache.
This removes the UTXO db from the BlockChain and UtxoCache types. BlockChain now only accesses the UTXO db through the UtxoCache and the UtxoCache now only accesses the UTXO db through the UtxoBackend.
Configuration menu - View commit details
-
Copy full SHA for ce56291 - Browse repository at this point
Copy the full SHA ce56291View commit details -
blockchain: Export ViewFilteredSet.
This exports the ViewFilteredSet type since it is used in the UtxoCacher interface.
Configuration menu - View commit details
-
Copy full SHA for b5f4d54 - Browse repository at this point
Copy the full SHA b5f4d54View commit details