Git Product home page Git Product logo

dashjoin.js's Introduction

A working reference implementation of Coin Join that can easily be ported to any language.

Table of Contents

  • RegTest Setup
  • Maturing Coins
  • Install
  • Running the Demo
  • Troubleshooting
  • Roadmap

Prerequisites (RegTest)

RegTest

You will need:

  • Build Tools
  • Docker
  • Dashmate
  • RegTest

See #12.

Maturing the Coinbase

Before running the demo, generate some blocks:

./bin/dash-cli-generateblocks 20

You'll get some errors the first time you try to run the demo, generate even more blocks:

./bin/dash-cli-generateblocks 105

If you still get some errors on the 3rd run, just generate a few more for good measure:

./bin/dash-cli-generateblocks 10

Install

git clone https://github.com/dashhive/DashJoin.js.git
pushd ./DashJoin.js/

npm ci --only=production

How to Run the Demo

  1. Make sure the tests still pass:
    (the tests replay known-good transactions from scratch)

    npm run test
  2. Then run the demo in two different screens:

    # in the FIRST screen
    node ./demo.js 'foo'
    # in the SECOND screen
    node ./demo.js 'bar'
  3. You may need to watch the logs on each of the dashd instances to find which one has been chosen for the coinjoin service (the ids are non-deterministic / random):

    docker ps | grep 'dashd:' | grep '_local_[1-3]'
    
    docker logs --since 1m -f e04133d8696b

Troubleshooting

There are two categories you're likely to encounter:

  1. Coins / Coinbase / Block Height isn't mature.
    For these, the solution is to generate more transactions, and try again:
    (this functionality is documented only to work on Linux)
    ./bin/dash-cli-generateblocks 100
  2. Disk space (or other system resources) is/are low.
    All sorts of strange things will happen. Doing a reset may help.
    ~/dashmate/bin/dashmate group stop
    docker ps -aq | xargs docker stop
    ~/dashmate/bin/dashmate group reset
    ~/dashmate/bin/dashmate group start
    You may need to stop and start a second time to get everything to come back up - it's not entirely deterministic. That said, just one reset should do.

Example immature coinbase error:

{
	"code": -26,
	"message": "bad-txns-premature-spend-of-coinbase, tried to spend coinbase at depth 10"
}

Low disk space (below 90% or below 4gb free) can cause seemingly random and uncorrelatable errors, hangups, etc.

This isn't a library (yet)

demo.js still has a lot of business logic that will need to be carefully teased out and abstracted to turn this into a library.

The parsers and packers are a good chunk of it, but the networking is all in demo.js for now.

The actual signing logic is in dashtx and the wallet logic is built from the other dash* libraries, which are complete and fit for general use.

dashjoin.js's People

Contributors

wmerfalen avatar coolaj86 avatar

Stargazers

Ghawas avatar  avatar

Watchers

Rion Daniel Gull avatar

dashjoin.js's Issues

doc: most useful RPCs for debugging

Just listing some common ones here and what they do:

RPC Notes
getbalance just the number
getbalances split by maturity
gettransaction <tx> -
listtransactions '*' 1000 shows the last 1000 transactions

ListTransactions

my_username='luke'
my_txid='bed1841cfe98b13ca0de13c7c243c787fb6fe6ba64af6a60a252ff06ed082160'

dash-cli -conf="$HOME"/.dashmate/local_seed/core/dash.conf \
    -rpcwallet="${my_username}" \
    listtransactions '*' 1000 |
        jq '.[] | select(.txid == "''"${my_txid}"")'
  {
    "address": "yTXs7rVBT928CpDN7H4BvhbHuTU7rJoRDW",
    "category": "immature",
    "amount": 0.01697629,
    "label": "",
    "vout": 0,
    "confirmations": 4,
    "instantlock": true,
    "instantlock_internal": false,
    "chainlock": true,
    "generated": true,
    "blockhash": "4318a58aef2899ab410ef8197adb34b608e1b44b0de9bb2aa61b82fe47eb62d8",
    "blockheight": 8315,
    "blockindex": 0,
    "blocktime": 1712921984,
    "txid": "bed1841cfe98b13ca0de13c7c243c787fb6fe6ba64af6a60a252ff06ed082160",
    "walletconflicts": [
    ],
    "time": 1712921949,
    "timereceived": 1712921949
  }

Roadmap to MVP

  • get masternode list dashpay/dashd-rpc#68
  • select masternode
  • write a full wallet implementation from scratch, y'know... using DashHD that is
  • generate lots of Dash to the testnet addresses
  • connect to masternode and send Hello (version + verack)
  • send pong
  • send senddsq
  • create collateral transaction (network fee is collateral, output addr is change addr)
  • handshake with dsa + collateral
  • receive dssu and dsq
  • receive dsf
  • send dss
  • figure out why dss signature isn't valid
  • finish updating dashtx dashhive/DashTx.js#64 so that it can run without local modifications

Todo for Monday

  • lookup txids using dash-cli to know for sure whether LE or BE is correct when parsing
  • sign with sighash_all using the older DashTx code
    (update to not throw when missing keys)
    (could use a triple check)
  • create tx (again) with dash-cli and the given keys
    (can't be done due to lacking features)
  • write dss verifier (one that checks input signatures)
  • check that a bad signature on collateral returns an error
    (the problem was the extra size byte when using pubKeyHash to construct script)

doc: how to view internal info about a coin (tx output)

This (GetTxOut) will probably come in handing debugging soon:

dash-cli -conf="${HOME}/.dashmate/local_seed/core/dash.conf" \
    --rpcwallet=luke \
    gettxout 9d114ea97684fdae47946f733aa2d9d3d4b21df16f5b0092c44e59cc503ed188 0

doc: How to use the new, in-progress dashjoin.js

Install DashCore

curl https://webi.sh/dashcore | sh
source ~/.config/envman/PATH.env

dash-cli --version
dashd --version

Create a Test Wallet

pushd /tmp/ &&
    npm install --location=global dashphrase-cli dashkeys-cli dashhd-cli &&
popd
dashphrase generate -o ./seed-phrase.txt
dashphrase seed ./seed-phrase.txt '' -o ./seed.hex
road smile until phone wise inject unhappy slogan glove debris anger survey

d63d988a5aa597bc9e288745586be1d4473c7dc9bfb3900b01a6a6b95bfd52f8e377cd1d7a7c97df74e98bc42cf89ec3de50108b671ff0844810bbce61b4c8cc

testnet is m/44'/1', mainnet is m/44'/5'

# generate a few receive addresses in the range `<account>/<usage/addr>` to `<usage/addr>`
dashhd --testnet ./seed.hex "m/44'/1'/0'/0/0" "0/5"

# generate a few change addresses
dashhd --testnet ./seed.hex "m/44'/1'/0'/1/0" "1/5"
m/44'/1'/0'/0/0:
cUeUEgRQWfKiYPBeRZsYsrvvSZiKHbUNqiQE2AdKA4s7ymycdVxc
yTw3SFk9PbQ1kikMgJBRA7CFyLfNt2G6QD

m/44'/1'/0'/0/1:
cN28SZpmmuVFmmBQBHCNdwa6a14kWZM8VVpZETjzk47aGNvVGXK7
yb4zn8MSW4hHsvmP6PxX2tUPDb9bvmxSrS

...

m/44'/1'/0'/0/5:
cSnDDXRTQbj7Ya3PsnMaEAfomwo3zLSZfzKikkfX3KNU2B9GS2Mu
ydhfU4GPojriBbaAnmKgRdVJco3dFgBrz3
m/44'/1'/0'/1/0:
cUPCzcqpyiCLSiu2FKwGR4cQ1StJYtukqrWPb8xtpirWeYg1FkWW
ySvcDBcz5MVWqkA12wFW8PxCMBL3HwVN6J

m/44'/1'/0'/1/1:
cRZjpqso7XcE5dNctZpKfraP8BdypuuK3o4GhdAzb8dZuY9xxUZc
yXqvZJAiKhZ3rUy3eiThWor9uELLpY4R2b

...

m/44'/1'/0'/1/5:
cUQruX5RRgPvp8c1qbtqeMcSU8aFoe6j5nVZpYyfYK2JM9yCUHdK
yXTdKjfU1Lnju7HjycwPNA54ZRxc7eYFG8

Load some Dash onto the Test Wallet

Use generatetoaddress on some of the receive (usage=0) addresses:

dash-cli -conf="$HOME"/.dashmate/local_seed/core/dash.conf \
    generatetoaddress 10 yTw3SFk9PbQ1kikMgJBRA7CFyLfNt2G6QD

dash-cli -conf="$HOME"/.dashmate/local_seed/core/dash.conf \
    generatetoaddress 1 yb4zn8MSW4hHsvmP6PxX2tUPDb9bvmxSrS
dash-cli -conf="$HOME"/.dashmate/local_seed/core/dash.conf \
    getaddressdeltas '{ "addresses": [
        "yTw3SFk9PbQ1kikMgJBRA7CFyLfNt2G6QD"
    ] }'
dash-cli -conf="$HOME"/.dashmate/local_seed/core/dash.conf \
    getaddressmempool '{ "addresses": [
        "yTw3SFk9PbQ1kikMgJBRA7CFyLfNt2G6QD"
    ] }'

dash-cli -conf="$HOME"/.dashmate/local_seed/core/dash.conf \
    getaddressdeltas '{ "addresses": [
        "yb4zn8MSW4hHsvmP6PxX2tUPDb9bvmxSrS"
    ] }'
dash-cli -conf="$HOME"/.dashmate/local_seed/core/dash.conf \
    getaddressmempool '{ "addresses": [
        "yb4zn8MSW4hHsvmP6PxX2tUPDb9bvmxSrS"
    ] }'

Denominate Coins

dash-cli -testnet createrawtransaction '''
  [
    {
      "txid": "061ec99eb641ffdeaa05a1a724a255103bebc445b15c6c8c028b19c08608496b",
      "vout" : 1
    }
  ]''' \
  '''
  [
    {
      "ySutkc49Khpz1HQN8AfWNitVBLwqtyaxvv": 800
    },
    {
      "yY6AmGopsZS31wy1JLHR9P6AC6owFaXwuh": 74.99
    }
  ]''' \
  0
dash-cli -testnet signrawtransactionwithkey 020000000121f39228a11ddf197ac3658e\
93bd264d0afd927f0cdfc7caeb760537e529c94a0100000000ffffffff01809698000000000019\
76a914fe64a96d6660e30c433e1189082466a95bdf9ceb88ac00000000 \
[\"cSxm6ji1SQ7vF1r8QhcsE1AZ42ZJqs5CEAAnD18iV18ZCQ2u3gGa\"]

Thoughts on signing

My small test case should:

  • attach index to input
  • sign over only the single input
  • sign over all outputs
  • verify that a fee wasn't adjusted
  • verify that the input has a lock (not unlock) script
  • single byte sighash after true sig

Resources

/** @type {PubKeyHashToAddress} */
    _DashKeys.pkhToAddr = async function (shaRipeBytes, opts) {
      let pubKeyHash = Utils.bytesToHex(shaRipeBytes);
      let version = opts?.version;


      switch (version) {
        case null:
              /* fallsthrough */
        case undefined:
              break;
        case "testnet":
          version = DASH_PKH_TESTNET;
              break;
          default:
              throw new Error('bad version');
      }


/** @type {PrivateKeyToWif} */
    _DashKeys.privKeyToWif = async function (privBytes, opts) {
      let privateKey = Utils.bytesToHex(privBytes);
      let version = opts?.version;

      switch (version) {
        case null:
              /* fallsthrough */
        case undefined:
              break;
        case "testnet":
          version = DASH_PRIV_KEY_TESTNET;
              break;
          default:
              throw new Error('bad version');
      }

CoinJoin Reference Implementations

Known Issues

Only Core and DashJoin support the required ANYONECANPAY (at the time of this writing)

Implementations

Dash Electrum (Python):

DashCore (C++):

And there's work being done in the new iOS/Android Dash codebases:
(they may not work yet at the time of this issue)

Note: GitHub Search sometimes breaks. If that's the case, just try back in a few minutes.

doc: What do dsa, dssu, dsq, dsi, dsf, dss, dsc, inv, and dstx stand for?

The ds prefix of each stands for "Dark Send", from the good ol days. If it were renamed, these would all be ps* (Private Send) or cj* (CoinJoin).

See https://docs.dash.org/projects/core/en/stable/docs/guide/dash-features-coinjoin.html#coinjoin-processing

Index + Direction Message Meaning
1 ➡️ version Begin MasterNode Handshake
1 ↩️ version
sendaddr2
-
1 ➡️ verack -
1 ↩️ verack
mnauth
Version is acceptable + MN Proof
* ↩️ sendheaders
sendcmpct
senddsq
Negotiate desired messages & sub-protocols
* ➡️ senddsq REQUIRED Opt-in to receiving dsq messages
* ↩️ ping Begin ping/pong keepalive
* ↩️ inv Inventory (transactions, blocks) either incoming messages, or response to getblocks or mempool
2 ➡️ dsa DarkSend (Please) Allow
2 ↩️ dssu
dsq
DarkSend (Accpeted into) Queue
Note: you won't get the dsq reply to your dsa unless you've sent senddsq
3 ➡️ dsi DarkSend 1 (Ready Bit set to True)
4 ↩️ dssu
dsf
dssu
DarkSend Final Draft (Unsigned)
5 ➡️ dss DarkSend Signed Transaction (one from each participant)
6 ↩️ dsc
inv
DarkSend Complete
dstx inventory
7 🌎 dstx DarkSend Transaction (the randomly selected tx is broadcast)
- getdata Query memory pool for current dstx
* ↩️ dssu + * DarkSend Status Update

See also:

Debugging CoinJoin Failure

The Error

PrioritiseTransaction: a311e5ad38fcc016eb6f4518121e7aa5fb32d26f50c7833b2acb2ff76a6d57ad feerate += 0.10
AcceptToMemoryPoolWithTime: a311e5ad38fcc016eb6f4518121e7aa5fb32d26f50c7833b2acb2ff76a6d57ad mandatory-script-verify-flag-failed (Signature must be zero for failed CHECK(MULTI)SIG operation) ()

Possible Solution

Perhaps we could read Signature must be zero as Signed input must at index zero.

https://github.com/libbitcoin/libbitcoin-system/wiki/Sighash-and-TX-Signing

Sign each input as index 0, with NO OTHER INPUTS and ALL OUTPUTS.

How I got there

  1. Find the dashd instances local_1, local_2, and local_3
    docker ps | grep 'dashd:' | grep '_local_[1-3]' | cut -d' ' -f1
    5944463f6e86
    983fe30ffc8e
    e04133d8696b
    
  2. Run the log watch command in 3 different terminals
    docker logs --since 15m -f 5944463f6e86
  3. Search for CCoinJoinServer in each
    (the one that matches is the one the peers are deterministically hitting)
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::CreateFinalTransaction -- FINALIZE TRANSACTIONS
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::CreateFinalTransaction -- finalMutableTransaction=CMutableTransaction(hash=88a0b2b86e, ver=2, type=0, vin.size=18, vout.size=18, nLockTime=0, vExtraPayload.size=0)
    CTxIn(COutPoint(257ce7c9ec2a189d6f30dc9726bf2abf6abd7b633112a270b48ea85f2b250876, 0), scriptSig=)
    CTxIn(COutPoint(257ce7c9ec2a189d6f30dc9726bf2abf6abd7b633112a270b48ea85f2b250876, 1), scriptSig=)
    CTxIn(COutPoint(257ce7c9ec2a189d6f30dc9726bf2abf6abd7b633112a270b48ea85f2b250876, 2), scriptSig=)
    CTxIn(COutPoint(257ce7c9ec2a189d6f30dc9726bf2abf6abd7b633112a270b48ea85f2b250876, 3), scriptSig=)
    CTxIn(COutPoint(257ce7c9ec2a189d6f30dc9726bf2abf6abd7b633112a270b48ea85f2b250876, 4), scriptSig=)
    CTxIn(COutPoint(45ec0766f3401c2ac3a4c7d1c18d171e58ce5d76fac9fa2c5b34c8dd02881e19, 1), scriptSig=)
    CTxIn(COutPoint(45ec0766f3401c2ac3a4c7d1c18d171e58ce5d76fac9fa2c5b34c8dd02881e19, 2), scriptSig=)
    CTxIn(COutPoint(45ec0766f3401c2ac3a4c7d1c18d171e58ce5d76fac9fa2c5b34c8dd02881e19, 3), scriptSig=)
    CTxIn(COutPoint(45ec0766f3401c2ac3a4c7d1c18d171e58ce5d76fac9fa2c5b34c8dd02881e19, 4), scriptSig=)
    CTxIn(COutPoint(76ba5e4dbea6ef075fab48cd0c887ce4b2edef2c7afb7f03d30770bf155a96cb, 0), scriptSig=)
    CTxIn(COutPoint(76ba5e4dbea6ef075fab48cd0c887ce4b2edef2c7afb7f03d30770bf155a96cb, 1), scriptSig=)
    CTxIn(COutPoint(76ba5e4dbea6ef075fab48cd0c887ce4b2edef2c7afb7f03d30770bf155a96cb, 2), scriptSig=)
    CTxIn(COutPoint(76ba5e4dbea6ef075fab48cd0c887ce4b2edef2c7afb7f03d30770bf155a96cb, 3), scriptSig=)
    CTxIn(COutPoint(76ba5e4dbea6ef075fab48cd0c887ce4b2edef2c7afb7f03d30770bf155a96cb, 4), scriptSig=)
    CTxIn(COutPoint(b2619e8388913226aa0059cebb469a02fdc1d5d72a5e2e1be1f762ef50d3940e, 1), scriptSig=)
    CTxIn(COutPoint(b2619e8388913226aa0059cebb469a02fdc1d5d72a5e2e1be1f762ef50d3940e, 2), scriptSig=)
    CTxIn(COutPoint(b2619e8388913226aa0059cebb469a02fdc1d5d72a5e2e1be1f762ef50d3940e, 3), scriptSig=)
    CTxIn(COutPoint(b2619e8388913226aa0059cebb469a02fdc1d5d72a5e2e1be1f762ef50d3940e, 4), scriptSig=)
    CTxOut(nValue=0.00100001, scriptPubKey=76a9142180e2e082e504e2ff99300b)
    CTxOut(nValue=0.00100001, scriptPubKey=76a9143a2142b82222413e45a469d9)
    CTxOut(nValue=0.00100001, scriptPubKey=76a9144a271dd96a7e096db0174fef)
    CTxOut(nValue=0.00100001, scriptPubKey=76a9144ae6f64be49c8a9dad05091c)
    CTxOut(nValue=0.00100001, scriptPubKey=76a914580c7812093a680367e2ea24)
    CTxOut(nValue=0.00100001, scriptPubKey=76a91461ce8d35674e020bd91f63d1)
    CTxOut(nValue=0.00100001, scriptPubKey=76a914660f50b55e635ea347efd223)
    CTxOut(nValue=0.00100001, scriptPubKey=76a9146dbe907ca08a5f893752449a)
    CTxOut(nValue=0.00100001, scriptPubKey=76a91474bc30a19f16aee3e8b48a8b)
    CTxOut(nValue=0.00100001, scriptPubKey=76a9147568a7c69ef2357459376f8c)
    CTxOut(nValue=0.00100001, scriptPubKey=76a9148ec49f7e482b6ceb658156d9)
    CTxOut(nValue=0.00100001, scriptPubKey=76a91494c1d34dfd35b5e5c108aab7)
    CTxOut(nValue=0.00100001, scriptPubKey=76a9149a2bb835bd557437fcdbdb09)
    CTxOut(nValue=0.00100001, scriptPubKey=76a9149f7fc53ec2c2849da00d6b1e)
    CTxOut(nValue=0.00100001, scriptPubKey=76a914af44b235ce58918edcb47c95)
    CTxOut(nValue=0.00100001, scriptPubKey=76a914b6055ef1bd4266a0b284fc7e)
    CTxOut(nValue=0.00100001, scriptPubKey=76a914d547b11f8612213e7a22f2ae)
    CTxOut(nValue=0.00100001, scriptPubKey=76a914e3d4e7e53b80c1cc45268acc)
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::SetState -- nState: 2, nStateNew: 3
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::RelayFinalTransaction -- nSessionID: 884916  nSessionDenom: 16 (0.00100001)
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) sending dsf (1364 bytes) peer=64
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) sending dsf (1364 bytes) peer=65
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) sending dssu (16 bytes) peer=64
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) sending dssu (16 bytes) peer=65
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) received: dss (1330 bytes) peer=64
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) DSSIGNFINALTX -- vecTxIn.size() 9
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::AddScriptSig -- scriptSig=3045022100b45409454e4b55
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::IsInputScriptSigValid -- verifying scriptSig 3045022100b45409454e4b55
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::IsInputScriptSigValid -- Successfully validated input and scriptSig
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::AddScriptSig -- scriptSig=3045022100b45409454e4b55 new
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::AddScriptSig -- adding to finalMutableTransaction, scriptSig=3045022100b45409454e4b55
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::AddScriptSig -- adding to entries, scriptSig=3045022100b45409454e4b55
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) DSSIGNFINALTX -- AddScriptSig() 1/9 success
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::AddScriptSig -- scriptSig=304402207819a0135ef87a1e
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::IsInputScriptSigValid -- verifying scriptSig 304402207819a0135ef87a1e
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::IsInputScriptSigValid -- Successfully validated input and scriptSig
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::AddScriptSig -- scriptSig=304402207819a0135ef87a1e new
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::AddScriptSig -- adding to finalMutableTransaction, scriptSig=304402207819a0135ef87a1e
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::AddScriptSig -- adding to entries, scriptSig=304402207819a0135ef87a1e
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) DSSIGNFINALTX -- AddScriptSig() 2/9 success
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::AddScriptSig -- scriptSig=30450221008218a19f68acdb
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::IsInputScriptSigValid -- verifying scriptSig 30450221008218a19f68acdb
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::IsInputScriptSigValid -- Successfully validated input and scriptSig
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::AddScriptSig -- scriptSig=30450221008218a19f68acdb new
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::AddScriptSig -- adding to finalMutableTransaction, scriptSig=30450221008218a19f68acdb
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::AddScriptSig -- adding to entries, scriptSig=30450221008218a19f68acdb
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) DSSIGNFINALTX -- AddScriptSig() 3/9 success
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::AddScriptSig -- scriptSig=3045022100dcba3f7a7bf2a3
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::IsInputScriptSigValid -- verifying scriptSig 3045022100dcba3f7a7bf2a3
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::IsInputScriptSigValid -- Successfully validated input and scriptSig
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::AddScriptSig -- scriptSig=3045022100dcba3f7a7bf2a3 new
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::AddScriptSig -- adding to finalMutableTransaction, scriptSig=3045022100dcba3f7a7bf2a3
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::AddScriptSig -- adding to entries, scriptSig=3045022100dcba3f7a7bf2a3
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) DSSIGNFINALTX -- AddScriptSig() 4/9 success
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::AddScriptSig -- scriptSig=30450221008199d0caeee4f1
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::IsInputScriptSigValid -- verifying scriptSig 30450221008199d0caeee4f1
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::IsInputScriptSigValid -- Successfully validated input and scriptSig
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::AddScriptSig -- scriptSig=30450221008199d0caeee4f1 new
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::AddScriptSig -- adding to finalMutableTransaction, scriptSig=30450221008199d0caeee4f1
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::AddScriptSig -- adding to entries, scriptSig=30450221008199d0caeee4f1
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) DSSIGNFINALTX -- AddScriptSig() 5/9 success
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::AddScriptSig -- scriptSig=304402203a5c62b12cbd96e1
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::IsInputScriptSigValid -- verifying scriptSig 304402203a5c62b12cbd96e1
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::IsInputScriptSigValid -- Successfully validated input and scriptSig
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::AddScriptSig -- scriptSig=304402203a5c62b12cbd96e1 new
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::AddScriptSig -- adding to finalMutableTransaction, scriptSig=304402203a5c62b12cbd96e1
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::AddScriptSig -- adding to entries, scriptSig=304402203a5c62b12cbd96e1
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) DSSIGNFINALTX -- AddScriptSig() 6/9 success
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::AddScriptSig -- scriptSig=3045022100cb78f1ec9b4a98
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::IsInputScriptSigValid -- verifying scriptSig 3045022100cb78f1ec9b4a98
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::IsInputScriptSigValid -- Successfully validated input and scriptSig
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::AddScriptSig -- scriptSig=3045022100cb78f1ec9b4a98 new
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::AddScriptSig -- adding to finalMutableTransaction, scriptSig=3045022100cb78f1ec9b4a98
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::AddScriptSig -- adding to entries, scriptSig=3045022100cb78f1ec9b4a98
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) DSSIGNFINALTX -- AddScriptSig() 7/9 success
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::AddScriptSig -- scriptSig=304402202f85d61aef7cb35c
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::IsInputScriptSigValid -- verifying scriptSig 304402202f85d61aef7cb35c
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::IsInputScriptSigValid -- Successfully validated input and scriptSig
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::AddScriptSig -- scriptSig=304402202f85d61aef7cb35c new
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::AddScriptSig -- adding to finalMutableTransaction, scriptSig=304402202f85d61aef7cb35c
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::AddScriptSig -- adding to entries, scriptSig=304402202f85d61aef7cb35c
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) DSSIGNFINALTX -- AddScriptSig() 8/9 success
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::AddScriptSig -- scriptSig=3045022100a108b8db15a85d
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::IsInputScriptSigValid -- verifying scriptSig 3045022100a108b8db15a85d
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::IsInputScriptSigValid -- Successfully validated input and scriptSig
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::AddScriptSig -- scriptSig=3045022100a108b8db15a85d new
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::AddScriptSig -- adding to finalMutableTransaction, scriptSig=3045022100a108b8db15a85d
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::AddScriptSig -- adding to entries, scriptSig=3045022100a108b8db15a85d
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) DSSIGNFINALTX -- AddScriptSig() 9/9 success
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::CheckPool -- entries count 2
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) received: dss (1328 bytes) peer=65
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) DSSIGNFINALTX -- vecTxIn.size() 9
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::AddScriptSig -- scriptSig=3045022100913528c6dda4ec
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::IsInputScriptSigValid -- verifying scriptSig 3045022100913528c6dda4ec
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::IsInputScriptSigValid -- Successfully validated input and scriptSig
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::AddScriptSig -- scriptSig=3045022100913528c6dda4ec new
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::AddScriptSig -- adding to finalMutableTransaction, scriptSig=3045022100913528c6dda4ec
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::AddScriptSig -- adding to entries, scriptSig=3045022100913528c6dda4ec
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) DSSIGNFINALTX -- AddScriptSig() 1/9 success
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::AddScriptSig -- scriptSig=3045022100903f112434e024
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::IsInputScriptSigValid -- verifying scriptSig 3045022100903f112434e024
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::IsInputScriptSigValid -- Successfully validated input and scriptSig
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::AddScriptSig -- scriptSig=3045022100903f112434e024 new
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::AddScriptSig -- adding to finalMutableTransaction, scriptSig=3045022100903f112434e024
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::AddScriptSig -- adding to entries, scriptSig=3045022100903f112434e024
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) DSSIGNFINALTX -- AddScriptSig() 2/9 success
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::AddScriptSig -- scriptSig=3044022045848f0adb5bfc32
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::IsInputScriptSigValid -- verifying scriptSig 3044022045848f0adb5bfc32
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::IsInputScriptSigValid -- Successfully validated input and scriptSig
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::AddScriptSig -- scriptSig=3044022045848f0adb5bfc32 new
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::AddScriptSig -- adding to finalMutableTransaction, scriptSig=3044022045848f0adb5bfc32
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::AddScriptSig -- adding to entries, scriptSig=3044022045848f0adb5bfc32
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) DSSIGNFINALTX -- AddScriptSig() 3/9 success
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::AddScriptSig -- scriptSig=3045022100a4ea92915970d8
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::IsInputScriptSigValid -- verifying scriptSig 3045022100a4ea92915970d8
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::IsInputScriptSigValid -- Successfully validated input and scriptSig
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::AddScriptSig -- scriptSig=3045022100a4ea92915970d8 new
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::AddScriptSig -- adding to finalMutableTransaction, scriptSig=3045022100a4ea92915970d8
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::AddScriptSig -- adding to entries, scriptSig=3045022100a4ea92915970d8
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) DSSIGNFINALTX -- AddScriptSig() 4/9 success
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::AddScriptSig -- scriptSig=3044022005517e624138e1eb
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::IsInputScriptSigValid -- verifying scriptSig 3044022005517e624138e1eb
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::IsInputScriptSigValid -- Successfully validated input and scriptSig
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::AddScriptSig -- scriptSig=3044022005517e624138e1eb new
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::AddScriptSig -- adding to finalMutableTransaction, scriptSig=3044022005517e624138e1eb
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::AddScriptSig -- adding to entries, scriptSig=3044022005517e624138e1eb
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) DSSIGNFINALTX -- AddScriptSig() 5/9 success
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::AddScriptSig -- scriptSig=304402206bcfa98a07620453
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::IsInputScriptSigValid -- verifying scriptSig 304402206bcfa98a07620453
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::IsInputScriptSigValid -- Successfully validated input and scriptSig
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::AddScriptSig -- scriptSig=304402206bcfa98a07620453 new
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::AddScriptSig -- adding to finalMutableTransaction, scriptSig=304402206bcfa98a07620453
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::AddScriptSig -- adding to entries, scriptSig=304402206bcfa98a07620453
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) DSSIGNFINALTX -- AddScriptSig() 6/9 success
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::AddScriptSig -- scriptSig=304402204c538d253fbe0e06
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::IsInputScriptSigValid -- verifying scriptSig 304402204c538d253fbe0e06
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::IsInputScriptSigValid -- Successfully validated input and scriptSig
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::AddScriptSig -- scriptSig=304402204c538d253fbe0e06 new
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::AddScriptSig -- adding to finalMutableTransaction, scriptSig=304402204c538d253fbe0e06
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::AddScriptSig -- adding to entries, scriptSig=304402204c538d253fbe0e06
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) DSSIGNFINALTX -- AddScriptSig() 7/9 success
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::AddScriptSig -- scriptSig=3044022035097373d0de6292
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::IsInputScriptSigValid -- verifying scriptSig 3044022035097373d0de6292
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::IsInputScriptSigValid -- Successfully validated input and scriptSig
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::AddScriptSig -- scriptSig=3044022035097373d0de6292 new
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::AddScriptSig -- adding to finalMutableTransaction, scriptSig=3044022035097373d0de6292
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::AddScriptSig -- adding to entries, scriptSig=3044022035097373d0de6292
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) DSSIGNFINALTX -- AddScriptSig() 8/9 success
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::AddScriptSig -- scriptSig=304502210093dbaf35a6d7d0
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::IsInputScriptSigValid -- verifying scriptSig 304502210093dbaf35a6d7d0
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::IsInputScriptSigValid -- Successfully validated input and scriptSig
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::AddScriptSig -- scriptSig=304502210093dbaf35a6d7d0 new
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::AddScriptSig -- adding to finalMutableTransaction, scriptSig=304502210093dbaf35a6d7d0
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::AddScriptSig -- adding to entries, scriptSig=304502210093dbaf35a6d7d0
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) DSSIGNFINALTX -- AddScriptSig() 9/9 success
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::CheckPool -- entries count 2
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::CheckPool -- SIGNING
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::CommitFinalTransaction -- finalTransaction=CTransaction(hash=8ad96c7233, ver=2, type=0, vin.size=18, vout.size=18, nLockTime=0, vExtraPayload.size=0)
    CTxIn(COutPoint(257ce7c9ec2a189d6f30dc9726bf2abf6abd7b633112a270b48ea85f2b250876, 0), scriptSig=483045022100b45409454e4b)
    CTxIn(COutPoint(257ce7c9ec2a189d6f30dc9726bf2abf6abd7b633112a270b48ea85f2b250876, 1), scriptSig=47304402207819a0135ef87a)
    CTxIn(COutPoint(257ce7c9ec2a189d6f30dc9726bf2abf6abd7b633112a270b48ea85f2b250876, 2), scriptSig=4830450221008218a19f68ac)
    CTxIn(COutPoint(257ce7c9ec2a189d6f30dc9726bf2abf6abd7b633112a270b48ea85f2b250876, 3), scriptSig=483045022100dcba3f7a7bf2)
    CTxIn(COutPoint(257ce7c9ec2a189d6f30dc9726bf2abf6abd7b633112a270b48ea85f2b250876, 4), scriptSig=4830450221008199d0caeee4)
    CTxIn(COutPoint(45ec0766f3401c2ac3a4c7d1c18d171e58ce5d76fac9fa2c5b34c8dd02881e19, 1), scriptSig=483045022100913528c6dda4)
    CTxIn(COutPoint(45ec0766f3401c2ac3a4c7d1c18d171e58ce5d76fac9fa2c5b34c8dd02881e19, 2), scriptSig=483045022100903f112434e0)
    CTxIn(COutPoint(45ec0766f3401c2ac3a4c7d1c18d171e58ce5d76fac9fa2c5b34c8dd02881e19, 3), scriptSig=473044022045848f0adb5bfc)
    CTxIn(COutPoint(45ec0766f3401c2ac3a4c7d1c18d171e58ce5d76fac9fa2c5b34c8dd02881e19, 4), scriptSig=483045022100a4ea92915970)
    CTxIn(COutPoint(76ba5e4dbea6ef075fab48cd0c887ce4b2edef2c7afb7f03d30770bf155a96cb, 0), scriptSig=473044022005517e624138e1)
    CTxIn(COutPoint(76ba5e4dbea6ef075fab48cd0c887ce4b2edef2c7afb7f03d30770bf155a96cb, 1), scriptSig=47304402206bcfa98a076204)
    CTxIn(COutPoint(76ba5e4dbea6ef075fab48cd0c887ce4b2edef2c7afb7f03d30770bf155a96cb, 2), scriptSig=47304402204c538d253fbe0e)
    CTxIn(COutPoint(76ba5e4dbea6ef075fab48cd0c887ce4b2edef2c7afb7f03d30770bf155a96cb, 3), scriptSig=473044022035097373d0de62)
    CTxIn(COutPoint(76ba5e4dbea6ef075fab48cd0c887ce4b2edef2c7afb7f03d30770bf155a96cb, 4), scriptSig=48304502210093dbaf35a6d7)
    CTxIn(COutPoint(b2619e8388913226aa0059cebb469a02fdc1d5d72a5e2e1be1f762ef50d3940e, 1), scriptSig=47304402203a5c62b12cbd96)
    CTxIn(COutPoint(b2619e8388913226aa0059cebb469a02fdc1d5d72a5e2e1be1f762ef50d3940e, 2), scriptSig=483045022100cb78f1ec9b4a)
    CTxIn(COutPoint(b2619e8388913226aa0059cebb469a02fdc1d5d72a5e2e1be1f762ef50d3940e, 3), scriptSig=47304402202f85d61aef7cb3)
    CTxIn(COutPoint(b2619e8388913226aa0059cebb469a02fdc1d5d72a5e2e1be1f762ef50d3940e, 4), scriptSig=483045022100a108b8db15a8)
    CTxOut(nValue=0.00100001, scriptPubKey=76a9142180e2e082e504e2ff99300b)
    CTxOut(nValue=0.00100001, scriptPubKey=76a9143a2142b82222413e45a469d9)
    CTxOut(nValue=0.00100001, scriptPubKey=76a9144a271dd96a7e096db0174fef)
    CTxOut(nValue=0.00100001, scriptPubKey=76a9144ae6f64be49c8a9dad05091c)
    CTxOut(nValue=0.00100001, scriptPubKey=76a914580c7812093a680367e2ea24)
    CTxOut(nValue=0.00100001, scriptPubKey=76a91461ce8d35674e020bd91f63d1)
    CTxOut(nValue=0.00100001, scriptPubKey=76a914660f50b55e635ea347efd223)
    CTxOut(nValue=0.00100001, scriptPubKey=76a9146dbe907ca08a5f893752449a)
    CTxOut(nValue=0.00100001, scriptPubKey=76a91474bc30a19f16aee3e8b48a8b)
    CTxOut(nValue=0.00100001, scriptPubKey=76a9147568a7c69ef2357459376f8c)
    CTxOut(nValue=0.00100001, scriptPubKey=76a9148ec49f7e482b6ceb658156d9)
    CTxOut(nValue=0.00100001, scriptPubKey=76a91494c1d34dfd35b5e5c108aab7)
    CTxOut(nValue=0.00100001, scriptPubKey=76a9149a2bb835bd557437fcdbdb09)
    CTxOut(nValue=0.00100001, scriptPubKey=76a9149f7fc53ec2c2849da00d6b1e)
    CTxOut(nValue=0.00100001, scriptPubKey=76a914af44b235ce58918edcb47c95)
    CTxOut(nValue=0.00100001, scriptPubKey=76a914b6055ef1bd4266a0b284fc7e)
    CTxOut(nValue=0.00100001, scriptPubKey=76a914d547b11f8612213e7a22f2ae)
    CTxOut(nValue=0.00100001, scriptPubKey=76a914e3d4e7e53b80c1cc45268acc)
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) PrioritiseTransaction: 8ad96c7233eb82d5ef3ec8ce2729f44629063df8e4d3d8d56c24849a01588810 feerate += 0.10
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) AcceptToMemoryPoolWithTime: 8ad96c7233eb82d5ef3ec8ce2729f44629063df8e4d3d8d56c24849a01588810 mandatory-script-verify-flag-failed (Signature must be zero for failed CHECK(MULTI)SIG operation) ()
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::CommitFinalTransaction -- AcceptToMemoryPool() error: Transaction not valid
2024-04-21T02:39:55Z (mocktime: 2024-04-30T00:09:12Z) CCoinJoinServer::RelayCompletedTransaction -- nSessionID: 0  nSessionDenom: 0 (N/A)

Prereqs for Local RegTest Network => Build Tools, Docker, Dashmate

If you already have a group of configs in ~/.dashmate/, you can destroy the nodes and begin anew with:

./dashmate/bin/dashmate group stop
./dashmate/bin/dashmate group reset
./dashmate/bin/dashmate group start
  1. Install updates and prereqs
    sudo apt update &&
       sudo apt install -y build-essential curl git
    
    curl https://webi.sh/ | sh
    source ~/.config/envman/PATH.env
    
    webi [email protected] jq pathman serviceman
    source ~/.config/envman/PATH.env
    
    mkdir -p ~/bin/
    pathman add ~/bin/
    source ~/.config/envman/PATH.env
    And reduce the amount of logging to something reasonable so that it doesn't fill up the disk from all the docker container messages:
    /etc/systemd/journald.conf:
    [Journal]
    Compress=yes
    SystemMaxUse=500M
    SystemKeepFree=4G
    SystemMaxFileSize=50M
    SystemMaxFiles=100
    RuntimeMaxUse=1G
    RuntimeKeepFree=500M
    RuntimeMaxFileSize=1G
    RuntimeMaxFiles=1000
    sudo systemctl daemon-reload
    sudo systemctl restart systemd-journald
  2. Install docker as per webinstall/webi-installer-requests#28 (comment)
    with special attention to the sections including:
    • groupadd docker
    • --groupname=docker
    • and nesting=1 (if already running within a container, such as docker)
  3. Install dashmate as per dashpay/platform#1736 (comment):
    ~/bin/dashmate-install:
    #!/bin/sh
    set -e
    set -u
    
    # NOTE: the latest version doesn't work with dash-cli v20.1.1
    #g_rel="v1.0.0-pr.1902.1"
    #g_file="dashmate-v1.0.0-pr.1902.1-f5fc6d074-linux-x64.tar.gz"
    g_rel="v1.0.0-dev.9"
    g_file="dashmate-v1.0.0-dev.9-d6688bef2-linux-x64.tar.gz"
    if ! test -f "${g_file}"; then
        curl -L -O 'https://github.com/dashpay/platform/releases/download'/"${g_rel}"/"${g_file}"
    fi
    echo "Extracting ${g_file}"
    tar xf "${g_file}"
  4. Create a regtest (a.k.a. "local") network
    ~/bin/dashmate-regtest-init:
    #!/bin/sh
    set -e
    set -u
    
    (
        cd ./dashmate/
        ./bin/dashmate setup --verbose --node-count=3 --debug-logs --miner-interval=0.5m local
    
        ./bin/dashmate group start
    
        ./bin/dashmate status core --config=local_seed
        ./bin/dashmate status core --config=local_1
        ./bin/dashmate status core --config=local_2
        ./bin/dashmate status core --config=local_3
    )

doc: how to switch dashmate dash core version

This didn't work for me just now, so I'm deleting the script associated with it, but I wanted to have it here just in case it comes in handy later:

Update: It's required to either have set the default config, or to use the --config=<name> option.

dashmate config default local_seed

dashmate config set--config local_seed core.docker.image dashpay/dashd:20.1.1
dashmate config set--config local_1 core.docker.image dashpay/dashd:20.1.1
dashmate config set--config local_2 core.docker.image dashpay/dashd:20.1.1
dashmate config set--config local_3 core.docker.image dashpay/dashd:20.1.1

Note: set is a third-level subcommand, so the --config local_1 option must come AFTER that.

make Parser and Packer functions consistent and reciprocal

  • Some of the functions return a whole message, pre-wrapped
  • Others require wrapping after the fact
  • (they should all be the same)
  • Most aren't reciprocal either
  • (but they should be)
let obj = Parser.parseXyz(bytes);
let sameBytes = Packer.packXIyz(obj);
assert.equal(bytes, sameBytes);

DashTx vs Dash-CLI `signrawtransaction`

My guess: less likely to be an algorithm failure, more likely to be that we're assigning the wrong pubKeyHash to the input or utxo object.

update: confirmed, DashKeys.utils.toPublicKey() returns 038c713b103b251af892529165f9a1867c3487f59e94237c080e69f43e419177e6, as expected.


What we expect to be different:

  • r and s signature values (and size bytes)
    (because we enable the optional random salt)
  • txid (as this depends on the signature)

What we expect to match, that doesn't:

  • the version (shouldn't they both be 3?)
  • the public keys should match, but don't:
    dashtx:   027aedc7f360ccaddac9b2e3f589c9ef5468abdfac8953b715203f9e21eaf73a4d
    dash-cli: 038c713b103b251af892529165f9a1867c3487f59e94237c080e69f43e419177e6
    

The full comparison:

diff -y bad-tx.0bGYi3S7n2Q.dashtx-signed.txt bad-tx.0bGYi3S7n2Q.cli-signed.txt
03000000                  # VERSION (3)                       | 02000000                  # VERSION (2)
01                        # Inputs (1)                          01                        # Inputs (1)

# Input 1 of 1                                                  # Input 1 of 1
    715d39efbac69c36      # Previous Output TX ID                   715d39efbac69c36      # Previous Output TX ID
    40ae3576d433321b                                                40ae3576d433321b
    03160c4d13e9bcb8                                                03160c4d13e9bcb8
    e46e7bd2ba0f2226                                                e46e7bd2ba0f2226
    00000000              # Previous Output index (0)               00000000              # Previous Output index (0)
    6a                    # Script Size (106 bytes)                 6a                    # Script Size (106 bytes)
    47                    # Signature Script Size (71)              47                    # Signature Script Size (71)
    3044                  # ASN.1 ECDSA Signature                   3044                  # ASN.1 ECDSA Signature
    0220                                                            0220
      7652ae6c746568886262130a3aec5e23ad584833553ff1e895286c3 |       1f6cfe181957f89b2edcd89d87e6cf651bc63790203ea69289f54dd
    0220                                                            0220
      687c8735d82ec0e3cd6dadefb6bf75b6d5de237dee5b6dfaa309577 |       53b9f1c339076abd48528735ec0d6709dbfa2a990842e07da78b166
    01                    # Sig Hash Type (1)                       01                    # Sig Hash Type (1)
    21                    # Public Key Size (33)                    21                    # Public Key Size (33)
    027aedc7f360ccaddac9b2e3f589c9ef5468abdfac8953b715203f9e2 |     038c713b103b251af892529165f9a1867c3487f59e94237c080e69f43
    ffffffff              # Sequence (always 0xffffffff)            ffffffff              # Sequence (always 0xffffffff)

07                        # Outputs (7)                         07                        # Outputs (7)
# Output 1 of 7                                                 # Output 1 of 7
    a186010000000000      # Base Units (satoshis) (100001)          a186010000000000      # Base Units (satoshis) (100001)
    19                    # Lock Script Size (25 bytes)             19                    # Lock Script Size (25 bytes)
    76a9                  # Script                                  76a9                  # Script
    14                                                              14
    19426efe5aa2f6f48c5c                                            19426efe5aa2f6f48c5c
    c0ace775368a3ac7fe3c                                            c0ace775368a3ac7fe3c
    88ac                                                            88ac

# Output 2 of 7                                                 # Output 2 of 7
    a186010000000000      # Base Units (satoshis) (100001)          a186010000000000      # Base Units (satoshis) (100001)
    19                    # Lock Script Size (25 bytes)             19                    # Lock Script Size (25 bytes)
    76a9                  # Script                                  76a9                  # Script
    14                                                              14
    3ee2b3ece981714a7ed4                                            3ee2b3ece981714a7ed4
    7870e9773702d8859624                                            7870e9773702d8859624
    88ac                                                            88ac

# Output 3 of 7                                                 # Output 3 of 7
    a186010000000000      # Base Units (satoshis) (100001)          a186010000000000      # Base Units (satoshis) (100001)
    19                    # Lock Script Size (25 bytes)             19                    # Lock Script Size (25 bytes)
    76a9                  # Script                                  76a9                  # Script
    14                                                              14
    4c74fa096150560109e9                                            4c74fa096150560109e9
    212290d6cf011711ba61                                            212290d6cf011711ba61
    88ac                                                            88ac

# Output 4 of 7                                                 # Output 4 of 7
    a186010000000000      # Base Units (satoshis) (100001)          a186010000000000      # Base Units (satoshis) (100001)
    19                    # Lock Script Size (25 bytes)             19                    # Lock Script Size (25 bytes)
    76a9                  # Script                                  76a9                  # Script
    14                                                              14
    88720aaff47b8da8e0a3                                            88720aaff47b8da8e0a3
    0ed5cc446938fe84e352                                            0ed5cc446938fe84e352
    88ac                                                            88ac

# Output 5 of 7                                                 # Output 5 of 7
    a186010000000000      # Base Units (satoshis) (100001)          a186010000000000      # Base Units (satoshis) (100001)
    19                    # Lock Script Size (25 bytes)             19                    # Lock Script Size (25 bytes)
    76a9                  # Script                                  76a9                  # Script
    14                                                              14
    9cefd83f996f996398d4                                            9cefd83f996f996398d4
    332d49fb9964ee241603                                            332d49fb9964ee241603
    88ac                                                            88ac

# Output 6 of 7                                                 # Output 6 of 7
    e496980000000000      # Base Units (satoshis) (10000100)        e496980000000000      # Base Units (satoshis) (10000100)
    19                    # Lock Script Size (25 bytes)             19                    # Lock Script Size (25 bytes)
    76a9                  # Script                                  76a9                  # Script
    14                                                              14
    d869d3b45e2c9ce62241                                            d869d3b45e2c9ce62241
    4098d26fa5d8da39711a                                            4098d26fa5d8da39711a
    88ac                                                            88ac

# Output 7 of 7                                                 # Output 7 of 7
    e8e4f50500000000      # Base Units (satoshis) (100001000)       e8e4f50500000000      # Base Units (satoshis) (100001000)
    19                    # Lock Script Size (25 bytes)             19                    # Lock Script Size (25 bytes)
    76a9                  # Script                                  76a9                  # Script
    14                                                              14
    5c865d9dd1eaeb3c1be3                                            5c865d9dd1eaeb3c1be3
    93f1ce4ce7f191a0d74e                                            93f1ce4ce7f191a0d74e
    88ac                                                            88ac

00000000                  # LOCKTIME (0)                        00000000                  # LOCKTIME (0)

Tx Hash: N/A                                                    Tx Hash: N/A
TxID: d555e677affd724d79872d287874f623b6c202d1f953a8f3bad59e1 | TxID: 78685463d73f1865da47746eeff93280d909b77b0c43fbdb57cf865
Tx Bytes:       395                                             Tx Bytes:       395

Tx Outputs:     110501105                                       Tx Outputs:     110501105
Tx Fee:         395                                             Tx Fee:         395
Tx Min Cost:    110501500                                       Tx Min Cost:    110501500

bad-tx.0bGYi3S7n2Q.hex:

0300000001715d39efbac69c3640ae3576d433321b03160c4d13e9bcb8e46e7bd2ba0f2226000000006a47304402207652ae6c746568886262130a3aec5e23ad584833553ff1e895286c303d19a01f0220687c8735d82ec0e3cd6dadefb6bf75b6d5de237dee5b6dfaa3095776e49fc6f00121027aedc7f360ccaddac9b2e3f589c9ef5468abdfac8953b715203f9e21eaf73a4dffffffff07a1860100000000001976a91419426efe5aa2f6f48c5cc0ace775368a3ac7fe3c88aca1860100000000001976a9143ee2b3ece981714a7ed47870e9773702d885962488aca1860100000000001976a9144c74fa096150560109e9212290d6cf011711ba6188aca1860100000000001976a91488720aaff47b8da8e0a30ed5cc446938fe84e35288aca1860100000000001976a9149cefd83f996f996398d4332d49fb9964ee24160388ace4969800000000001976a914d869d3b45e2c9ce622414098d26fa5d8da39711a88ace8e4f505000000001976a9145c865d9dd1eaeb3c1be393f1ce4ce7f191a0d74e88ac00000000

bad-tx.0bGYi3S7n2Q.cli-signed.hex:

0200000001715d39efbac69c3640ae3576d433321b03160c4d13e9bcb8e46e7bd2ba0f2226000000006a47304402201f6cfe181957f89b2edcd89d87e6cf651bc63790203ea69289f54ddf1b236eaf022053b9f1c339076abd48528735ec0d6709dbfa2a990842e07da78b166ff2e402dc0121038c713b103b251af892529165f9a1867c3487f59e94237c080e69f43e419177e6ffffffff07a1860100000000001976a91419426efe5aa2f6f48c5cc0ace775368a3ac7fe3c88aca1860100000000001976a9143ee2b3ece981714a7ed47870e9773702d885962488aca1860100000000001976a9144c74fa096150560109e9212290d6cf011711ba6188aca1860100000000001976a91488720aaff47b8da8e0a30ed5cc446938fe84e35288aca1860100000000001976a9149cefd83f996f996398d4332d49fb9964ee24160388ace4969800000000001976a914d869d3b45e2c9ce622414098d26fa5d8da39711a88ace8e4f505000000001976a9145c865d9dd1eaeb3c1be393f1ce4ce7f191a0d74e88ac00000000

inputs.json:

[{"txid":"26220fbad27b6ee4b8bce9134d0c16031b3233d47635ae40369cc6baef395d71","vout":0}]

outputs.json:

[{"yNd1KtEKkRzmX7FYPaWPdRHaRbKEAseCrC":0.00100001},{"yS3xKgiXX3oT3dVsjhkjxz9bXnXVWc7pk4":0.00100001},{"yTHiLTzRiRefQ351YRtFq5gN52r6otx8Pz":0.00100001},{"yYkuN3wYSuoCgq88qtgLCcMGF7Rdzytdps":0.00100001},{"yadFaqCsJ3K9DDgAFzGsUSKUEwRhWT1qiy":0.00100001},{"yg3jadDgHW4sAXHEe56x5jg9LdtbP9YmY5":0.10000100},{"yUkfyk4TQxzZoyZFrXtzfmCRzH9WMpCxSP":1.00001000}]

wifs.json:

["cTKYtDHnr6hcPSrRjAxe8vHgaJYuGk7Dn9Sxjnoa5xEsxFy2qp7x"]

Original Log Output

{
  inputs: [
    {
      address: 'yPsNAkedXavKBgP6Y9BC624Wqoqpp3cnYj',
      txid: '26220fbad27b6ee4b8bce9134d0c16031b3233d47635ae40369cc6baef395d71',
      outputIndex: 0,
      script: '76a91426f1c804b97881a8da6bcd22a14ee01840cb34bb88ac',
      satoshis: 110548427,
      height: 1255,
      txId: '26220fbad27b6ee4b8bce9134d0c16031b3233d47635ae40369cc6baef395d71'
    }
  ],
  locktime: 0,
  outputs: [
    {
      walletId: '0bGYi3S7n2Q',
      prefix: "m/44'/1'",
      account: 0,
      usage: 0,
      index: 148,
      descriptor: "pkh([0bGYi3S7n2Q/44'/1'/0'/0/148])",
      address: 'yNd1KtEKkRzmX7FYPaWPdRHaRbKEAseCrC',
      used: false,
      satoshis: 100001,
      reserved: 1713484750031,
      pubKeyHash: '19426efe5aa2f6f48c5cc0ace775368a3ac7fe3c'
    },
    {
      walletId: '0bGYi3S7n2Q',
      prefix: "m/44'/1'",
      account: 0,
      usage: 0,
      index: 147,
      descriptor: "pkh([0bGYi3S7n2Q/44'/1'/0'/0/147])",
      address: 'yS3xKgiXX3oT3dVsjhkjxz9bXnXVWc7pk4',
      used: false,
      satoshis: 100001,
      reserved: 1713484750031,
      pubKeyHash: '3ee2b3ece981714a7ed47870e9773702d8859624'
    },
    {
      walletId: '0bGYi3S7n2Q',
      prefix: "m/44'/1'",
      account: 0,
      usage: 0,
      index: 152,
      descriptor: "pkh([0bGYi3S7n2Q/44'/1'/0'/0/152])",
      address: 'yTHiLTzRiRefQ351YRtFq5gN52r6otx8Pz',
      used: false,
      satoshis: 100001,
      reserved: 1713484750031,
      pubKeyHash: '4c74fa096150560109e9212290d6cf011711ba61'
    },
    {
      walletId: '0bGYi3S7n2Q',
      prefix: "m/44'/1'",
      account: 0,
      usage: 0,
      index: 151,
      descriptor: "pkh([0bGYi3S7n2Q/44'/1'/0'/0/151])",
      address: 'yYkuN3wYSuoCgq88qtgLCcMGF7Rdzytdps',
      used: false,
      satoshis: 100001,
      reserved: 1713484750031,
      pubKeyHash: '88720aaff47b8da8e0a30ed5cc446938fe84e352'
    },
    {
      walletId: '0bGYi3S7n2Q',
      prefix: "m/44'/1'",
      account: 0,
      usage: 0,
      index: 153,
      descriptor: "pkh([0bGYi3S7n2Q/44'/1'/0'/0/153])",
      address: 'yadFaqCsJ3K9DDgAFzGsUSKUEwRhWT1qiy',
      used: false,
      satoshis: 100001,
      reserved: 1713484750031,
      pubKeyHash: '9cefd83f996f996398d4332d49fb9964ee241603'
    },
    {
      walletId: '0bGYi3S7n2Q',
      prefix: "m/44'/1'",
      account: 0,
      usage: 0,
      index: 150,
      descriptor: "pkh([0bGYi3S7n2Q/44'/1'/0'/0/150])",
      address: 'yg3jadDgHW4sAXHEe56x5jg9LdtbP9YmY5',
      used: false,
      satoshis: 10000100,
      reserved: 1713484750031,
      pubKeyHash: 'd869d3b45e2c9ce622414098d26fa5d8da39711a'
    },
    {
      walletId: '0bGYi3S7n2Q',
      prefix: "m/44'/1'",
      account: 0,
      usage: 0,
      index: 149,
      descriptor: "pkh([0bGYi3S7n2Q/44'/1'/0'/0/149])",
      address: 'yUkfyk4TQxzZoyZFrXtzfmCRzH9WMpCxSP',
      used: false,
      satoshis: 100001000,
      reserved: 1713484750031,
      pubKeyHash: '5c865d9dd1eaeb3c1be393f1ce4ce7f191a0d74e'
    }
  ],
  transaction: '0300000001715d39efbac69c3640ae3576d433321b03160c4d13e9bcb8e46e7bd2ba0f2226000000006a47304402207652ae6c746568886262130a3aec5e23ad584833553ff1e895286c303d19a01f0220687c8735d82ec0e3cd6dadefb6bf75b6d5de237dee5b6dfaa3095776e49fc6f00121027aedc7f360ccaddac9b2e3f589c9ef5468abdfac8953b715203f9e21eaf73a4dffffffff07a1860100000000001976a91419426efe5aa2f6f48c5cc0ace775368a3ac7fe3c88aca1860100000000001976a9143ee2b3ece981714a7ed47870e9773702d885962488aca1860100000000001976a9144c74fa096150560109e9212290d6cf011711ba6188aca1860100000000001976a91488720aaff47b8da8e0a30ed5cc446938fe84e35288aca1860100000000001976a9149cefd83f996f996398d4332d49fb9964ee24160388ace4969800000000001976a914d869d3b45e2c9ce622414098d26fa5d8da39711a88ace8e4f505000000001976a9145c865d9dd1eaeb3c1be393f1ce4ce7f191a0d74e88ac00000000',
  version: 3
}
Fail:
{
  code: -26,
  message: 'mandatory-script-verify-flag-failed (Script failed an OP_EQUALVERIFY operation)'
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.