zingolabs / zingolib

An API and test-app that exposes zcash functionality for app consumption
MIT License
15 stars 23 forks source link

Mempool result #1401

Closed nachog00 closed 2 months ago

nachog00 commented 2 months ago

Got 32 failed tests while running cargo nextest.

------------
     Summary [ 791.275s] 309 tests run: 277 passed (59 slow), 32 failed, 21 skipped
        FAIL [ 107.824s] libtonode-tests::chain_generics chain_generics::simpool_change_10_000_orchard_to_orchard
        FAIL [ 110.085s] libtonode-tests::chain_generics chain_generics::simpool_change_10_000_orchard_to_sapling
        FAIL [ 132.373s] libtonode-tests::chain_generics chain_generics::simpool_change_10_000_orchard_to_transparent
        FAIL [ 107.074s] libtonode-tests::chain_generics chain_generics::simpool_change_10_000_sapling_to_orchard
        FAIL [  85.808s] libtonode-tests::chain_generics chain_generics::simpool_change_10_000_sapling_to_sapling
        FAIL [  85.983s] libtonode-tests::chain_generics chain_generics::simpool_change_10_000_sapling_to_transparent
        FAIL [ 116.079s] libtonode-tests::chain_generics chain_generics::simpool_change_50_000_orchard_to_orchard
        FAIL [  95.346s] libtonode-tests::chain_generics chain_generics::simpool_change_50_000_orchard_to_sapling
        FAIL [  95.879s] libtonode-tests::chain_generics chain_generics::simpool_change_50_000_orchard_to_transparent
        FAIL [  99.074s] libtonode-tests::chain_generics chain_generics::simpool_change_50_000_sapling_to_orchard
        FAIL [  91.380s] libtonode-tests::chain_generics chain_generics::simpool_change_50_000_sapling_to_sapling
        FAIL [ 112.936s] libtonode-tests::chain_generics chain_generics::simpool_change_50_000_sapling_to_transparent
        FAIL [  98.107s] libtonode-tests::chain_generics chain_generics::simpool_change_50_orchard_to_orchard
        FAIL [  99.500s] libtonode-tests::chain_generics chain_generics::simpool_change_50_orchard_to_sapling
        FAIL [ 121.109s] libtonode-tests::chain_generics chain_generics::simpool_change_50_orchard_to_transparent
        FAIL [  97.342s] libtonode-tests::chain_generics chain_generics::simpool_change_50_sapling_to_orchard
        FAIL [  87.854s] libtonode-tests::chain_generics chain_generics::simpool_change_50_sapling_to_sapling
        FAIL [ 102.357s] libtonode-tests::chain_generics chain_generics::simpool_change_50_sapling_to_transparent
        FAIL [ 104.337s] libtonode-tests::chain_generics chain_generics::simpool_change_5_000_orchard_to_orchard
        FAIL [  80.535s] libtonode-tests::chain_generics chain_generics::simpool_change_5_000_orchard_to_sapling
        FAIL [  82.623s] libtonode-tests::chain_generics chain_generics::simpool_change_5_000_orchard_to_transparent
        FAIL [ 256.837s] libtonode-tests::chain_generics chain_generics::simpool_change_5_000_sapling_to_orchard
        FAIL [  77.436s] libtonode-tests::chain_generics chain_generics::simpool_change_5_000_sapling_to_sapling
        FAIL [ 102.143s] libtonode-tests::chain_generics chain_generics::simpool_change_5_000_sapling_to_transparent
        FAIL [ 107.895s] libtonode-tests::chain_generics chain_generics::simpool_zero_value_change_orchard_to_orchard
        FAIL [ 105.800s] libtonode-tests::chain_generics chain_generics::simpool_zero_value_change_orchard_to_sapling
        FAIL [  85.860s] libtonode-tests::chain_generics chain_generics::simpool_zero_value_change_orchard_to_transparent
        FAIL [  85.745s] libtonode-tests::chain_generics chain_generics::simpool_zero_value_change_sapling_to_orchard
        FAIL [  80.358s] libtonode-tests::chain_generics chain_generics::simpool_zero_value_change_sapling_to_transparent
        FAIL [  99.046s] libtonode-tests::chain_generics chain_generics::simpool_zero_value_sapling_to_sapling
        FAIL [  79.244s] libtonode-tests::concrete fast::received_tx_status_pending_to_confirmed_with_mempool_monitor
        FAIL [ 224.787s] libtonode-tests::concrete slow::aborted_resync
error: test run failed

Tried running a specific test simpool_zero_value_sapling_to_sapling and got:

--- STDERR:              libtonode-tests::chain_generics chain_generics::simpool_zero_value_sapl
ing_to_sapling ---
[zingolib/src/testutils/chain_generics/fixtures.rs:528:13] "mm started" = "mm started"
[zingolib/src/testutils/chain_generics/fixtures.rs:528:13] "mm started" = "mm started"
[zingolib/src/testutils/chain_generics/fixtures.rs:528:13] "mm started" = "mm started"
thread 'tokio-runtime-worker' panicked at zingolib/src/wallet/transaction_records_by_id.rs:285:1
4:
transaction must exist in wallet
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread 'chain_generics::simpool_zero_value_sapling_to_sapling' panicked at /home/chona/zingo/zin
golib/dev/zingolib/src/testutils/assertions.rs:44:9:
assertion `left == right` failed
  left: Mempool(BlockHeight(1))
 right: Mempool(BlockHeight(7))

------------

Experiment: Added error handling for `start_mempool_monitor' Result: Nothing changed, same error

sebastianlujan commented 2 months ago
Summary [ 926.325s] 309 tests run: 277 passed (62 slow), 32 failed, 21 skipped
        FAIL [ 147.295s] libtonode-tests::chain_generics chain_generics::simpool_change_10_000_orchard_to_orchard
        FAIL [ 125.473s] libtonode-tests::chain_generics chain_generics::simpool_change_10_000_orchard_to_sapling
        FAIL [ 124.203s] libtonode-tests::chain_generics chain_generics::simpool_change_10_000_orchard_to_transparent
        FAIL [ 146.271s] libtonode-tests::chain_generics chain_generics::simpool_change_10_000_sapling_to_orchard
        FAIL [  97.734s] libtonode-tests::chain_generics chain_generics::simpool_change_10_000_sapling_to_sapling
        FAIL [  99.797s] libtonode-tests::chain_generics chain_generics::simpool_change_10_000_sapling_to_transparent
        FAIL [ 114.441s] libtonode-tests::chain_generics chain_generics::simpool_change_50_000_orchard_to_orchard
        FAIL [ 113.696s] libtonode-tests::chain_generics chain_generics::simpool_change_50_000_orchard_to_sapling
        FAIL [ 133.836s] libtonode-tests::chain_generics chain_generics::simpool_change_50_000_orchard_to_transparent
        FAIL [ 136.860s] libtonode-tests::chain_generics chain_generics::simpool_change_50_000_sapling_to_orchard
        FAIL [ 126.642s] libtonode-tests::chain_generics chain_generics::simpool_change_50_000_sapling_to_sapling
        FAIL [ 122.316s] libtonode-tests::chain_generics chain_generics::simpool_change_50_000_sapling_to_transparent
        FAIL [ 114.282s] libtonode-tests::chain_generics chain_generics::simpool_change_50_orchard_to_orchard
        FAIL [ 137.402s] libtonode-tests::chain_generics chain_generics::simpool_change_50_orchard_to_sapling
        FAIL [ 134.882s] libtonode-tests::chain_generics chain_generics::simpool_change_50_orchard_to_transparent
        FAIL [ 135.309s] libtonode-tests::chain_generics chain_generics::simpool_change_50_sapling_to_orchard
        FAIL [ 121.093s] libtonode-tests::chain_generics chain_generics::simpool_change_50_sapling_to_sapling
        FAIL [ 114.690s] libtonode-tests::chain_generics chain_generics::simpool_change_50_sapling_to_transparent
        FAIL [ 115.162s] libtonode-tests::chain_generics chain_generics::simpool_change_5_000_orchard_to_orchard
        FAIL [ 114.794s] libtonode-tests::chain_generics chain_generics::simpool_change_5_000_orchard_to_sapling
        FAIL [  93.052s] libtonode-tests::chain_generics chain_generics::simpool_change_5_000_orchard_to_transparent
        FAIL [ 119.438s] libtonode-tests::chain_generics chain_generics::simpool_change_5_000_sapling_to_orchard
        FAIL [  86.111s] libtonode-tests::chain_generics chain_generics::simpool_change_5_000_sapling_to_sapling
        FAIL [  85.496s] libtonode-tests::chain_generics chain_generics::simpool_change_5_000_sapling_to_transparent
        FAIL [  92.612s] libtonode-tests::chain_generics chain_generics::simpool_zero_value_change_orchard_to_orchard
        FAIL [  93.888s] libtonode-tests::chain_generics chain_generics::simpool_zero_value_change_orchard_to_sapling
        FAIL [ 116.027s] libtonode-tests::chain_generics chain_generics::simpool_zero_value_change_orchard_to_transparent
        FAIL [ 123.983s] libtonode-tests::chain_generics chain_generics::simpool_zero_value_change_sapling_to_orchard
        FAIL [ 110.668s] libtonode-tests::chain_generics chain_generics::simpool_zero_value_change_sapling_to_transparent
        FAIL [  86.619s] libtonode-tests::chain_generics chain_generics::simpool_zero_value_sapling_to_sapling
        FAIL [ 111.681s] libtonode-tests::concrete fast::received_tx_status_pending_to_confirmed_with_mempool_monitor
        FAIL [ 256.431s] libtonode-tests::concrete slow::aborted_resync
    Basically same errors, running `cargo nextest run` in zingolib
nachog00 commented 2 months ago

Found the issue root

There's an except here

zancas commented 2 months ago

I see that this is still a draft... do we have anything new on this issue?

nachog00 commented 2 months ago

This still fails the tests, specifically on 'simpool_zero_value_sapling_to_sapling`:

--- STDERR:              libtonode-tests::chain_generics chain_generics::simpool_zero_value_sapling_to_sapling ---
[zingolib/src/testutils/chain_generics/fixtures.rs:528:13] "mm started" = "mm started"
[zingolib/src/testutils/chain_generics/fixtures.rs:528:13] "mm started" = "mm started"
[zingolib/src/testutils/chain_generics/fixtures.rs:528:13] "mm started" = "mm started"
missing spending tx
thread 'chain_generics::simpool_zero_value_sapling_to_sapling' panicked at /home/chona/zingo/zingolib/mempool_result/zingolib/src/testutils/assertions.rs:44:9:
assertion `left == right` failed
  left: Mempool(BlockHeight(1))
 right: Mempool(BlockHeight(7))
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Oscar-Pepper commented 2 months ago

now we have narrowed down the issue to LWD / zcashd can we close this PR and either: a. open a new PR that fixes the bug where mempool returns height 1 where it should be 0 (possible theory) and changes test assertions to pass b. investigate and notify ECC if zcashd / lwd is bugged

i dont have time to fully investigate this but i can give assistance where needed