brave / brave-browser

Brave browser for Android, iOS, Linux, macOS, Windows.
https://brave.com
Mozilla Public License 2.0
17.57k stars 2.28k forks source link

Meta Issue: Transaction Simulation Improvements #34570

Closed josheleonard closed 2 months ago

josheleonard commented 9 months ago

Transaction Simulations fail for the following events

Solana

Ethereum

josheleonard commented 9 months ago

https://github.com/brave/brave-browser/issues/34617

josheleonard commented 6 months ago

@onyb , updated the list. many of the errors are resolved, but there are still some requests that fail simulation

josheleonard commented 6 months ago

Latest test results:

Sign and Send Transaction (Legacy)

Sign and Send Transaction (v0)

Sign and Send Transaction (v0 + lookup table) (devnet only

Sign and Send Transaction (Request)

Sign and Send SPL Token Transaction

Sign Transaction

Sign Transaction (Invalid blockhash)

Sign Transaction (Request)

Sign Transaction (v0)

Sign Transaction (v0) (Request)

Sign Transaction (v0 + lookup table)

Sign All Transactions (multiple)

Sign All Transactions (Invalid blockhash)

Sign All Transactions (multiple) (Request)

Sign All Transactions (multiple) (v0)

Sign All Transactions (multiple) (v0) (Request)

Sign All Transactions (multiple) (v0 + lookup table)

Sign All Transactions (single)

Sign All Transactions (single) (Request)

Sign Message

Sign Message (Request)

Sign Message (Hex display)

Sign Message (Hex display + Request

Brave Swap

JUP Swap

Brave SOL Send

Brave SPL (fungible) Send

Brave SPL (non-fungible) Send

Brave EVM Eth Send

Brave EVM ERC-20 Token Send

Brave EVM NFT Send

Brave EVM Deploy contract (MM test Dapp)

Malicious set approval for all

Malicious ETH Send

UI Bugs

josheleonard commented 6 months ago

UI bugs fixed

Confirm reject simulation button padding issues not shown on sol simulated sign panel, buttons swapped

Sign risk cancel will close the panel, but not update if loaded into brave://wallet-panel.top-chrome for now

josheleonard commented 6 months ago

Added simulation skip whenever "safer-sign" can be used

josheleonard commented 6 months ago

New broken tx list:

SVM Sign and Send Transaction (Legacy)

Sign and Send Transaction (v0)

Sign and Send Transaction (Request)

Sign and Send SPL Token Transaction

Sign Transaction

Sign Transaction (Request)

Sign Transaction (v0)

Sign Transaction (v0) (Request)

Sign All Transactions (multiple)

Sign All Transactions (multiple) (Request)

Sign All Transactions (multiple) (v0)

Sign All Transactions (multiple) (v0) (Request)

Sign All Transactions (single)

Sign All Transactions (single) (Request)

Sign Message

Sign Message (Request)

Sign Message (Hex display)

Sign Message (Hex display + Request

EVM Brave EVM Deploy contract (MM test Dapp)

Malicious set approval for all

josheleonard commented 5 months ago

New test results:

SVM

Action Status
Sign and Send Transaction (Legacy) Parsing Error
Sign and Send Transaction (v0) Parsing Error
Sign and Send Transaction (v0 + lookup table) (devnet only) Success
Sign and Send Transaction (Request) Parsing Error
Sign and Send SPL Token Transaction Parsing Error
Sign Transaction Parsing Error
Sign Transaction (Request) Parsing Error
Sign Transaction (v0) Parsing Error
Sign Transaction (v0) (Request) Parsing Error
Sign Transaction (v0 + lookup table) Success
Sign All Transactions (multiple) Parsing Error
Sign All Transactions (multiple) (Request) Parsing Error
Sign All Transactions (multiple) (v0) Parsing Error
Sign All Transactions (multiple) (v0) (Request) Parsing Error
Sign All Transactions (multiple) (v0 + lookup table) Success
Sign All Transactions (single) Parsing Error
Sign All Transactions (single) (Request) Parsing Error
Sign Message Not supported
Sign Message (Request) Not supported
Sign Message (Hex display) Not supported
Sign Message (Hex display + Request Not supported

EVM

Action Status
Brave EVM Deploy contract (MM test Dapp) Invalid txObject data
Malicious set approval for all Parsing Error
onyb commented 5 months ago

Update: use https://xpj8pg.csb.app for executing the Solana provider tests.

onyb commented 5 months ago

All the remaining Solana cases are actually self-transfers, hence the transactions do not have any state change. This is no longer considered an error in the backend (see https://github.com/brave/brave-core/pull/21796/commits/0799a0935e689637b246505304bfd3e708646874) as they are valid transactions. The frontend should appropriately indicate that there are no state changes.

josheleonard commented 2 months ago

Closing since we have individual tickets for the remaining issues