Skip to content

feat: support a new dashcore version - #1368

Merged
markin-io merged 4 commits into
v0.25-devfrom
chore/update-dashcore-rust
Sep 7, 2023
Merged

markin-io merged 4 commits into
v0.25-devfrom
chore/update-dashcore-rust

Conversation

@markin-io

Copy link
Copy Markdown
Contributor

Issue being fixed or feature implemented

Rework of #1174

What was done?

How Has This Been Tested?

Breaking Changes

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have made corresponding changes to the documentation

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

@markin-io
markin-io marked this pull request as draft September 6, 2023 11:42
@markin-io
markin-io marked this pull request as ready for review September 6, 2023 18:25

@shumkov shumkov left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

👍

@markin-io
markin-io merged commit dc9e38d into v0.25-dev Sep 7, 2023
@markin-io
markin-io deleted the chore/update-dashcore-rust branch September 7, 2023 14:03
@thephez thephez added this to the v0.25.0 milestone Oct 11, 2023
PastaPastaPasta added a commit that referenced this pull request Nov 25, 2026
…lock

rust-dashcore #1368 checks a block again within one
process_block_for_wallets call until it derives nothing more. A
transaction paying past the gap, or paying an address a later
transaction of the same block derives, is now credited and reported as
inserted on the block's first call, so its coins reach new_utxos
without this branch's change. Three bridge tests built their re-scan
pass from that in-block shape, so the first call now credited the far
output and their premise no longer held.

They now take the far output's address from a later block: block 100
pays index 0 and the far index, block 101 extends the pool over it, and
block 100 is processed again, as dash-spv's filter rescan does. That
pass credits the far output to a record the wallet already holds, and
the event names it as updated, which derives no coins. The assertions
are kept: a coin spent before the bridge sees the re-scan is never sent
as unspent, and its record now always carries the ObservedSpent
verdict; a re-scan after a later spend sends only the coin still held,
and no coin of another block; another account's coins at the same
height are re-sent unchanged.

A new bridge test re-scans the funding block after a ChainLock covers
it: key-wallet credits the far output of the finalized transaction, and
the coin reaches the changesets as a confirmed coin of that block.

The storage suite gains the same shape end to end: the far coin a
re-scan of an earlier block credits has an unspent row, and a reload
restores it and the balance.

The comments now say that the wallet's held set wins over a spent row
in the store, and that the coins are read as the wallet is at drain
time.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
PastaPastaPasta added a commit that referenced this pull request Nov 25, 2026
…ter a restart

Each case now runs through the event adapter into SQLite, reopens the
store and checks which coins the wallet holds and its balance:

- With rust-dashcore #1368, one block paying both the far output and the
  transaction that derives its address: a far coin spent in the next
  block stays spent; a coin spent later stays spent when its block is
  delivered again; the coins of two accounts reload into their accounts.
- A far coin only a re-scan of an earlier block credits, and a mempool
  transaction confirmed after its pools grew: every coin is held and
  counted.
- The re-scan shape with a spend: a far coin spent before its re-scan is
  stored stays spent, and a coin spent before the re-scan stays spent
  while the far coin is held.
- A far coin the store already holds as spent stays spent when a
  re-scan re-sends it, and a spent sweep placeholder is materialised,
  survives the tombstone collector and still reads spent to a later
  re-scan.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
PastaPastaPasta added a commit that referenced this pull request Nov 25, 2026
…lock

rust-dashcore #1368 checks a block again within one
process_block_for_wallets call until it derives nothing more. A
transaction paying past the gap, or paying an address a later
transaction of the same block derives, is now credited and reported as
inserted on the block's first call, so its coins reach new_utxos
without this branch's change. Three bridge tests built their re-scan
pass from that in-block shape, so the first call now credited the far
output and their premise no longer held.

They now take the far output's address from a later block: block 100
pays index 0 and the far index, block 101 extends the pool over it, and
block 100 is processed again, as dash-spv's filter rescan does. That
pass credits the far output to a record the wallet already holds, and
the event names it as updated, which derives no coins. The assertions
are kept: a coin spent before the bridge sees the re-scan is never sent
as unspent, and its record now always carries the ObservedSpent
verdict; a re-scan after a later spend sends only the coin still held,
and no coin of another block; another account's coins at the same
height are re-sent unchanged.

A new bridge test re-scans the funding block after a ChainLock covers
it: key-wallet credits the far output of the finalized transaction, and
the coin reaches the changesets as a confirmed coin of that block.

The storage suite gains the same shape end to end: the far coin a
re-scan of an earlier block credits has an unspent row, and a reload
restores it and the balance.

The comments now say that the wallet's held set wins over a spent row
in the store, and that the coins are read as the wallet is at drain
time.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
PastaPastaPasta added a commit that referenced this pull request Nov 25, 2026
…ter a restart

Each case now runs through the event adapter into SQLite, reopens the
store and checks which coins the wallet holds and its balance:

- With rust-dashcore #1368, one block paying both the far output and the
  transaction that derives its address: a far coin spent in the next
  block stays spent; a coin spent later stays spent when its block is
  delivered again; the coins of two accounts reload into their accounts.
- A far coin only a re-scan of an earlier block credits, and a mempool
  transaction confirmed after its pools grew: every coin is held and
  counted.
- The re-scan shape with a spend: a far coin spent before its re-scan is
  stored stays spent, and a coin spent before the re-scan stays spent
  while the far coin is held.
- A far coin the store already holds as spent stays spent when a
  re-scan re-sends it, and a spent sweep placeholder is materialised,
  survives the tombstone collector and still reads spent to a later
  re-scan.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
PastaPastaPasta added a commit that referenced this pull request Nov 29, 2026
…lock

rust-dashcore #1368 checks a block again within one
process_block_for_wallets call until it derives nothing more. A
transaction paying past the gap, or paying an address a later
transaction of the same block derives, is now credited and reported as
inserted on the block's first call, so its coins reach new_utxos
without this branch's change. Three bridge tests built their re-scan
pass from that in-block shape, so the first call now credited the far
output and their premise no longer held.

They now take the far output's address from a later block: block 100
pays index 0 and the far index, block 101 extends the pool over it, and
block 100 is processed again, as dash-spv's filter rescan does. That
pass credits the far output to a record the wallet already holds, and
the event names it as updated, which derives no coins. The assertions
are kept: a coin spent before the bridge sees the re-scan is never sent
as unspent, and its record now always carries the ObservedSpent
verdict; a re-scan after a later spend sends only the coin still held,
and no coin of another block; another account's coins at the same
height are re-sent unchanged.

A new bridge test re-scans the funding block after a ChainLock covers
it: key-wallet credits the far output of the finalized transaction, and
the coin reaches the changesets as a confirmed coin of that block.

The storage suite gains the same shape end to end: the far coin a
re-scan of an earlier block credits has an unspent row, and a reload
restores it and the balance.

The comments now say that the wallet's held set wins over a spent row
in the store, and that the coins are read as the wallet is at drain
time.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
PastaPastaPasta added a commit that referenced this pull request Nov 29, 2026
…ter a restart

Each case now runs through the event adapter into SQLite, reopens the
store and checks which coins the wallet holds and its balance:

- With rust-dashcore #1368, one block paying both the far output and the
  transaction that derives its address: a far coin spent in the next
  block stays spent; a coin spent later stays spent when its block is
  delivered again; the coins of two accounts reload into their accounts.
- A far coin only a re-scan of an earlier block credits, and a mempool
  transaction confirmed after its pools grew: every coin is held and
  counted.
- The re-scan shape with a spend: a far coin spent before its re-scan is
  stored stays spent, and a coin spent before the re-scan stays spent
  while the far coin is held.
- A far coin the store already holds as spent stays spent when a
  re-scan re-sends it, and a spent sweep placeholder is materialised,
  survives the tombstone collector and still reads spent to a later
  re-scan.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.

3 participants