asyncnotedecryption
#389
Open
duke
wants to merge 14 commits from asyncnotedecryption
into dev
pull from: asyncnotedecryption
merge into: hush:dev
hush:arm
hush:danger
hush:dev
hush:dev-aarch64
hush:dev-mac
hush:dev-old-randomx
hush:divzaddrs
hush:dragonx
hush:duke
hush:freebsd
hush:getfilterednotes
hush:hip39
hush:insync
hush:jahway603
hush:master
hush:mvstuff
hush:onryo
hush:p2p_privacy
hush:ramhash
hush:relaytx
hush:rx-largepages
hush:setbestchain
hush:warmup
hush:witness_cache
hush:wolfssl
hush:wolfssl_win
hush:z_createrawtransaction
hush:z_importwallet
hush:z_signmessage
Reviewers
Request review
No reviewers
Labels
bounty up to 500 HUSH 2001-5000 bounty
bounty between 2001 and 5000 HUSH 501-2000 bounty
bounty between 501 and 2000 HUSH arm
something doesn't work on arm beginners
for new developers bug
may or may not be a bug build
problems building documentation
not enough information feature
new feature high priority
high priority i2p
related to i2p low priority
low priority medium priority
medium priority question
something is not clear release
release label or issue related to it testing
related to testing tor
related to tor wontfix
this won't be fixed
Apply labels
Clear labels
0-500 bounty
bounty up to 500 HUSH 2001-5000 bounty
bounty between 2001 and 5000 HUSH 501-2000 bounty
bounty between 501 and 2000 HUSH arm
something doesn't work on arm beginners
for new developers bug
may or may not be a bug build
problems building documentation
not enough information feature
new feature high priority
high priority i2p
related to i2p low priority
low priority medium priority
medium priority question
something is not clear release
release label or issue related to it testing
related to testing tor
related to tor wontfix
this won't be fixed
No Label
0-500 bounty
2001-5000 bounty
501-2000 bounty
arm
beginners
bug
build
documentation
feature
high priority
i2p
low priority
medium priority
question
release
testing
tor
wontfix
Milestone
Set milestone
Clear milestone
No items
No Milestone
Projects
Clear projects
No project
Assignees
Assign users
Clear assignees
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.
No due date set.
Dependencies
This pull request currently doesn't have any dependencies.
Reference in new issue
There is no content yet.
Delete Branch 'asyncnotedecryption'
Deleting a branch is permanent. It CANNOT be undone. Continue?
No
Yes
Making a PR for @fekt 's work to make it easier for others to review what is changing
Compile errors are fixed on this branch, I think it's time to test it. One test can be to send zaddr funds to a zaddr in a different wallet and make sure the correct amount shows up. And to make sure it can received zaddr funds from a different wallet (running dev or latest release). Another test can be to run
z_getbalances
with at least 2 zaddrs with balances on the dev branch and then do a fresh sync with this branch with the same wallet and see if the same zaddrs with correct balances show up.Spinning up a couple nodes to test.
Seems to have bugs. Sending from
dev
>asyncnotedecrpytion
and the balance never shows up. If I try a rescan from hush-cli, I get this too:@fekt I would not despair, my guess is that the code is 50-75% complete. There is more code to port and things don't work without it.
The assertion error above about the sapling anchor basically means metadata about the state of zaddr transactions is inconsistent, i.e. the previous block's
hashFinalSaplingRoot
isn't the same assaplingTree
which means something is wrong.One way to debug and move forward is to add some debug prints to see if the async code is even running. My guess is it might not be, which would explain the assertion error about
hashFinalSaplingRoot
not matchingsaplingTree
FindMySaplingNotesAsync
does get called by default regularly when syncing and rescanning it seems. May need to add more debugging though.Also, that coredump was with running
./hush-cli rescan
without any height. It took awhile to rescan from genesis after, but is expected.After the rescan finished from coredumping, the balance still did not display. I just tested rescanning again specifying a height shortly before tx was sent and balance showed up. Seems to be partially working, but maybe only after a rescan.
Testing another tx from
dev
>asyncnotedecrpytion
to see if it shows up automatically this time.Sending from
asyncnotedecrpytion
>dev
and balance shows up ondev
but does not update onasyncnotedecrpytion
without a rescan.I sent back from
dev
toasyncnotedecrpytion
and balance onasyncnotedecrpytion
only shows after a rescan.From what I can tell, it seems
FindMySaplingNotesAsync
is only called on initial startup sync and rescans. Guessing whatever is responsible for checking new blocks for txs the wallet owns needs some changes.Testing fresh sync with wallet from
asyncnotedecrpytion
ondev
branch now to see what happens.@fekt from what you describe, it sounds like things partially work and what is missing is making sure incoming zfunds are recognized without a rescan.
I think this may be the missing code you need to port:
e7a19a8f94
@duke Thanks for the tip. I was diff checking
BuildWitnessCache
previously and thought that may be it. I wasn't sure what was responsible for checking if a tx belonged to a wallet when new blocks come in and was going to check with you. Will try porting that code over to see if things work.A fresh sync with wallet from
asyncnotedecrpytion
ondev
did show balances fine so it's just this piece that seems to be missing.