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

Tx ID reported on do_send does not match the one reported on summaries #621

Open
pacu opened this issue Oct 24, 2023 · 0 comments
Open

Tx ID reported on do_send does not match the one reported on summaries #621

pacu opened this issue Oct 24, 2023 · 0 comments

Comments

@pacu
Copy link
Collaborator

pacu commented Oct 24, 2023

This can be reproduced on the test introduced on this PR: #619

do_send is returning a transaction ID that then doesn't match the one shown on tx_summaries

The test sends a TX which has to be reorg'd to another block and then synced and confirmed.

 // Send 100000 zatoshi to some address
    let sent_tx_id = light_client.do_send([("uregtest1z8s5szuww2cnze042e0re2ez8l3d04zvkp7kslxwdha6tp644srd4nh0xlp8a05avzduc6uavqkxv79x53c60hrc0qsgeza3age2g3qualullukd4s0lsn6mtfup4z8jz6xdz2c05zakhafc7pmw0dwugwu9ljevzgyc3mfwxg9slr87k8l7cq075gl3fgxpr85uuvxhxydrskp2303", 100000, None)].to_vec()).await.unwrap();

    println!("SENT TX ID: {:?}", sent_tx_id);

This is what is printed in the logs:
SENT TX ID: "11b8b9f44869b52ce52d1551d301776dd71c06c7ddb59f727339643fa7992984"

Then I check that the sent transaction is tracked by the wallet

// check that the outgoing transaction has the correct height before
// the reorg is triggered

    println!("{:?}", light_client.do_list_txsummaries().await);

This is what it's printed

[ValueTransfer { block_height: BlockHeight(203), datetime: 1, kind: Received { pool: Orchard, amount: 100000000 }, memos: [], price: None, txid: TxId("8698b158c0746e868615611ad9ca106465b51032a7c5c45a1963f5a193f5cce1") }, ValueTransfer { block_height: BlockHeight(205), datetime: 1698181114, kind: Sent { amount: 100000, to_address: ZcashAddress { net: Regtest, kind: Unified(Address([P2pkh([194, 233, 133, 149, 15, 205, 125, 169, 93, 133, 49, 242, 127, 97, 240, 45, 186, 96, 1, 45]), Sapling([85, 56, 108, 149, 244, 208, 77, 10, 114, 22, 236, 103, 220, 254, 110, 55, 215, 13, 12, 101, 127, 190, 95, 98, 191, 226, 249, 105, 161, 0, 248, 79, 70, 73, 206, 64, 206, 2, 229, 226, 181, 177, 183]), Orchard([202, 101, 1, 126, 115, 154, 198, 112, 65, 23, 144, 213, 80, 49, 5, 41, 212, 132, 38, 87, 245, 237, 89, 140, 206, 126, 190, 166, 107, 199, 153, 7, 235, 13, 152, 24, 56, 245, 151, 188, 214, 97, 147])])) } }, memos: [], price: None, txid: TxId("4fd31e789c50eed597e398a4d40c3e1020db670d99cae2c8ddc9995d3581e63e") }, ValueTransfer { block_height: BlockHeight(205), datetime: 1698181114, kind: Fee { amount: 10000 }, memos: [], price: None, txid: TxId("4fd31e789c50eed597e398a4d40c3e1020db670d99cae2c8ddc9995d3581e63e") }]

Look closely at the ValueTransfer of the Fee , which is the same as the value sent, but NOT the one reported by do_send that is 11b8b9f44869b52ce52d1551d301776dd71c06c7ddb59f727339643fa7992984

ValueTransfer { block_height: BlockHeight(205), datetime: 1698181114, kind: Fee { amount: 10000 }, memos: [], price: None, txid: TxId("4fd31e789c50eed597e398a4d40c3e1020db670d99cae2c8ddc9995d3581e63e")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant