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

Shielded actions is broken V0.32.1 #2967

Closed
monleru opened this issue Mar 27, 2024 · 14 comments
Closed

Shielded actions is broken V0.32.1 #2967

monleru opened this issue Mar 27, 2024 · 14 comments
Labels
bug Something isn't working

Comments

@monleru
Copy link

monleru commented Mar 27, 2024

Shielded actions is broken.

When adding a new shield address and a new shield payment address, and successfully funding it, the user can see their balance after shielded-sync:

namadac balance --owner test-test --node $NODE Last committed epoch: 61 naan : 1

However, after attempting to send a transaction, it is rejected due to insufficient balance at the source:

Transaction added to mempool. Wrapper transaction hash: CE2ED8EB614F98FAF65FC5EE27639BC4D4588A9B7A8AF070340D453470242AE2 Inner transaction hash: A9B9AE05D66B82EF1A014DD719587054BD99AEB6637E1BEB849950CA9A71F7D5 Wrapper transaction accepted at height 239377. Used 70 gas. Waiting for inner transaction result... Transaction was rejected by VPs: [ "tnam1pcqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqzmefah" ]. Changed keys: [ "#tnam1pcqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqzmefah/commitment_tree", "#tnam1pcqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqzmefah/nullifiers/48609694D38C990E101A710C5F97014E1AA146804640B57E1BAACD6FC479129B", "#tnam1pyqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqej6juv/#tnam1qxvg64psvhwumv3mwrrjfcz0h3t3274hwggyzcee/balance/#tnam1pcqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqzmefah", "#tnam1pyqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqej6juv/#tnam1qxvg64psvhwumv3mwrrjfcz0h3t3274hwggyzcee/balance/#tnam1qpvz9gppxe9jzjzhfs90kmtea896s5sd6qag6ez4" ]

Upon receiving the rejection, the user checks their balance again and sees:

Last committed epoch: 61 No shielded balance found for given key

P.S. I used Namada v0.32.1
P.S.S I used my own node with last version Namada v0.32.1

@monleru monleru added the bug Something isn't working label Mar 27, 2024
@grarco
Copy link
Collaborator

grarco commented Mar 27, 2024

Hi @monleru, could you give us the exact commands you used to reproduce this error?

@monleru
Copy link
Author

monleru commented Mar 27, 2024

Hi @monleru, could you give us the exact commands you used to reproduce this error?

Create new shielded alias
Create shielded payment address
Transfer token to shielded payment address
Shielded-sync from 237907
Check balance ( i see my tokens )
Send unshielded transfer and reject it
Check balance ( i don't see my tokens )

@monleru
Copy link
Author

monleru commented Mar 27, 2024

  1. namada wallet gen --shielded --alias test-test

  2. namadaw gen-payment-addr
    --key test-test \
    --alias test-test-pay

  3. namadac transfer --source monleru --target test-test-pay --amount 1 --token naan --node $NODE

  4. namadac shielded-sync --node $NODE --from-height 237907
    Scanning 397 of 397
    [####################################################################################################] ~~ 100 %Syncing finished

  5. namadac balance --owner test-test --node $NODE
    Last committed epoch: 61
    naan : 1

  6. namadac balance --owner test-test --node $NODE
    Last committed epoch: 61
    naan : 1

  7. namadac transfer --source test-test --target monleru --amount 0.1 --token naan --node $NODE --memo $MEMO --gas-payer monleru
    Enter your decryption password:
    Transaction added to mempool.
    Wrapper transaction hash: CE2ED8EB614F98FAF65FC5EE27639BC4D4588A9B7A8AF070340D453470242AE2
    Inner transaction hash: A9B9AE05D66B82EF1A014DD719587054BD99AEB6637E1BEB849950CA9A71F7D5
    Wrapper transaction accepted at height 239377. Used 70 gas.
    Waiting for inner transaction result...
    Transaction was rejected by VPs: [
    "tnam1pcqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqzmefah"
    ].
    Changed keys: [
    "#tnam1pcqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqzmefah/commitment_tree",
    "#tnam1pcqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqzmefah/nullifiers/48609694D38C990E101A710C5F97014E1AA146804640B57E1BAACD6FC479129B",
    "#tnam1pyqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqej6juv/#tnam1qxvg64psvhwumv3mwrrjfcz0h3t3274hwggyzcee/balance/#tnam1pcqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqzmefah",
    "#tnam1pyqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqej6juv/#tnam1qxvg64psvhwumv3mwrrjfcz0h3t3274hwggyzcee/balance/#tnam1qpvz9gppxe9jzjzhfs90kmtea896s5sd6qag6ez4"
    ]
    Last committed epoch: 61
    Error:
    0: The balance of the source tnam1pcqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqzmefah is lower than the amount to be transferred. Amount to transfer is 0.100000 tnam1qxvg64psvhwumv3mwrrjfcz0h3t3274hwggyzcee
    1: The balance of the source tnam1pcqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqzmefah is lower than the amount to be transferred. Amount to transfer is 0.100000 tnam1qxvg64psvhwumv3mwrrjfcz0h3t3274hwggyzcee

  8. namadac balance --owner test-test --node $NODE
    Last committed epoch: 61
    No shielded balance found for given key

@monleru
Copy link
Author

monleru commented Mar 27, 2024

After resync (shielded-sync) i see my balance again and rejected transactions again

@quangtuyen88
Copy link

Can confirm got same err

@phy-chain
Copy link

To elaborate a bit more on that :

  • Same issue here, with a NEW shielded address
  • I have tried dropping the shielded.dat and re-syncing from HF start height, then normal sync => not working
  • I have tried dropping my whole namada folder and joining network again to get the newest wasm, just in case => not working

@grarco
Copy link
Collaborator

grarco commented Mar 28, 2024

The issue regarding the missing tokens (unless resyncing) is most probably due to the first point of #2593. We are investigating the broken transfers

@grarco
Copy link
Collaborator

grarco commented Mar 28, 2024

Quick update, we investigated the problem which is due to the client producing merkle paths for the spend notes that point to invalid anchors (which in turn leads to a rejection by the masp vp). This is likely because the clients are not fetching all the notes published on chain and therefore construct invalid merkle trees locally. We are evaluating possible solutions

@opsecx
Copy link

opsecx commented Mar 31, 2024

Quick update, we investigated the problem which is due to the client producing merkle paths for the spend notes that point to invalid anchors (which in turn leads to a rejection by the masp vp). This is likely because the clients are not fetching all the notes published on chain and therefore construct invalid merkle trees locally. We are evaluating possible solutions

is that due to not being fully synced pre-fork?

@Serge-GHSHCH
Copy link

I have the same problem. Is there a forecast for the solution?

@brentstone
Copy link
Collaborator

We are working on a solution for mainnet here, but a solution is not going to be expected for the SE so that we do not allocate valuable engineering time toward temporary fixes for the SE. Thanks for the discussion here, closing the issue now.

@Serge-GHSHCH
Copy link

Thank you for info. Goodluck guys!

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

8 participants
@quangtuyen88 @brentstone @grarco @monleru @phy-chain @opsecx @Serge-GHSHCH and others