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

IBC transfer is accepted, while dry-run is rejected #2730

Closed
Rigorously opened this issue Feb 26, 2024 · 2 comments · Fixed by #2840
Closed

IBC transfer is accepted, while dry-run is rejected #2730

Rigorously opened this issue Feb 26, 2024 · 2 comments · Fixed by #2840
Labels
bug Something isn't working

Comments

@Rigorously
Copy link

Rigorously commented Feb 26, 2024

Executing an IBC transfer in client v0.31.6 with the --dry-run or --dry-run-wrapper flags results in a rejection:

namadac ibc-transfer --source myaddress --receiver stars1someaddress--token naan --amount 1 --channel-id channel-275 --dry-run

Dry-run result: Transaction was rejected by VPs: [
  "tnam1qcqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqvtr7x4"
].
Changed key: [
  {
    "segments": [
      {
        "AddressSeg": "tnam1pyqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqej6juv"
      },
      {
        "AddressSeg": "tnam1qxvg64psvhwumv3mwrrjfcz0h3t3274hwggyzcee"
      },
      {
        "StringSeg": "balance"
      },
      {
        "AddressSeg": "tnam1qcqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqvtr7x4"
      }
    ]
  },
  {
    "segments": [
      {
        "AddressSeg": "tnam1pyqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqej6juv"
      },
      {
        "AddressSeg": "tnam1qxvg64psvhwumv3mwrrjfcz0h3t3274hwggyzcee"
      },
      {
        "StringSeg": "balance"
      },
      {
        "AddressSeg": "tnam1qrqgs5e67esl3yjdq3dccls0470ctcm6m5kx4cal"
      }
    ]
  },
  {
    "segments": [
      {
        "AddressSeg": "tnam1qcqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqvtr7x4"
      },
      {
        "StringSeg": "commitments"
      },
      {
        "StringSeg": "ports"
      },
      {
        "StringSeg": "transfer"
      },
      {
        "StringSeg": "channels"
      },
      {
        "StringSeg": "channel-275"
      },
      {
        "StringSeg": "sequences"
      },
      {
        "StringSeg": "5"
      }
    ]
  },
  {
    "segments": [
      {
        "AddressSeg": "tnam1qcqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqvtr7x4"
      },
      {
        "StringSeg": "nextSequenceSend"
      },
      {
        "StringSeg": "ports"
      },
      {
        "StringSeg": "transfer"
      },
      {
        "StringSeg": "channels"
      },
      {
        "StringSeg": "channel-275"
      }
    ]
  }
]

The same transaction without --dry-run is accepted:

namadac ibc-transfer --source myaddress --receiver stars1someaddress--token naan --amount 1 --channel-id channel-275

Transaction added to mempool.
Wrapper transaction hash: 972CFB699DB939A236B5984E0A7DC5A2701F0CD9485AC76A733907C6A492586C
Inner transaction hash: F9979352E76AAD5B2301D6807428AADA9C7170FDE5C2F3441D5C2DA0EDB3D976
Wrapper transaction accepted at height 75053. Used 27 gas.
Waiting for inner transaction result...
Transaction was successfully applied at height 75054. Used 6193 gas.

After that transaction, my balance is 3.5 naan lower.

@Rigorously Rigorously added the bug Something isn't working label Feb 26, 2024
@brentstone
Copy link
Contributor

@yito88 ?

@yito88
Copy link
Member

yito88 commented Mar 6, 2024

Thank you for reporting it. Yeah, I could reproduce it.
The TempWlState which is used in dry_run_tx() doesn't have the block header because it is set in finalize_block().
IBC transfer tx tried to read the header's time to check the packet timeout and failed.

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

Successfully merging a pull request may close this issue.

4 participants