Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
3f1353f
test: pin BLS scheme behaviour ahead of the scheme refactor
PastaPastaPasta Nov 13, 2026
ddc5900
refactor(bls): replace bool scheme arguments with BLSScheme
PastaPastaPasta Nov 13, 2026
316d7dc
refactor(bls): stop reading the scheme flag for plain aggregation
PastaPastaPasta Nov 13, 2026
a63543b
refactor: derive the BLS scheme for consensus signature checks from t…
PastaPastaPasta Nov 13, 2026
64b29f0
feat(llmq): do not start a DKG for a quorum base before v19
PastaPastaPasta Nov 13, 2026
05b6e38
refactor(bls): sign and run live paths under the basic scheme only
PastaPastaPasta Nov 13, 2026
663075c
refactor(evo): take the operator key's encoding from its owner's version
PastaPastaPasta Nov 13, 2026
63a19e9
refactor(bls): remove the process-wide BLS scheme flag
PastaPastaPasta Nov 14, 2026
6cd9edd
refactor(llmq): name the scheme wherever commitment signatures are ve…
PastaPastaPasta Nov 14, 2026
537d8a7
test: lint where the legacy BLS scheme may be named, and document the…
PastaPastaPasta Nov 14, 2026
2eaa542
fix: idle DKG phase threads while snapshot background validation is i…
PastaPastaPasta Nov 4, 2026
d620dfb
fix(evo): pass snapshot-data and mismatch errors through generic catches
PastaPastaPasta Oct 15, 2026
d79c972
refactor(evo): add EvoDB view tokens and scopes
PastaPastaPasta Oct 15, 2026
941ae07
feat(dbwrapper): report LevelDB iterator read errors
PastaPastaPasta Nov 13, 2026
b1d540d
feat(evo): store snapshot-identity state in a generation namespace wi…
PastaPastaPasta Oct 15, 2026
242289b
fix(evo): partition Evo-derived caches by view
PastaPastaPasta Oct 15, 2026
84ffa6f
fix(evo): bind non-active paths and dispatcher boundaries explicitly
PastaPastaPasta Oct 15, 2026
696e588
feat(evo): reject unbound Evo reads during dual operation
PastaPastaPasta Oct 15, 2026
88a0bd1
fix(instantsend): skip only the islocks whose quorum is below the sna…
PastaPastaPasta Oct 31, 2026
6030b1a
fix(llmq): treat short scans of types not enabled up to the snapshot …
PastaPastaPasta Oct 31, 2026
d46a7e4
fix(interfaces): raise the Evo-unavailable warning once per operation…
PastaPastaPasta Oct 31, 2026
e3a732d
fix(node): keep an earlier invalid snapshot dir when finishing a reje…
PastaPastaPasta Oct 31, 2026
389583f
fix(validation): stop reading a rejected snapshot when its rejection …
PastaPastaPasta Oct 31, 2026
ea2b0fd
feat(evo): v4 snapshot with derived rotation dependencies and bootstr…
PastaPastaPasta Oct 15, 2026
b29fd1d
feat(evo): carry and consume the credit-pool window
PastaPastaPasta Oct 15, 2026
a5078b3
feat(evo): carry the header-proven base coinbase and use it for B+1 C…
PastaPastaPasta Oct 15, 2026
5fbc0b9
fix(evo): export the raw MNHF signal record at the base and derive th…
PastaPastaPasta Oct 16, 2026
f29a04f
fix(llmq): exact work modifiers and no silent degradation under the s…
PastaPastaPasta Oct 15, 2026
c75ab2f
feat(llmq): prove ChainLock and asset-unlock scan coverage
PastaPastaPasta Oct 15, 2026
4000bda
feat(rpc): emit the v4 evo section in dumptxoutset
PastaPastaPasta Oct 15, 2026
8539d28
feat(validation): require a matching evo pin; add regtest -assumeutxo…
PastaPastaPasta Oct 15, 2026
759a2b5
feat(validation): seed into an unpublished generation, dry-run, then …
PastaPastaPasta Oct 15, 2026
88ef72a
feat(validation): rebuild and compare the full evo section at completion
PastaPastaPasta Nov 10, 2026
9cb1dff
Merge bitcoin/bitcoin#27596: assumeutxo (2)
PastaPastaPasta Nov 8, 2026
449087d
Merge bitcoin/bitcoin#28589: test: assumeutxo func test race fixes
PastaPastaPasta Nov 8, 2026
d2c8c47
Merge bitcoin/bitcoin#28590: assumeutxo: change getchainstates RPC to…
PastaPastaPasta Nov 8, 2026
0b9b9d3
Merge bitcoin/bitcoin#28562: AssumeUTXO follow-ups
PastaPastaPasta Nov 8, 2026
d5b5d90
Merge bitcoin/bitcoin#28625: test: check that loading snapshot not ma…
PastaPastaPasta Nov 8, 2026
e22106f
Merge bitcoin/bitcoin#28639: refactor: Remove unused nchaintx from Sn…
PastaPastaPasta Nov 8, 2026
f99c582
Merge bitcoin/bitcoin#28652: assumeutxo: fail early if snapshot block…
PastaPastaPasta Nov 8, 2026
d22e140
Merge bitcoin/bitcoin#28647: test: Add assumeutxo test for wrong hash
PastaPastaPasta Nov 8, 2026
5b51fda
Merge bitcoin/bitcoin#28666: test: assumeutxo file with unknown block…
PastaPastaPasta Nov 8, 2026
245f243
Merge bitcoin/bitcoin#28669: test: check assumeutxo file for changed …
PastaPastaPasta Nov 8, 2026
d44a137
test: add the feature_assumeutxo.py cases of bitcoin#28685
PastaPastaPasta Nov 8, 2026
aac3fdc
Merge bitcoin/bitcoin#28698: assumeutxo, blockstorage: Prevent core d…
PastaPastaPasta Nov 8, 2026
1f743c2
Merge bitcoin/bitcoin#28835: test: Check error details with assert_de…
PastaPastaPasta Nov 8, 2026
55a3ef8
Merge bitcoin/bitcoin#28838: test: add assumeutxo wallet test
PastaPastaPasta Nov 8, 2026
71e9a8c
Merge bitcoin/bitcoin#31556: validation: Send correct notification du…
PastaPastaPasta Nov 8, 2026
4fb08e8
feat(validation): refuse snapshots on pruned nodes, masternodes and w…
PastaPastaPasta Nov 8, 2026
011c848
fix(governance): wait for the collateral index to follow the active c…
PastaPastaPasta Nov 8, 2026
a9db418
fix(validation): serialize snapshot activations
PastaPastaPasta Nov 8, 2026
7e21d38
fix(validation): replace a leftover chainstate_todelete at promotion
PastaPastaPasta Nov 8, 2026
c96a614
fix(validation): keep the validated chainstate's block candidates whe…
PastaPastaPasta Nov 9, 2026
0bba96a
Merge bitcoin/bitcoin#30388: validation: Check if mempool exists befo…
PastaPastaPasta Nov 9, 2026
d4d2f5c
fix(validation): detach the mempool when a snapshot is rejected
PastaPastaPasta Nov 9, 2026
e2d8704
fix(validation): stop loading a mempool file once its chainstate no l…
PastaPastaPasta Nov 9, 2026
d682df5
test: retry InstantSend conflicts that a snapshot stall deferred
PastaPastaPasta Nov 9, 2026
57a2fff
test: add an end-to-end AssumeUTXO test on a Dash masternode network
PastaPastaPasta Nov 9, 2026
f891476
fix(qt): clear the wizard's state-unavailable label once masternode s…
PastaPastaPasta Nov 9, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,11 @@ Be extra careful around:
- governance object and superblock payment logic;
- EvoDB, credit-pool, asset-lock, and Platform integration code;
- network-message serialization, checksums, and partial-send paths;
- BLS scheme transitions across connect, disconnect, undo, and activation
boundaries;
- BLS schemes: an unnamed scheme is basic; legacy is selected by a payload's
version (encoding) or by the block being validated (signature verification).
Uniqueness checks also probe both encodings, and RPC or log code may print or
parse a key or signature in either one. See "BLS schemes" in
`doc/developer-notes.md`;
- future DKG/quorum prediction, which must evaluate quorum availability at the
relevant future work/cycle base instead of only the current tip;
- time, mocktime, scheduler, and interrupt/shutdown behavior.
Expand Down
24 changes: 19 additions & 5 deletions doc/design/assumeutxo.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,27 @@
# assumeutxo

Assumeutxo is a feature that allows fast bootstrapping of a validating dashd
instance with a very similar security model to assumevalid.
instance.

## Loading a snapshot

There is currently no canonical source for snapshots, but any downloaded snapshot
will be checked against a hash that's been hardcoded in source code.

Once you've obtained the snapshot, you can use the RPC command `loadtxoutset`
(yet to be merged) to load it.
to load it. `loadtxoutset` and `getchainstates` are hidden and available on
regtest only.

A masternode does not load snapshots, and a node does not start with
`-masternodeblsprivkey` while it has a snapshot chainstate, validated or not,
until a restart has promoted it.

### Pruning

A pruned node can load a snapshot. To save space, it's possible to delete the
snapshot file as soon as `loadtxoutset` finishes.
A pruned node cannot load a snapshot, and a node does not start with `-prune`
while it has a snapshot chainstate, validated or not, until a restart has
promoted it. It's possible to delete the snapshot file as soon as
`loadtxoutset` finishes.

The minimum `-dbcache` setting is 550 MiB, but this functionality ignores that
minimum and uses at least 1100 MiB.
Expand All @@ -25,10 +32,17 @@ downloaded snapshot).

### Indexes

Indexes work but don't take advantage of this feature. They always start building
A node with `-addressindex`, `-spentindex` or `-timestampindex` cannot load a
snapshot, and does not start with them while it has a snapshot chainstate.

Other indexes work but don't take advantage of this feature. They always start building
from the genesis block. Once the background validation reaches the snapshot block,
indexes will continue to build all the way to the tip.

Governance waits until background validation has completed and the governance
collateral index has caught up: until then the node neither processes nor relays
governance objects, and `gobject prepare` and `gobject submit` refuse.

For indexes that support pruning, note that no pruning will take place between
the snapshot and the tip, until the background sync has completed - after which
everything is pruned. Depending on how old the snapshot is, this may temporarily
Expand Down
31 changes: 31 additions & 0 deletions doc/developer-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Developer Notes
- [DEBUG_LOCKORDER](#debug_lockorder)
- [DEBUG_LOCKCONTENTION](#debug_lockcontention)
- [Assertions and Checks](#assertions-and-checks)
- [BLS schemes](#bls-schemes)
- [Valgrind suppressions file](#valgrind-suppressions-file)
- [Compiling for test coverage](#compiling-for-test-coverage)
- [Performance profiling with perf](#performance-profiling-with-perf)
Expand Down Expand Up @@ -502,6 +503,36 @@ assert; use `Assume` for our *own* bookkeeping while still handling the
violated case; and reserve `assert` for the narrow spot where continuing would
corrupt EvoDB, the block index, or the wallet.

### BLS schemes

BLS public keys and signatures have two encodings and two signature schemes: the
legacy one used before v19, and the basic one used since. Which one applies is a
property of the data or of the block, never of the node:

- A call that names no scheme is basic. That is the right choice for everything
that is not historical: P2P messages, DKG, signing, ChainLocks, InstantSend,
governance, and any new payload or message.
- The encoding of a key or signature inside a versioned structure follows that
structure's version. Use the helper of its owner (`ProTxVersion::GetBLSScheme()`,
`CFinalCommitment::GetBLSScheme()`, `OperatorKeyScheme()`) rather than comparing
versions inline.
- The scheme a signature in a block is *verified* under follows the block, not the
version of the payload carrying it: `BLSSchemeAfter(pindexPrev, params)`, which
provider transaction checks receive as `SpecialTxRules::bls_scheme`. A
legacy-encoded payload mined after v19 is verified under basic.
- Production code cannot sign under the legacy scheme. Tests that need a legacy
signature for historical validation use `SignBLS()` from `test/util/bls.h`.
- An operator key (`CBLSLazyPublicKey`) has no encoding of its own, so
serializing, hashing or printing one always names the scheme, taken from the
payload or masternode state that owns it.
- Two other kinds of code name legacy explicitly: operator-key uniqueness
checks, which probe both encodings, and RPC or log code that prints or parses
a key or signature in either encoding.

`test/lint/lint-bls-scheme.py` lists the files that may name `BLSScheme::Legacy`:
version and block selection, those uniqueness probes, legacy-diff migration, and
the RPC or log code that prints or parses either encoding.

### Valgrind suppressions file

Valgrind is a programming tool for memory debugging, memory leak detection, and
Expand Down
16 changes: 16 additions & 0 deletions doc/release-notes-7593.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Updated RPCs
------------

- On a pruned node, `quorum info`, `quorum memberof` and `quorum selectquorum`
fail with `RPC_INTERNAL_ERROR` for a quorum whose members this node cannot
compute because the block that fixes them was pruned. They used to work with
members computed from a substitute value, which could be wrong. (#7593)

Other changes
-------------

- A pruned node no longer substitutes the block hash for the quorum score
modifier of a pruned work block. It keeps such a quorum's public key, from
its mined commitment, without members, so it still verifies signatures
by that quorum (for example on masternode hard-fork signals) and never
stalls on them. (#7593)
39 changes: 39 additions & 0 deletions doc/release-notes-7887.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
Updated RPCs
------------

- An RPC that fails with an error because this node cannot read the
masternode, quorum or other Evo state it needs, for example because the
block data it is derived from was pruned, now returns error code
`RPC_INTERNAL_ERROR` (-32603) instead of `RPC_MISC_ERROR` (-1). The request
was not at fault. The package RPCs report such a failure as described
below. (#7887)

- `testmempoolaccept` with more than one transaction reports such a failure as
the `package-error` `evo-local-unavailable`, and `submitpackage` fails with
that reason. (#7887)

Other changes
-------------

- A block this node has stored but cannot read back while deriving the credit
pool or the EHF signals no longer makes the block being validated invalid.
The node shuts down with a "Failed to read block" error instead, as it does
when it cannot read a block it is connecting. (#7887)

- On a node without an assumeutxo snapshot, a warning about Evo state that
cannot be derived because block data was pruned now says so and suggests
restarting with `-reindex`. Startup still fails when the EHF signals at the
tip cannot be rebuilt. (#7887)

- On a pruned node, a block whose masternode, quorum or other Evo state
depends on block data that was pruned is no longer marked invalid, which
left the node on a local fork until `reconsiderblock`. The node now stops
advancing at that block, logs an error and shows a warning that block data
was pruned; restart with `-reindex` to download it again. (#7887)

- Developers: on regtest, every Evo database access must now be bound to a
chainstate's view (the hidden `-checkevobinding` option, on by default
there). A code path that reads Evo state without a binding fails with an
internal error, a dropped task or a stalled chainstate instead of reading
the default view. Local regtest networks run with it unless started with
`-checkevobinding=0`. (#7887)
4 changes: 2 additions & 2 deletions doc/zmq.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,11 @@ Where the 8-byte uints correspond to the mempool sequence number.
| hashtx | <32-byte transaction hash in Little Endian> | <uint32 sequence number in Little Endian>


`rawblock`: Notifies when the chain tip is updated. Messages are ZMQ multipart messages with three parts. The first part is the topic (`rawblock`), the second part is the serialized block, and the last part is a sequence number (representing the message count to detect lost messages).
`rawblock`: Notifies when the chain tip is updated. When assumeutxo is in use, this notification will not be issued for historical blocks connected to the background validation chainstate. Messages are ZMQ multipart messages with three parts. The first part is the topic (`rawblock`), the second part is the serialized block, and the last part is a sequence number (representing the message count to detect lost messages).

| rawblock | <serialized block> | <uint32 sequence number in Little Endian>

`hashblock`: Notifies when the chain tip is updated. Messages are ZMQ multipart messages with three parts. The first part is the topic (`hashblock`), the second part is the 32-byte block hash, and the last part is a sequence number (representing the message count to detect lost messages).
`hashblock`: Notifies when the chain tip is updated. When assumeutxo is in use, this notification will not be issued for historical blocks connected to the background validation chainstate. Messages are ZMQ multipart messages with three parts. The first part is the topic (`hashblock`), the second part is the 32-byte block hash, and the last part is a sequence number (representing the message count to detect lost messages).

| hashblock | <32-byte block hash in Little Endian> | <uint32 sequence number in Little Endian>

Expand Down
9 changes: 9 additions & 0 deletions src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -235,10 +235,13 @@ BITCOIN_CORE_H = \
evo/simplifiedmns.h \
evo/smldiff.h \
evo/snapshot.h \
evo/snapshot_config.h \
evo/snapshot_types.h \
evo/specialtx.h \
evo/specialtx_filter.h \
evo/specialtxman.h \
evo/types.h \
evo/viewcache.h \
external_signer.h \
flat-database.h \
flatfile.h \
Expand Down Expand Up @@ -570,6 +573,8 @@ libbitcoin_node_a_SOURCES = \
evo/simplifiedmns.cpp \
evo/smldiff.cpp \
evo/snapshot.cpp \
evo/snapshot_chain.cpp \
evo/snapshot_config.cpp \
evo/specialtx.cpp \
evo/specialtx_filter.cpp \
evo/specialtxman.cpp \
Expand Down Expand Up @@ -955,6 +960,7 @@ libbitcoin_consensus_a_SOURCES = \
arith_uint256.h \
bls/bls.cpp \
bls/bls.h \
bls/scheme.h \
consensus/amount.h \
consensus/merkle.cpp \
consensus/merkle.h \
Expand Down Expand Up @@ -1311,6 +1317,9 @@ libdashkernel_la_SOURCES = \
evo/providertx_util.cpp \
evo/simplifiedmns.cpp \
evo/smldiff.cpp \
evo/snapshot.cpp \
evo/snapshot_chain.cpp \
evo/snapshot_config.cpp \
evo/specialtx.cpp \
evo/specialtx_filter.cpp \
evo/specialtxman.cpp \
Expand Down
3 changes: 3 additions & 0 deletions src/Makefile.test_util.include
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ EXTRA_LIBRARIES += \
$(LIBTEST_UTIL)

TEST_UTIL_H = \
test/util/bls.h \
test/util/blockfilter.h \
test/util/chainstate.h \
test/util/coins.h \
test/util/evo_snapshot.h \
test/util/json.h \
test/util/index.h \
test/util/llmq_tests.h \
Expand All @@ -35,6 +37,7 @@ endif # ENABLE_WALLET
libtest_util_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(BOOST_CPPFLAGS)
libtest_util_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
libtest_util_a_SOURCES = \
test/util/bls.cpp \
test/util/blockfilter.cpp \
test/util/index.cpp \
test/util/coins.cpp \
Expand Down
42 changes: 20 additions & 22 deletions src/active/dkgsession.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ ActiveDKGSession::ActiveDKGSession(CBLSWorker& bls_worker, CDeterministicMNManag
CDKGSession(bls_worker, dmnman, dkgdbgman, qdkgsman, qsnapman, chainman, base_block_index, llmq_params),
m_mn_metaman{mn_metaman},
m_mn_activeman{mn_activeman},
m_sporkman{sporkman},
m_use_legacy_bls{!DeploymentActiveAfter(m_quorum_base_block_index, Params().GetConsensus(), Consensus::DEPLOYMENT_V19)}
m_sporkman{sporkman}
{
}

Expand Down Expand Up @@ -125,7 +124,7 @@ std::optional<CDKGContribution> ActiveDKGSession::SendContributions()

logger.Batch("encrypted contributions. time=%d", t1.count());

qc.sig = m_mn_activeman.Sign(qc.GetSignHash(), m_use_legacy_bls);
qc.sig = m_mn_activeman.Sign(qc.GetSignHash());

logger.Flush();

Expand Down Expand Up @@ -157,7 +156,6 @@ void ActiveDKGSession::VerifyPendingContributions()
std::vector<size_t> memberIndexes;
std::vector<BLSVerificationVectorPtr> vvecs;
std::vector<CBLSSecretKey> skContributions;
bool anyLegacyVvec{false};

for (const auto& idx : pendingContributionVerifications) {
const auto& m = members[idx];
Expand All @@ -166,7 +164,6 @@ void ActiveDKGSession::VerifyPendingContributions()
}
memberIndexes.emplace_back(idx);
vvecs.emplace_back(receivedVvecs[idx]);
anyLegacyVvec |= receivedVvecsLegacyScheme[idx];
skContributions.emplace_back(receivedSkContributions[idx]);
// Write here to definitely store one contribution for each member no matter if
// our share is valid or not, could be that others are still correct
Expand All @@ -184,9 +181,8 @@ void ActiveDKGSession::VerifyPendingContributions()
return;
}

// Weighted aggregation needs points that passed subgroup checks, which legacy-scheme deserialization skips
auto result = blsWorker.VerifyContributionShares(myId, vvecs, skContributions, /*parallel=*/true,
/*aggregated=*/!anyLegacyVvec);
/*aggregated=*/true);
if (result.size() != memberIndexes.size()) {
logger.Batch("VerifyContributionShares returned result of size %d but size %d was expected, something is wrong", result.size(), memberIndexes.size());
return;
Expand Down Expand Up @@ -348,7 +344,7 @@ std::optional<CDKGComplaint> ActiveDKGSession::SendComplaint()

logger.Batch("sending complaint. badCount=%d, complaintCount=%d", badCount, complaintCount);

qc.sig = m_mn_activeman.Sign(qc.GetSignHash(), m_use_legacy_bls);
qc.sig = m_mn_activeman.Sign(qc.GetSignHash());

logger.Flush();

Expand Down Expand Up @@ -438,7 +434,7 @@ std::optional<CDKGJustification> ActiveDKGSession::SendJustification(const Uint2
return std::nullopt;
}

qj.sig = m_mn_activeman.Sign(qj.GetSignHash(), m_use_legacy_bls);
qj.sig = m_mn_activeman.Sign(qj.GetSignHash());

logger.Flush();

Expand Down Expand Up @@ -595,23 +591,24 @@ std::optional<CDKGPrematureCommitment> ActiveDKGSession::SendCommitment()
(*qc.quorumVvecHash.begin())++;
}

uint256 commitmentHash = BuildCommitmentHash(qc.llmqType, qc.quorumHash, qc.validMembers, qc.quorumPublicKey, qc.quorumVvecHash);
uint256 commitmentHash = BuildCommitmentHash(qc.llmqType, qc.quorumHash, qc.validMembers, qc.quorumPublicKey,
qc.quorumVvecHash, BLSScheme::Basic);

if (lieType == 2) {
(*commitmentHash.begin())++;
}

qc.sig = m_mn_activeman.Sign(commitmentHash, m_use_legacy_bls);
qc.quorumSig = skShare.Sign(commitmentHash, m_use_legacy_bls);
qc.sig = m_mn_activeman.Sign(commitmentHash);
qc.quorumSig = skShare.Sign(commitmentHash);

if (lieType == 3) {
auto buf = qc.sig.ToBytes(m_use_legacy_bls);
auto buf = qc.sig.ToBytes();
buf[5]++;
qc.sig.SetBytes(buf, m_use_legacy_bls);
qc.sig.SetBytes(buf);
} else if (lieType == 4) {
auto buf = qc.quorumSig.ToBytes(m_use_legacy_bls);
auto buf = qc.quorumSig.ToBytes();
buf[5]++;
qc.quorumSig.SetBytes(buf, m_use_legacy_bls);
qc.quorumSig.SetBytes(buf);
}

t3.stop();
Expand Down Expand Up @@ -686,7 +683,8 @@ std::vector<CFinalCommitment> ActiveDKGSession::FinalizeCommitments()
fqc.nVersion = CFinalCommitment::GetVersion(isQuorumRotationEnabled, DeploymentActiveAfter(m_quorum_base_block_index, m_chainman.GetConsensus(), Consensus::DEPLOYMENT_V19));
fqc.quorumIndex = isQuorumRotationEnabled ? quorumIndex : 0;

uint256 commitmentHash = BuildCommitmentHash(fqc.llmqType, fqc.quorumHash, fqc.validMembers, fqc.quorumPublicKey, fqc.quorumVvecHash);
uint256 commitmentHash = BuildCommitmentHash(fqc.llmqType, fqc.quorumHash, fqc.validMembers,
fqc.quorumPublicKey, fqc.quorumVvecHash, BLSScheme::Basic);

std::vector<CBLSSignature> aggSigs;
std::vector<CBLSPublicKey> aggPks;
Expand Down Expand Up @@ -722,7 +720,7 @@ std::vector<CFinalCommitment> ActiveDKGSession::FinalizeCommitments()
t2.stop();

cxxtimer::Timer t3(true);
if (!fqc.Verify({m_dmnman, m_qsnapman, m_chainman, m_quorum_base_block_index}, true)) {
if (!fqc.Verify({m_dmnman, m_qsnapman, m_chainman, m_quorum_base_block_index}, BLSScheme::Basic)) {
logger.Batch("failed to verify final commitment");
continue;
}
Expand Down Expand Up @@ -773,16 +771,16 @@ CFinalCommitment ActiveDKGSession::FinalizeSingleCommitment()
fqc.quorumIndex = 0;

uint256 commitmentHash = BuildCommitmentHash(fqc.llmqType, fqc.quorumHash, fqc.validMembers, fqc.quorumPublicKey,
fqc.quorumVvecHash);
fqc.quorumSig = sk1.Sign(commitmentHash, m_use_legacy_bls);
fqc.quorumVvecHash, BLSScheme::Basic);
fqc.quorumSig = sk1.Sign(commitmentHash);

fqc.membersSig = m_mn_activeman.Sign(commitmentHash, m_use_legacy_bls);
fqc.membersSig = m_mn_activeman.Sign(commitmentHash);

if (workaround_qpublic_key) {
fqc.quorumSig = fqc.membersSig;
}

if (!fqc.Verify({m_dmnman, m_qsnapman, m_chainman, m_quorum_base_block_index}, true)) {
if (!fqc.Verify({m_dmnman, m_qsnapman, m_chainman, m_quorum_base_block_index}, BLSScheme::Basic)) {
logger.Batch("failed to verify final commitment");
assert(false);
}
Expand Down
1 change: 0 additions & 1 deletion src/active/dkgsession.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ class ActiveDKGSession final : public llmq::CDKGSession
CMasternodeMetaMan& m_mn_metaman;
const CActiveMasternodeManager& m_mn_activeman;
const CSporkManager& m_sporkman;
const bool m_use_legacy_bls{false};

public:
ActiveDKGSession() = delete;
Expand Down
Loading
Loading