Skip to content

Rebroadcast Solana transactions on client side #37310

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

Closed
yrliou opened this issue Apr 3, 2024 · 2 comments · Fixed by brave/brave-core#23329
Closed

Rebroadcast Solana transactions on client side #37310

yrliou opened this issue Apr 3, 2024 · 2 comments · Fixed by brave/brave-core#23329
Assignees
Labels
feature/web3/wallet/core feature/web3/wallet/solana feature/web3/wallet Integrating Ethereum+ wallet support OS/Android Fixes related to Android browser functionality OS/Desktop priority/P3 The next thing for us to work on. It'll ride the trains. QA Pass - Android ARM QA Pass-Win64 QA/Yes release-notes/include

Comments

@yrliou
Copy link
Member

yrliou commented Apr 3, 2024

https://twitter.com/brianlong/status/1775554526340141130
Shared by @onyb, it seems RPC retry queues are less reliable than rebroadcast from client side.
We should update our logic from default not sending maxRetries argument to maxRetries: 0 to turn off retry on RPC nodes.
And for dApp which specifies maxRetries in sendOptions, the behavior is unchanged, the value passed will continue to be respected and used.

Update: Following the practice of bat-go project, it seems it is better to do both rebroadcast and retries on RPC nodes for better success rate.

For rebroadcasting, we will do so periodically until we're sure the blockhash is expired (after 150 blocks) or we receive error for the transaction.

extra material: https://solana.com/docs/core/transactions/retry#customizing-rebroadcast-logic

@yrliou yrliou added priority/P3 The next thing for us to work on. It'll ride the trains. OS/Android Fixes related to Android browser functionality OS/Desktop feature/web3/wallet/solana labels Apr 3, 2024
@yrliou yrliou added this to Browser AI Apr 3, 2024
@yrliou yrliou self-assigned this Apr 3, 2024
@yrliou yrliou removed this from Browser AI Apr 4, 2024
@yrliou yrliou added this to Web3 Apr 4, 2024
@yrliou yrliou moved this to Backlog in Web3 Apr 4, 2024
@yrliou yrliou changed the title Manually rebroadcast Solana transactions rather than relying on RPC end to do so Rebroadcast Solana transactions on client side Apr 30, 2024
@yrliou yrliou moved this from Backlog to In Review in Web3 Apr 30, 2024
@github-project-automation github-project-automation bot moved this from In Review to Done in Web3 May 6, 2024
@brave-builds brave-builds added feature/web3/wallet Integrating Ethereum+ wallet support feature/web3/wallet/core labels May 6, 2024
@brave-builds brave-builds added this to the 1.67.x - Nightly milestone May 6, 2024
@srirambv
Copy link
Contributor

Verification passed on

Brave 1.67.92 Chromium: 125.0.6422.76 (Official Build) beta (64-bit)
Revision d751d2edf40b466560aaeecc4c4919041f41c20d
OS Windows 11 Version 23H2 (Build 22631.3593)
  • Verified steps from brave/brave-core#23329
  • Verified all Solana transactions on https://pwgoom.csb.app works as expected

@srirambv
Copy link
Contributor

srirambv commented May 30, 2024

Verification passed on Google Pixel 8 with Android 14 running 1.67.98

  • Verified steps from brave/brave-core#23329
  • Verified all Solana transactions on https://pwgoom.csb.app works as expected
  • Encountered #38666

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature/web3/wallet/core feature/web3/wallet/solana feature/web3/wallet Integrating Ethereum+ wallet support OS/Android Fixes related to Android browser functionality OS/Desktop priority/P3 The next thing for us to work on. It'll ride the trains. QA Pass - Android ARM QA Pass-Win64 QA/Yes release-notes/include
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants