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

Add partial-sync support to the wallet #3567

Merged
merged 13 commits into from
Dec 2, 2024

Conversation

StephenButtolph
Copy link
Contributor

@StephenButtolph StephenButtolph commented Nov 25, 2024

Why this should be merged

Currently, it is not easy to create a wallet that can issue transactions against a node that is running --partial-sync-primary-network.

This PR allows creating an instance of the P-chain wallet against such a node.

How this works

  • Removes the usage of the X-chain API when fetching the AVAX asset ID.
  • Adds a new function MakePWallet that does not attempt to fetch UTXOs from the X-chain or C-chain (or shared memory).

How this was tested

Issuing transactions against a partial synced node.

Need to be documented in RELEASES.md?

No.

@StephenButtolph StephenButtolph changed the base branch from master to remove-unused-wallet-interface November 25, 2024 21:13
@StephenButtolph StephenButtolph changed the base branch from remove-unused-wallet-interface to move-required-fields-from-config November 25, 2024 21:47
@@ -21,42 +21,40 @@ const gasPriceMultiplier = 2

func NewContextFromURI(ctx context.Context, uri string) (*builder.Context, error) {
infoClient := info.NewClient(uri)
xChainClient := avm.NewClient(uri, "X")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In order to support partial sync, the P-chain wallet can not depend on any X-chain APIs.

@StephenButtolph StephenButtolph self-assigned this Nov 25, 2024
@StephenButtolph StephenButtolph added this to the v1.11.14 milestone Nov 25, 2024
@StephenButtolph StephenButtolph marked this pull request as ready for review November 25, 2024 22:26
Base automatically changed from move-required-fields-from-config to master November 26, 2024 08:23
@StephenButtolph StephenButtolph merged commit 912f6f9 into master Dec 2, 2024
23 checks passed
@StephenButtolph StephenButtolph deleted the wallet-partial-sync-support branch December 2, 2024 04:03
@StephenButtolph StephenButtolph modified the milestones: v1.11.14, v1.12.0 Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants