Skip to content

Instantly share code, notes, and snippets.

View dexX7's full-sized avatar

dexX7

View GitHub Profile
@dexX7
dexX7 / path_memcheck_tinyformat.log
Created April 26, 2015 01:15
Valgrind --leak-check results for MPPersistencePath with tinyformat
~/Projects/Cpp/omnicore/src/test$ valgrind --leak-check=yes ./test_bitcoin --run_test=mastercore_swapbyteorder_tests
==14672== Memcheck, a memory error detector
==14672== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==14672== Using Valgrind-3.10.0.SVN and LibVEX; rerun with -h for copyright info
==14672== Command: ./test_bitcoin --run_test=mastercore_swapbyteorder_tests
==14672==
Initializing Omni Core v0.0.9.2-dev [unittest]
Exodus balance: 0.00000000 MSC
Omni Core initialization completed
==14672== Conditional jump or move depends on uninitialised value(s)
@dexX7
dexX7 / path_memcheck_boost.log
Created April 26, 2015 01:14
Valgrind --leak-check results for MPPersistencePath with boost::format
~/Projects/Cpp/omnicore/src/test$ valgrind --leak-check=yes ./test_bitcoin --run_test=mastercore_swapbyteorder_tests
==14160== Memcheck, a memory error detector
==14160== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==14160== Using Valgrind-3.10.0.SVN and LibVEX; rerun with -h for copyright info
==14160== Command: ./test_bitcoin --run_test=mastercore_swapbyteorder_tests
==14160==
Initializing Omni Core v0.0.9.2-dev [unittest]
Exodus balance: 0.00000000 MSC
Omni Core initialization completed
==14160== Invalid read of size 1
@dexX7
dexX7 / comparisontool-auditor.sh
Last active August 29, 2015 14:19
Omni Core + Auditor + BitcoindComparisonTool
# clone omnicore
~/Projects$ git clone https://github.com/OmniLayer/omnicore.git
~/Projects$ cd omnicore/
# checkout the auditor as new branch
~/Projects/omnicore$ git remote add zathras https://github.com/zathras-crypto/mastercore.git
~/Projects/omnicore$ git fetch zathras 0.0.10-Z-Auditor
~/Projects/omnicore$ git checkout -b 0.0.10-Z-Auditor-comptool zathras/0.0.10-Z-Auditor
# download the comparison tool
~/Projects/omnicore$ curl -k -L -o ./share/BitcoindComparisonTool.jar https://github.com/TheBlueMatt/test-scripts/blob/38b490a2599d422b12d5ce8f165792f63fd8f54f/pull-tests-0f7b5d8.jar?raw=true
# build omnicore *with that tool*
@dexX7
dexX7 / reorg-auditor.sh
Created April 24, 2015 11:07
Omni Core + Auditor + Reorg tests
# clone omnicore
~/Projects$ git clone https://github.com/OmniLayer/omnicore.git
~/Projects$ cd omnicore/
# checkout the auditor as new branch
~/Projects/omnicore$ git remote add zathras https://github.com/zathras-crypto/mastercore.git
~/Projects/omnicore$ git fetch zathras 0.0.10-Z-Auditor
~/Projects/omnicore$ git checkout -b 0.0.10-Z-Auditor-mempool zathras/0.0.10-Z-Auditor
# add the clearmempool command
~/Projects/omnicore$ git remote add dexx https://github.com/dexX7/bitcoin.git
~/Projects/omnicore$ git fetch dexx oc-0.10-rpc-clearmempool
@dexX7
dexX7 / dex_core
Last active August 29, 2015 14:19
MDex core logic
given:
seller_original_forsale
seller_original_desired
seller_forsale
seller_desired
buyer_original_forsale
buyer_original_desired
buyer_forsale
buyer_desired
@dexX7
dexX7 / test.log
Created April 21, 2015 01:08
Log: 0 units desired
Sending 100.00000000 BTC from n3KC1qk3DUKQyH4jiYuC8suyXLVGArAi9A to moneyqMan7uh8FqdCA2BV5yZ8qVrc9ikLP with a fee of 0.00010000 BTC...
Generating 1 block...
Balance of n3KC1qk3DUKQyH4jiYuC8suyXLVGArAi9A should be: 10000.00000000 SP1 (0.00000000 SP1 reserved)...
Balance of n3KC1qk3DUKQyH4jiYuC8suyXLVGArAi9A should be: 10000.00000000 SP2 (0.00000000 SP2 reserved)...
Generating 1 block...
Balance of n3KC1qk3DUKQyH4jiYuC8suyXLVGArAi9A should be: 92233720368.54775807 SP2147483651 (0.00000000 SP2147483651 reserved)...
Sending 2500.00000000 SP2 from n3KC1qk3DUKQyH4jiYuC8suyXLVGArAi9A to mwEDxH3m8YfXz1PfSqYMc3BKi2bYoq4FjH...
Sending 2500.00000000 SP2 from n3KC1qk3DUKQyH4jiYuC8suyXLVGArAi9A to n2kTxMtxMqMoKX6dKqeikP4WLQ4CMtTu2x...
Sending 2500.00000000 SP2 from n3KC1qk3DUKQyH4jiYuC8suyXLVGArAi9A to mfhEb4o1teTHFqKaHi4Ko6S7azkpqZYPiD...
Sending 2500.00000000 SP2147483651 from n3KC1qk3DUKQyH4jiYuC8suyXLVGArAi9A to mwEDxH3m8YfXz1PfSqYMc3BKi2bYoq4FjH...
@dexX7
dexX7 / mastercore.log
Created April 21, 2015 00:59
Log: 0 units desired
2015-04-21 00:35:26
2015-04-21 00:35:26 OMNICORE INIT, build date: Apr 21 2015 01:32:16
2015-04-21 00:35:26 [Snapshot] Exodus balance: 0.00000000
2015-04-21 00:35:26 DEBUG ALERT No alerts found to load
2015-04-21 00:35:26 update_tally_map(mpexoDuSkGGqvqrkrjiFng38QPkJQVFyqv, 1=0x1, +0, ttype= 0) 0 FUNDS !
2015-04-21 00:35:26 update_tally_map(mpexoDuSkGGqvqrkrjiFng38QPkJQVFyqv, 1=0x1, +0, ttype= 0) 0 FUNDS !
2015-04-21 00:35:26 update_tally_map(mpexoDuSkGGqvqrkrjiFng38QPkJQVFyqv, 1=0x1, +0, ttype= 0) 0 FUNDS !
2015-04-21 00:35:26 update_tally_map(mpexoDuSkGGqvqrkrjiFng38QPkJQVFyqv, 1=0x1, +0, ttype= 0) 0 FUNDS !
2015-04-21 00:35:26 update_tally_map(mpexoDuSkGGqvqrkrjiFng38QPkJQVFyqv, 1=0x1, +0, ttype= 0) 0 FUNDS !
parseTransaction(block=306356, 2014-11-04 02:51:25 idx= 10); txid: 75b687ca67f580d2ab1f7b88afc30fb1893d6eae4d40e83e6a596e49d21801a5
version: 0, Class B
type: 21 (MetaDEx token trade)
property: 12 (SP token: 12)
value: 100.00000000
desired property: 1 (MSC)
desired value: 10.00000000
action: 1
x_Trade(mpZATHupfCLqet5N1YL48ByCM1ZBfddbGJ: prop=12, desprop=1, desprice= 10.00000000000000000000000000000000000000000000000000);newo: 0.10000000000000000000000000000000000000000000000000:mpZATHupfCLqet5N1YL48ByCM1ZBfddbGJ in 306356/010, txid: 75b687ca67 , trade #12 100.00000000 for #1 10.00000000
MetaDEx_ADD(); buyer obj: 0.10000000000000000000000000000000000000000000000000:mpZATHupfCLqet5N1YL48ByCM1ZBfddbGJ in 306356/010, txid: 75b687ca67 , trade #12 100.00000000 for #1 10.00000000
:bitcoin-rpc:compileJava
:bitcoin-rpc:compileGroovy
:bitcoin-rpc:processResources UP-TO-DATE
:bitcoin-rpc:classes
:bitcoin-rpc:jar
:omnij-core:compileJava
:omnij-core:compileGroovy UP-TO-DATE
:omnij-core:processResources UP-TO-DATE
:omnij-core:classes
# start omni core in regtest mode
~/omnicore$ ./src/qt/bitcoin-qt -datadir=/tmp -server -rpcuser=bitcoinrpc -rpcpassword=pass -rpcallowip=127.0.0.1 -regtest -txindex
# clone and run the tests
~/$ git clone https://github.com/OmniLayer/OmniJ.git
~/$ cd OmniJ
~/OmniJ$ ./gradlew omnij-rpc:regTest