Skip to content
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

Darksidewalletd is refreshing mempool from mainnet #385

Open
pacu opened this issue May 13, 2022 · 0 comments
Open

Darksidewalletd is refreshing mempool from mainnet #385

pacu opened this issue May 13, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@pacu
Copy link
Contributor

pacu commented May 13, 2022

What is the bug?
I was trying to run zecwallet-cli against darksidewalletd and it didn't work as expected because dlwd started pulling tx's out of the mainnet mempool instead of returning an empty mempool representing the current chainstate.

Reproducing steps

Start dlwd

lightwalletd % ./lightwalletd --log-file /dev/stdout --darkside-very-insecure  --darkside-timeout 1000 --gen-cert-very-insecure --data-dir . --no-tls-very-insecure

from another terminal set the chain

grpcurl -plaintext -d '{ "saplingActivation" : 663150, "branchID" : "2bb40e60", "chainName" : "main" }' localhost:9067 cash.z.wallet.sdk.rpc.DarksideStreamer/Reset

then load a testing dataset

 grpcurl -plaintext -d '{ "url" : "https://raw.githubusercontent.com/zcash-hackworks/darksidewalletd-test-data/master/tx-height-reorg/before-reorg.txt" }' localhost:9067 cash.z.wallet.sdk.rpc.DarksideStreamer/StageBlocks

this should take you to this state:

{"app":"lightwalletd","level":"info","msg":"DarksideStageBlocksDarksideStageBlock(height=663200)","time":"2022-05-13T16:44:03-03:00"}

Then start the CLI

after starting CLI with

zecwallet-light-cli % ./target/release/zecwallet-cli --server localhost:9067 --birthday 663150 --seed "still champion voice habit trend flight survey between bitter process artefact blind carbon truly provide dizzy crush flush breeze blouse charge solid fish spread"

the CLI starts to sync, and suddenly these logs start to appear in the dlwd terminal..

{"app":"lightwalletd","level":"info","msg":"Refreshing mempool","time":"2022-05-13T16:46:34-03:00"}
{"app":"lightwalletd","level":"info","msg":"appending 7f0cfabb86d4c06f7858afa77054db3daa241c7aeac4b49277f1349198ad2c2f","time":"2022-05-13T16:46:34-03:00"}
{"app":"lightwalletd","level":"info","msg":"appending 64b533e1f35f01e34209a6681e86406365e4fe9b56828efe16f18fb751ac1daf","time":"2022-05-13T16:46:34-03:00"}
{"app":"lightwalletd","level":"info","msg":"appending 013c3465bd491f38cfdd5ee31382834b35ef3c5707f3c5fdbae00e845c470115","time":"2022-05-13T16:46:34-03:00"}
{"app":"lightwalletd","level":"info","msg":"appending 8bc4d7e7c5a1064af9bcebd02ad92656a77b5c7b464ded30e9ba3bfe2e70a3fa","time":"2022-05-13T16:46:34-03:00"}

If you look for these transactions, they are mainnet txs
https://zcashblockexplorer.com/transactions/7f0cfabb86d4c06f7858afa77054db3daa241c7aeac4b49277f1349198ad2c2f

which this dataset does not pre-load.

Solution
dlwd shouldn't serve anything that hasn't been loaded by the driver of the integration test.

@pacu pacu added the bug Something isn't working label May 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant