-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Milestone
Description
Gas Station Transfer Issue Case
Problem Description
User signing the transaction and the gas station signer cannot be the same.
Invalid user signature: Expect 1 signer signatures but got 2
Root Cause Analysis
From the gas station logs, we can see that when the transfer back operation is executed:
- The transaction sender is the same address as the gas station sponsor
- Both the user and gas owner correspond to the same wallet address
This creates a special edge case where:
- The user signing the transaction is the same as the gas sponsor
- The gas station code adds both
sponsor_siganduser_sigto the transaction - Both signatures are identical because they come from the same keypair
- The IOTA validator rejects the transaction because it expects 1 signature but receives 2 identical signatures
Technical Details
In the gas station Rust code (gas_station_core.rs):
let tx = Transaction::from_generic_sig_data(tx_data, vec![sponsor_sig, user_sig]);When sponsor_sig and user_sig are identical (same keypair), this creates a duplicate signature issue.
Test Scenario
The failing test sequence:
- Mint NFT with User A (works)
- Transfer NFT from User A to User B (works)
- Transfer NFT back from User B to User A (fails)
The issue occurs because:
- User B corresponds to the same address as the gas station sponsor wallet
- When User B tries to sign a transaction, it creates a duplicate signature situation
Current Status
- All basic operations (mint, resolve, forward transfer) work correctly
- The issue only affects scenarios where the user and gas sponsor are the same address
Recommended Solutions
- Gas Station Code Fix: The gas station should detect when the user and sponsor are the same and only add one signature
Impact
This is a specific edge case that occurs when the user wallet is the same as the gas station sponsor wallet.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Product Backlog