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

token 3.1.0 behaviour differences to token 2.6.0 #1231

Closed
mvines opened this issue Feb 14, 2021 · 6 comments
Closed

token 3.1.0 behaviour differences to token 2.6.0 #1231

mvines opened this issue Feb 14, 2021 · 6 comments
Assignees

Comments

@mvines
Copy link
Member

mvines commented Feb 14, 2021

The mainnet-beta transaction cgq..Fgc succeeded, but failed on the bvb running a custom build that shims in the token 3.1.0 binary.

Transaction details from bvb that caused the node to fork off mainnet-beta:

      Recent Blockhash: 8ZYNc26JJwgTnNjQ9kfZSUpugqjBBFhRiSQVEYqdeAM1
      Signature 0: cqgPsDCZNLd45A8LZC7PE7i646XYqgx6xdXSLGyHS9ba2QXkfEc1FrchBBVm6Dgt6xcjgPxLsqfgYjd19KMQFgc
      MessageHeader { num_required_signatures: 1, num_readonly_signed_accounts: 0, num_readonly_unsigned_accounts: 2 }
      Account 0: 5Ktk6Ci36W7hVQYsDWggHRhgsTdmtSGxCXf35Y5fsGDK
      Account 1: 8em6NLLarGyvsAvYTq93Kyip8vvWt7mm9S6kkwKBpGQx
      Account 2: kinXdEcpDQeHPEuQnqmUgtYykqKGVFq6CeVX5iAHJq6
      Account 3: TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA
      Instruction 0
        Program: TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA (3)
        Account 0: 8em6NLLarGyvsAvYTq93Kyip8vvWt7mm9S6kkwKBpGQx (1)
        Account 1: kinXdEcpDQeHPEuQnqmUgtYykqKGVFq6CeVX5iAHJq6 (2)
        Account 2: 8em6NLLarGyvsAvYTq93Kyip8vvWt7mm9S6kkwKBpGQx (1)
        Account 3: 5Ktk6Ci36W7hVQYsDWggHRhgsTdmtSGxCXf35Y5fsGDK (0)
        Data: [12, 224, 216, 106, 58, 154, 2, 0, 0, 18]
      Status: Error processing Instruction 0: custom program error: 0x12
        Fee: ◎0.000005
        Account 0 balance: ◎1 -> ◎0.999995
        Account 1 balance: ◎0.00203928
        Account 2 balance: ◎0.0014616
        Account 3 balance: ◎1.1305824
      Log Messages:
        Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA invoke [1]
        Program log: Instruction: TransferChecked
        Program log: Error: decimals different from the Mint decimals
        Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA consumed 3492 of 200000 compute units
        Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA failed: custom program error: 0x12
@mvines
Copy link
Member Author

mvines commented Feb 14, 2021

I think this is probably ok. Previously the self-transfer was a blind ✔️, but now with 3.1.0 we actually fully validate the transfer, so this transaction legitimately should have failed. If you agree Trent, let's chat with the kin team about it

@t-nelson
Copy link
Contributor

I think this is probably ok. Previously the self-transfer was a blind heavy_check_mark, but now with 3.1.0 we actually fully validate the transfer, so this transaction legitimately should have failed. If you agree Trent, let's chat with the kin team about it

Yep this failure is expected, 18 != 5. I'll raise with KIN folks tomorrow

@mvines
Copy link
Member Author

mvines commented Feb 15, 2021

Found another invalid transaction: 2x4...TwU

This was a self-transfer of 550 KIN when the account only had 540 KIN.

3.1.0 correctly rejects this transaction with TokenError::InsufficientFunds:

Status: Error processing Instruction 1: custom program error: 0x1

@mvines
Copy link
Member Author

mvines commented Feb 15, 2021

A non-kin one this time, a self TransferChecked of 1 wrapped SOL with an account holding 0 SOL: 4Qu...goD.

3.1.0 correctly rejects this transaction with TokenError::InsufficientFunds:

Status: Error processing Instruction 1: custom program error: 0x1

@mvines mvines changed the title token 3.1.0 behaviour difference to token 2.6.0 token 3.1.0 behaviour differences to token 2.6.0 Feb 15, 2021
@t-nelson
Copy link
Contributor

Thankfully looks like none of these have been CPI'd so far, so should all be easily fixable client-side changes 🤞

@mvines
Copy link
Member Author

mvines commented Feb 16, 2021

@mvines mvines closed this as completed Oct 12, 2021
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

2 participants