forked from jl777/SuperNET
-
Notifications
You must be signed in to change notification settings - Fork 94
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
feat(core): multi-pubkey DB support #2093
Open
onur-ozkan
wants to merge
207
commits into
dev
Choose a base branch
from
multi-pubkey-dbs
base: dev
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.
Open
Changes from all commits
Commits
Show all changes
207 commits
Select commit
Hold shift + click to select a range
aa0909f
WIP: resolve db paths by account keys
onur-ozkan f051600
WIP: handle db ids optionally
onur-ozkan c8a434e
use dummy values to fix build errors for development
onur-ozkan 3e0061f
fix conflicts after merge
borngraced c6146d0
more wip changes and start coin pubkey for indexeddb storage
borngraced eff374c
Z coin or default pubkey for initializing blocksdb
borngraced fef8a4e
zcoin - allow db_id for walletdb
borngraced 6247766
wip — SwapsContext
borngraced fa0f5ab
changes to maker and taker swap db_id
borngraced 947ab8d
complete zcoin dbs multi pubkey support for WASM target
borngraced ae95d4e
fix clippy/fmt
borngraced c0d13e7
impl account_db_id for wasm target
borngraced 71c4e9c
complete some todos in swap mod
borngraced be3dc81
minor changes to DbIdentifier constructor(new)
borngraced ffbc262
changes to swaps db
borngraced 07c1168
handle recv_swap_msg with db_id
borngraced 1ec96bc
add todos for StateMachineStorage for TakerSwapStorage
borngraced 3ccfa00
add todos for StateMachineStorage for TakerSwapStorage
borngraced 29763e2
get_swap_repr
borngraced cf749eb
mark account_db_id as todo for native target
borngraced 368441c
impl find_unique_active_account_ids and use for swap_kick_starts
borngraced 7095605
make swap_v2 multi_key
borngraced 8823be2
WIP - start nft multi key support
borngraced 42a22b1
WIP - my_swaps_storage
borngraced 23f0566
fix field assignment outside of initializer
borngraced 65a07d2
WIP - uxto_block_header_storage
borngraced 71ae0b1
wip sqlite
borngraced 61c49bb
merge find_unique_account_ids and find_unique_active_account_ids
borngraced d184c1e
Merge branch 'dev' into multi-pubkey-dbs
borngraced bd114fc
refactor find_unique_account_ids
borngraced f58c80a
debug with logger
borngraced a99c8a6
wasm clipy
borngraced 5298f2b
WIP nft
borngraced d9d8e53
use a single find_unique_nft_account_ids for all targets
borngraced 1538f81
make account_db_id return None by default
borngraced c0355fa
WIP shared, async, sqlite connection manager impl
borngraced a27ec3e
WIP sql_ctx
borngraced 3407835
WIP sqlite connection manager
borngraced c27206c
make account_id optional and return None by default
borngraced ca13b41
WIP rollback sql_ctx
borngraced 3f053bd
WIP rollback sql_ctx
borngraced f0e8016
rollback sql_ctx
borngraced f5e5245
Merge remote-tracking branch 'origin/dev' into multi-pubkey-dbs
borngraced f8d08cf
fix lint
borngraced 2d96232
find_unique_nft_account_ids
borngraced d2152f8
improve find_unique_nft_account_ids_active and update get_nft_list to…
borngraced 04d2896
update get_nft_transfers to fetch transfers concurrently for multi db_id
borngraced 879438b
use try_join_all for efficiency
borngraced 234a2aa
finish implement async_sqlite_storage_vw for multi key support
borngraced e2dacfc
finish refactoring nft ctx for multi key support db
borngraced a00c2c7
replace async_sqlite_connection with v2
borngraced 04e1d97
rename AsyncConnectionArc to AsyncSqliteConnectionArc
borngraced f904927
WIP sync_sqlite_connection_v2
borngraced ea778d2
WIP utxo_block_header storage refacting
borngraced 8fa9cec
WIP utxo_block_header storage refacting test fn
borngraced 86649f5
WIP simplify new_from_ctx test fn
borngraced 0699843
WIP sqlite_connection_v2
borngraced 3480e26
fmt
borngraced b9375e0
finish sqlite refactoring and rename sqlite_connection_v2 to sql_conn…
borngraced 4c3a61c
cargo fmt
borngraced 12537c0
initialize only default pubkey in lp_init
borngraced 77b43f5
cargo clippy
borngraced fbe1fe2
stats_nodes multi key db
borngraced 795f718
fix find_unique_account_ids todos
borngraced 42f5db0
fix merge conflicts
borngraced 88754f7
minor changes
borngraced cc3a02f
cargo fmt
borngraced ee8d9d0
wip changes
borngraced acd6383
wip changes db_id
borngraced 4d04128
organize lp_coin mods/imports
borngraced e508b59
wip lp_ordermatch db update
borngraced d7c4a83
orders_kick_start
borngraced 3a7fa66
wasm shareddb storage
borngraced 4e7ae81
clippy & fmt
borngraced 69d9886
wip lp_ordermatch
borngraced 8796922
Merge remote-tracking branch 'origin/dev' into multi-pubkey-dbs
borngraced 875c9df
cleanup lp_ordermatch.rs
borngraced 4f7824d
merge dev branch and fix conflicts
borngraced 4bba3fb
new sql initialization TODOs
borngraced 637286d
todo for db_id in orders_kick_start
borngraced 7cd60f8
minor changes/improvements
borngraced b03a0aa
improve and refactor async ocnnection management logic
borngraced 98cb993
wip AccountContext
borngraced 061d1ff
minor changes
borngraced 398b93b
sae dev state
borngraced e2877a8
save dev state
borngraced 577e18b
remove SwapsContext db_id param
borngraced 9eaeb2e
fix tests
borngraced 9882ccc
update ordermatch
borngraced 8a2f4a7
debug db_id f or TakerOrder
borngraced 4594ff6
fix ordermatch test bug and improve db_id getter
borngraced 9ff52de
fix wasm test
borngraced 49b9260
check recent swaps test
borngraced 6db0236
debug check_my_reecent_swaps rpc
borngraced f970a12
remove debug line
borngraced 094a659
update swaplock with db_id
borngraced 92b94ac
cargo fmt
borngraced 6d51390
sql_connection_pool
borngraced a4c27b9
fix wasm clippy and add doc comments
borngraced 1c08ef5
more doc comments
borngraced a6d0b51
add hd wallet todos
borngraced 35b102a
add todos for AccountContext
borngraced 474d641
impl AsyncSqliteConnPool
borngraced 0686d0e
code organization and improvements
borngraced ca440df
merge dev and fix conflicts
borngraced 719862b
minor changes
borngraced 8921e4a
merge dev and fix conflicts
borngraced 6d6169f
fix hd_wallet todos
borngraced 6954d62
add more todos
borngraced 79e7c89
add nft unit test for multikeydb
borngraced 20a4486
make mm_ctx_with_custom_async_db non wasm32 target
borngraced 7a2ebaf
refactor db_lock and use tokio sync for handling lock
borngraced fdb4f55
fix hd_wallet
borngraced 6c93752
fix wasm clippy 0
borngraced db397e5
fix wasm clippy
borngraced 393e825
cargo fmt
borngraced 6e515ae
cargo fmt
borngraced 22319bc
Merge remote-tracking branch 'origin/dev' into multi-pubkey-dbs
borngraced b036c62
implement account db_id for tendermint coin
borngraced 9dcb662
implement account db_id for tendermint coin
borngraced 0ac682d
use coin db_id in init_db and a minor change to account_db_ids loop
borngraced c409ecc
cleanup test mod in hd_wallet/storage/mod
borngraced 23bb803
drop connections as early as possible
borngraced 8281609
refactor db_lock and substitute Mutex for RwLock
borngraced 115a873
revert db_lock connection list lock handling to mutex
borngraced 9062bee
improve my_orders_storage
borngraced b370bec
implement DbMigrationWatcher
borngraced 46f8712
handle shared_db_id and minor fixes
borngraced 5bde012
polish sql_connection_pool and fix review notes
borngraced e036383
cargo fmt
borngraced fab32e2
abstract db migration from tendermint activation fn and fix other rev…
borngraced 789ce8d
minor changes to DbMigrationWatcher
borngraced ac5cc96
update coins_needed_for_kick_start for new db activation
borngraced d8caebd
minor fix
borngraced 76efdf3
comment out gui_storage_dispatcher and related
borngraced 24774a4
merge with dev and fix conflicts
borngraced 6a0d0b6
comment out gui_storage_accounts_functionality unit tests
borngraced fbfe747
fix review notes
borngraced 097a63e
merge with dev and fix conflicts
borngraced 8a6d0cd
fix error handling
borngraced f685f72
fix hd_wallet todos
borngraced df3cf1e
remove unneeded comments
borngraced c028061
mark use_wacher as true
borngraced 309a5ac
fix sqlite deadlock and improve api design
borngraced 3cfd616
cargo clippy
borngraced 0b5275c
remove todos after review
borngraced a53bd38
fix build error
borngraced ff42791
revert hd_wallet storage changes
borngraced 4b99dba
impl account_db_id for eth and make account_db_id async
borngraced 2d427d9
impl account_db_id for utxo coins
borngraced b516435
impl account_db_id for utxo and eth
borngraced 497a006
fix clippy
borngraced df10264
fix native unit tests and other fixes
borngraced d32f8f6
fix clippy
borngraced 966607d
fix bugs and improve code
borngraced 19930d3
rename account_shared_db_id to shared_db_id
borngraced 527efbc
use HDACcount shared_db_id for tx_history
borngraced bb41f41
cleanups and improve eth impl
borngraced 916ce6a
fix clear nft todo
borngraced 0f7c075
add docs and very minor improvs
borngraced bf12b01
minor changes
borngraced 41b61c1
Merge remote-tracking branch 'origin/dev' into multi-pubkey-dbs
borngraced 54714eb
use device rmd160 for hd_wallet storage
borngraced 7699f55
implement account_db_id for pirate and fix othe review notes
borngraced e9ef701
use appropriate pubkey in UtxoCoinBuilder::build
borngraced 1b3931b
save shared_db_id as string and use lock
borngraced 4962351
use path_to_db_root in path_to_dbdir
borngraced f449cdd
make getter fns non async
borngraced a4ac369
fix other review notes
borngraced 99e6ca6
improve migration watcher -handling
borngraced a94c791
fix TendermintKeyPair derivation and minor fixes
borngraced 33ba505
hd wallet and some review notes fixes
borngraced 8a01341
fix clippy
borngraced b19d2ba
minor improvements and fixes
borngraced f35f371
fix review notes
borngraced 0856b54
merge with dev and fix clippy
borngraced 9a1f89d
cargo fmt
borngraced 5fdee3e
Fix swap restart issue with multi-pubkey DBs
borngraced 9a8494e
fix review notes
borngraced 7c12cce
revert Cargo.toml
borngraced 0b4d808
fix shared_db_id derivation and review notes
borngraced 90f89b7
Merge remote-tracking branch 'origin/dev' into multi-pubkey-dbs
borngraced 8f19481
proper shared_db handling and improvements
borngraced e643ab3
merge and fix merge conflict
borngraced a78704d
fix review notes
borngraced bdd79af
minor fix
borngraced 7e3d3a6
Merge remote-tracking branch 'origin/dev' into multi-pubkey-dbs
borngraced 5470b25
fix review notes
borngraced d57e394
merge with dev and fix conflicts
borngraced b690e93
fix clippy
borngraced 1675a53
fix review notes and remove left over
borngraced 5e02fa4
use display_eth_address
borngraced 5f72e83
minor changes and improvements
borngraced a0cf3cb
cargo fmt
borngraced 0c817e8
Merge remote-tracking branch 'origin/dev' into multi-pubkey-dbs
borngraced 34f9d27
allow swap continuation with correct db_id on swap restart for swap_v2
borngraced 79f3792
improve swap_v2 swap kickstart and eth pubkey deriv
borngraced 117aa44
Fix: Improve db_id validation for taker order processing
borngraced 2f3086c
cleanups
borngraced c6b3648
merge with dev and fix conflicts
borngraced 06ce83b
save dev state
borngraced eb9d74a
Merge remote-tracking branch 'origin/dev' into multi-pubkey-dbs
borngraced 5cbfd89
fix clippy
borngraced cea464b
fix orders_kick_start
borngraced 07a478c
fix minor review notes
borngraced 342fab8
Merge remote-tracking branch 'origin/dev' into multi-pubkey-dbs
shamardy 07177cf
post merge formating
shamardy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please clarify why this block is only for non-wasm target? is it bcz IDB automatically handles schema changes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WASM doesn't need theses operations only SQL needs running migration when opening db and also additional directory checks which of course WASM doesn't need