Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/dashevo/dashj into featur…
Browse files Browse the repository at this point in the history
…e-coinjoin
  • Loading branch information
HashEngineering committed Dec 12, 2023
2 parents bb884b2 + 0ce9035 commit c25f04c
Show file tree
Hide file tree
Showing 10 changed files with 119 additions and 120 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,7 @@ public EnumSet<Script.VerifyFlag> getTransactionVerificationFlags(final Block bl
public abstract int getProtocolVersionNum(final ProtocolVersion version);

public static enum ProtocolVersion {
MINIMUM(70228),
MINIMUM(70230),
PONG(60001),
BLOOM_FILTER(MINIMUM.getBitcoinProtocolVersion()),
BLOOM_FILTER_BIP111(MINIMUM.getBitcoinProtocolVersion()+1),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ protected void progress(double pct, int blocksSoFar, Date date) {

if (lastMasternodeListStage.ordinal() > Stage.BeforeStarting.ordinal() &&
lastMasternodeListStage.ordinal() < Stage.Complete.ordinal()) {
log.info(String.format(Locale.US, "Chain download %d%% done. Processing Masternode Lists...", (int) pct));
log.info(String.format(Locale.US, "Chain download %d%% done while processing Masternode Lists: %s", (int) pct, lastMasternodeListStage));
} else if (!requiresHeaders || headersCaughtUp) {
log.info(String.format(Locale.US, "Chain download %d%% done with %d blocks to go, block date %s", (int) pct, blocksSoFar,
Utils.dateTimeFormat(date)));
Expand Down
4 changes: 2 additions & 2 deletions core/src/main/java/org/bitcoinj/evolution/CoinbaseTx.java
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ public int getCurrentVersion() {
}

public String toString() {
return String.format("CoinbaseTx(height=%d, merkleRootMNList=%s, merkleRootQuorums=%s)",
height, merkleRootMasternodeList.toString(), merkleRootQuorums);
return String.format("CoinbaseTx(v%d, height=%d, merkleRootMNList=%s, merkleRootQuorums=%s)",
version, height, merkleRootMasternodeList.toString(), merkleRootQuorums);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -407,8 +407,12 @@ public void setBlockChain(DualBlockChain blockChain, @Nullable PeerGroup peerGro
@Override
public void close() {
if (shouldProcessMNListDiff()) {
// TODO: refactor the next several lines into AbstractQuorumState.close(...)
quorumState.removeEventListeners(blockChain.getBlockChain(), peerGroup);
quorumRotationState.removeEventListeners(blockChain.getBlockChain(), peerGroup);
// reset state of chain sync
quorumState.initChainTipSyncComplete = false;
quorumRotationState.initChainTipSyncComplete = false;

try {
threadPool.shutdown();
Expand Down
101 changes: 50 additions & 51 deletions core/src/main/java/org/bitcoinj/params/MainNetParams.java
Original file line number Diff line number Diff line change
Expand Up @@ -109,32 +109,37 @@ public MainNetParams() {
// If an Http Seeder is set up, add it here. References: HttpDiscovery
httpSeeds = null;

// updated with Dash Core 19.2 seed list
// updated with Dash Core 20.0.0 seed list
addrSeeds = new int[] {
0xddd53802,
0x41e02303,
0xa947d303,
0xf22be403,
0xbe430205,
0x22ed0905,
0x13672305,
0x19672305,
0x21484e05,
0xf36d4f05,
0xe12c6505,
0x4f6ea105,
0x077ea105,
0x38e1af05,
0x12cab505,
0x6e3fbc05,
0x5091bd05,
0xc06aff05,
0x788ceb0f,
0x09f48b12,
0x94819d12,
0xa645cc12,
0x2af65117,
0x0a855317,
0xc4855317,
0xcb00a317,
0x24610a1f,
0x6863941f,
0x3204b21f,
0x2e4de52b,
0x15e36125,
0xd663f02c,
0x91f8082d,
0x9afa082d,
0x40b60b2d,
0x1818212d,
0xf93d212d,
0x40383a2d,
Expand All @@ -144,40 +149,40 @@ public MainNetParams() {
0x6c9e472d,
0x689f472d,
0x5b534c2d,
0xcfa94d2d,
0x33574c2d,
0x7a7a532d,
0x2d75552d,
0xca75552d,
0x9aa2562d,
0x2aa3562d,
0x90a3562d,
0xd95e5b2d,
0xc9138c2d,
0x7fa2042e,
0xbff10a2e,
0xbdbd1e2e,
0xd5bd1e2e,
0xd6bd1e2e,
0xfbbd1e2e,
0xf228242e,
0x091f482e,
0x79e7942e,
0x04f1fe2e,
0x06f1fe2e,
0x18f1fe2e,
0x16f1fe2e,
0x1cf1fe2e,
0xa66d6d2f,
0xc538f32f,
0x5baf1132,
0xb70e7432,
0xce600f33,
0x2a750f33,
0x5f1e5933,
0x409b4433,
0xeda99e33,
0x075bc333,
0xac092134,
0x3c8dca34,
0x60b9a436,
0x2bdada36,
0xa6e06e3a,
0x45f3f442,
0x46f3f442,
0xd76b3d45,
0x8307244b,
0x8407244b,
0x8507244b,
0x0463df4d,
0x0013534e,
Expand All @@ -186,120 +191,113 @@ public MainNetParams() {
0xc2b85a50,
0xaaead150,
0x8acfd350,
0x8bddd350,
0xe784f050,
0x76f00251,
0xe131b151,
0x098eb151,
0x64a6b151,
0x8ea6b151,
0x33fae351,
0x53e6ca52,
0x1715d352,
0xb315d352,
0x6919d352,
0xc119d352,
0x2863ef53,
0x11320954,
0x34743454,
0xccb3f254,
0x5bf81155,
0xb158c155,
0x23f1d155,
0x47f1d155,
0xbaf1d155,
0xbcf1d155,
0xbef1d155,
0xca6bd755,
0x56fd6257,
0x712cf957,
0xf3684959,
0x1f0b895b,
0xb94c155d,
0x658cbe5d,
0x6ac0f95e,
0x80c0f95e,
0xb7c0f95e,
0x8d33b75f,
0x6234b75f,
0x2c35b75f,
0x08c4d35f,
0x20c4d35f,
0x2ec4d35f,
0x22c4d35f,
0xdb5fa067,
0xe15fa067,
0xf95fa067,
0xe89fe168,
0x5ed8e168,
0x7223ee68,
0x7423ee68,
0x1609376a,
0x5a18a16b,
0x5f41eb6d,
0x7241eb6d,
0xaa45eb6d,
0x8546eb6d,
0xa640c17b,
0x9fb5c780,
0xbae9a282,
0x40e51285,
0x081c448a,
0x22d2ee8c,
0x6b355f8d,
0x5fcdca8e,
0xa67f5b90,
0xa78e7e90,
0x421c8391,
0x441c8391,
0xd61d8391,
0x602a8391,
0xb014ef91,
0x06309e96,
0xe4454398,
0x8b487397,
0x4aa2659e,
0x1ca8659e,
0x87ea16a5,
0x3e4f56a7,
0x045077a8,
0xf155eba8,
0x315deba8,
0xbe68eba8,
0x87aa4baa,
0x7a15f9ad,
0xcbe922ae,
0xcce922ae,
0xcee922ae,
0xcfe922ae,
0xdc115eb0,
0x914166b0,
0xc6397bb0,
0xcb397bb0,
0xcd397bb0,
0xce397bb0,
0x75eb3eb2,
0x81793fb2,
0xccfe80b2,
0x7e5b9db2,
0xb05b9db2,
0xb35b9db2,
0x0c029fb2,
0xd557d0b2,
0xe257d0b2,
0xaa973eb9,
0xae973eb9,
0x90d48eb9,
0x22639bb9,
0x55a3a4b9,
0xdaa3a4b9,
0x75aba5b9,
0x289eafb9,
0xda39c6b9,
0xc108c9b9,
0x2218d5b9,
0x7153e4b9,
0x9c53e4b9,
0xdb73f3b9,
0x5edf44bc,
0x28e67fbc,
0xf3ed7fbc,
0x844fe1bc,
0xdba634c0,
0x8c5340c0,
0x5706a9c0,
0x15391dc1,
0x595ab8c0,
0x603b1dc1,
0xe051edc1,
0x185287c2,
0xd25f62c3,
0x11d2b5c3,
0x40d3b5c3,
0x4cb57ac8,
0xcb1205ca,
0x7840a7cf,
0x806e18d4,
0xd20034d4,
0x263f81d4,
0xaef9a8d5,
0x3ed96bd8,
0x089abdd8,
0x3461fad8,
0x133c12d9,
0xf00f45d9
};

Expand Down Expand Up @@ -333,6 +331,7 @@ public MainNetParams() {
DIP0008BlockHeight = 1088640;
DIP0024BlockHeight = 1737792 + 4 * 288; // DIP24 activation time + 4 cycles
v19BlockHeight = 1899072;
v20BlockHeight = 1987776;

// long living quorum params
addLLMQ(LLMQParameters.LLMQType.LLMQ_50_60);
Expand Down
14 changes: 6 additions & 8 deletions core/src/main/java/org/bitcoinj/params/TestNet3Params.java
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,13 @@ public TestNet3Params() {
checkpoints.put(850100, Sha256Hash.wrap("000004728b8ff2a16b9d4eebb0fd61eeffadc9c7fe4b0ec0b5a739869401ab5b"));
checkpoints.put(899760, Sha256Hash.wrap("000007b169cbf75796ee1147b24f6cdf627c189490d7472187408e0902413a68"));

// updated with Dash Core 0.17.0.3 seed list
addrSeeds = new int[]{
0x10a8302d,
0x4faf4433,
0x05dacd3c,
0x939c6e8f,
0xf9cb3eb2,
0xf093bdce
// updated with Dash Core 20.0.0 seed list
addrSeeds = new int[] {
0x2e4de52b,
0xf7a74d2d,
0xf9cb3eb2
};

bip32HeaderP2PKHpub = 0x043587cf;
bip32HeaderP2PKHpriv = 0x04358394;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ public SimplifiedQuorumList applyDiff(SimplifiedMasternodeListDiff diff, boolean
Context.get().chainLockHandler.addCoinbaseChainLock(entry.quorumHash, 8, signature);

// find a better way to do this
log.info("quorum {}:{} {}", entry.quorumHash, entry.quorumIndex, signature);
if ((doDIP24 && entry.llmqType == params.getLlmqDIP0024InstantSend().value) || (!doDIP24 && entry.llmqType != params.getLlmqDIP0024InstantSend().value)) {
// for now, don't use the return value
verifyQuorum(isLoadingBootstrap, chain, validateOldQuorums, entry);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package org.bitcoinj.examples.debug;

import org.bitcoinj.core.NetworkParameters;
import org.json.JSONException;
import org.json.JSONObject;

import java.io.BufferedReader;
Expand Down Expand Up @@ -48,6 +49,9 @@ JSONObject runRPCCommand(String command) {

} catch (IOException e) {
return null;
} catch (JSONException e) {
System.out.println("There is a problem parsing the output" + e);
return null;
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
Expand Down
Loading

0 comments on commit c25f04c

Please sign in to comment.