• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Neptune-Crypto / neptune-core / 15778825012
75%

Build:
DEFAULT BRANCH: master
Ran 20 Jun 2025 01:17PM UTC
Jobs 1
Files 212
Run time 3min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

20 Jun 2025 12:17PM UTC coverage: 72.299% (+0.4%) from 71.873%
15778825012

push

github

Sword-Smith
Merge branch `jfs/separate_upgrader`

This merge works towards two goals:
- Improve the likelihood that weak computers have their transactions mined, and
- move closer to the vision of three-step mining as outlined here:
  https://talk.neptune.cash/t/thoughts-on-the-mempool-issue-and-upgrading/52/26

Three main changes:

    - Refactor mempool to never throw away PrimitiveWitness data.
    - Don't automatically run SingleProof's "update" branch when receiving a new
      block, but let "update" be handled by proof upgraders.
    - Add new task for upgraders: The updating of SingleProof backed transactions.

    Since ProofCollection-backed transactions cannot be updated to be valid under a new mutator set, we instead update them with their PrimitiveWitness if one such is present. A PrimitiveWitness will be present in the mempool if the transaction was initiated locally. Previously, a ProofCollection backed transaction would always throw out the PrimitiveWitness but with this change, the PrimitiveWitness is always preserved in the mempool, if it was ever present there (i.e. if the transaction was initiated locally).
    Replace TransactionOrigin in the mempool with an ordered UpgradePriority that can be used by proof upgraders to pick the most favorable transaction for proof upgrading -- this especially helps pick the best transaction for "update".
    Remove execution of the "update" branch from being done automatically by any composer when a new block is received to being a task that only the proof upgrader performs.
    Only locally initiated transactions (as checked by the presence of a primitive witness) are updated immediately after the receival of a new block.

The central part of the code to understand is, in my opinion, this loop in mempool's update_with_block, as it defined the rules for what to do with transactions that did not get mined in the new block.

Two questions are relevant for each transaction:
 - Should the transaction be updated ... (continued)

650 of 753 new or added lines in 19 files covered. (86.32%)

21 existing lines in 5 files now uncovered.

20624 of 28526 relevant lines covered (72.3%)

505014.56 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
2
66.67
0.0% src/models/blockchain/transaction/transaction_proof.rs
2
67.19
-0.05% src/rpc_server.rs
6
85.0
src/models/state/mempool/upgrade_priority.rs
12
70.0
-5.82% src/api/regtest/regtest_impl.rs
15
92.42
5.53% src/models/state/mempool.rs
17
63.27
2.09% src/main_loop.rs
17
34.62
src/main_loop/upgrade_incentive.rs
32
87.28
-1.07% src/main_loop/proof_upgrader.rs

Uncovered Existing Lines

Lines Coverage ∆ File
1
70.0
-5.82% src/api/regtest/regtest_impl.rs
1
87.28
-1.07% src/main_loop/proof_upgrader.rs
4
63.27
2.09% src/main_loop.rs
4
92.42
5.53% src/models/state/mempool.rs
11
83.56
-7.53% src/models/blockchain/transaction/utxo.rs
Jobs
ID Job ID Ran Files Coverage
1 15778825012.1 20 Jun 2025 01:17PM UTC 212
72.3
GitHub Action Run
Source Files on build 15778825012
  • Tree
  • List 212
  • Changed 27
  • Source Changed 22
  • Coverage Changed 22
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #15778825012
  • 3f7fb11b on github
  • Prev Build on master (#15765000684)
  • Next Build on master (#15781337044)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc