-
Notifications
You must be signed in to change notification settings - Fork 2
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
Utxocache #1
Draft
Ultra-Code
wants to merge
24
commits into
master
Choose a base branch
from
utxocache
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Utxocache #1
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
since big-endian is currently not supported. Set a stack size of 64MB upfront Misc improvements
move constants from utils module to Blockchain change newChain signature, remove wallet path parameter change mineBlock signature, return the mined block for caching skip signing/verifing coinbase transactions since it doesn't contain real inputs Move Block iteration into BlockIterator struct in Iterator module Change signature of getRawBytes to alway get bytes starting from 0
Use official s2s instead of my clone This is because after the changes to packed struct in the latest version of zig my changes aren't relevant anymore update lmdb with fix for committing flag changes when using named dbs
Add the required build.zig.zon file Update build.zig to use the new install and run artifact api
Initial implementation of UTXOcache and it integration with Blockchain Overhaul of mdb_put related operations Separate start transaction and openDb actions Improve API of startTxn and openDb with insight from lmdb bug report Refactor and make put, update, remove and del operations consistent with the help of options and DRY principles Add logic for specifying the appropriate insert flags add DbFlags struct to simplify dbflags related operations Make some declaration public so the can be used in other modules Improve ensureValidState assertions Rename some utility functions dbKey and dbValue Improve TxnType Add personal crafted test from my local copy of s2s Set main fba buffer size to 7MiB Add some todos Use new @memcpy builtin syntax
Since @hyc guided me on how to use lmdb dbflags
Add some crypto types make them easy to use
Add panic for dupsort when it hits Lmdb keys/dup data limit
Would build on these later to add compression option to lmdb
Improve Lmdb's interface better name evn flags as EnvFlags rename DbTxnOption to DbOption and use discriptive names for the Db options add TxnType to represent database transaction types make open*Db fns consistent DbFlags.flags should not return an error change signature of startTxn improve logic for setting txn_flags replace env transaction flag field with db transaction flag which lmdb doesn't provide us a way to query rename Lmdb fields for consistency add getEnvFlags to get flags set at environment creation
use gpa for testing and to help find bug
This was caused by the tuple type not being coerced to the appropriate type before been passed to the anytype parameter This lead to the anytype inferring it as the tuple type instead of my intented type
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implement unspent transaction output cache to improve the efficiency of operations that require only iterating unspent transactions