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

Optimize syncing logic to handle large outpoint sets #368

Merged
merged 2 commits into from
Nov 27, 2024

Conversation

rileystephens28
Copy link
Member

@rileystephens28 rileystephens28 commented Nov 27, 2024

  • Use map for Qi wallet available outpoints
  • Improve efficiency of syncing request batching
  • Minor bug fixes

Copy link
Contributor

@alejoacosta74 alejoacosta74 left a comment

Choose a reason for hiding this comment

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

Qi address derivation tests are failing. Mainly due to :

  • "lastSyncBlock" property not found in QiAddressInfo (this is expected, unit test data needs to be updated)
  • Address status expected is "UNUSED" but got "UNKNOWN". Is this expected?
 [ fail(1): derives external addresses correctly - External address mismatch for zone 0x00, expected: {"pubKey":"0x02be08725a5cef5a8eb4bf27b3f0e4d256663e44c25db8e9705aff27ee322f3384","address":"0x009f1545923a5A1052Aa162F858e2b925863Cd3D","index":385,"change":false,"zone":"0x00","status":"UNUSED","derivationPath":"BIP44:external","account":0}, derived: {"address":"0x009f1545923a5A1052Aa162F858e2b925863Cd3D","pubKey":"0x02be08725a5cef5a8eb4bf27b3f0e4d256663e44c25db8e9705aff27ee322f3384","account":0,"index":385,"change":false,"zone":"0x00","status":"UNKNOWN","derivationPath":"BIP44:external","lastSyncedBlock":null} ]

src/wallet/qi-hdwallet.ts Outdated Show resolved Hide resolved
src/wallet/qi-hdwallet.ts Show resolved Hide resolved
Copy link
Member Author

@rileystephens28 rileystephens28 left a comment

Choose a reason for hiding this comment

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

Qi address derivation tests are failing. Mainly due to :

  • "lastSyncBlock" property not found in QiAddressInfo (this is expected, unit test data needs to be updated)
  • Address status expected is "UNUSED" but got "UNKNOWN". Is this expected?
 [ fail(1): derives external addresses correctly - External address mismatch for zone 0x00, expected: {"pubKey":"0x02be08725a5cef5a8eb4bf27b3f0e4d256663e44c25db8e9705aff27ee322f3384","address":"0x009f1545923a5A1052Aa162F858e2b925863Cd3D","index":385,"change":false,"zone":"0x00","status":"UNUSED","derivationPath":"BIP44:external","account":0}, derived: {"address":"0x009f1545923a5A1052Aa162F858e2b925863Cd3D","pubKey":"0x02be08725a5cef5a8eb4bf27b3f0e4d256663e44c25db8e9705aff27ee322f3384","account":0,"index":385,"change":false,"zone":"0x00","status":"UNKNOWN","derivationPath":"BIP44:external","lastSyncedBlock":null} ]

Yes, this is intended. I just address status from "UNUSED" to "UNKNOWN" immediately after derivation as this better represents the status.

Copy link
Contributor

@alejoacosta74 alejoacosta74 left a comment

Choose a reason for hiding this comment

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

looks good

@rileystephens28 rileystephens28 merged commit 595201e into alpha Nov 27, 2024
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

Successfully merging this pull request may close these issues.

2 participants