From 20d80ef90c27bb8dc4cb1b30fcb0d94732ac7107 Mon Sep 17 00:00:00 2001 From: Jack Robison Date: Tue, 7 Jun 2016 21:25:24 -0400 Subject: [PATCH 1/8] add libevent --- reproducable-build | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/reproducable-build b/reproducable-build index ca33f4d97..62c9104d5 100644 --- a/reproducable-build +++ b/reproducable-build @@ -1,6 +1,7 @@ sudo apt-get install build-essential python-dev libbz2-dev libtool autotools-dev autoconf git pkg-config mkdir dependencies cd dependencies + wget http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz tar xf db-4.8.30.NC.tar.gz export BDB_PREFIX="`pwd`/bdb" @@ -9,6 +10,7 @@ cd db-4.8.30.NC/build_unix make make install cd ../../ + wget https://www.openssl.org/source/openssl-1.0.1p.tar.gz tar xf openssl-1.0.1p.tar.gz export OPENSSL_PREFIX="`pwd`/openssl_build" @@ -16,8 +18,9 @@ cd openssl-1.0.1p ./Configure --prefix=$OPENSSL_PREFIX --openssldir=$OPENSSL_PREFIX/ssl [linux-generic32/linux-x86_64] -fPIC -static no-shared no-dso make make install -export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}:${OPENSSL_BUILD}/lib/pkgconfig/" +export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}:${OPENSSL_PREFIX}/lib/pkgconfig/" cd .. + wget http://sourceforge.net/projects/boost/files/boost/1.59.0/boost_1_59_0.tar.bz2/download -O boost_1_59_0.tar.bz2 tar xf boost_1_59_0.tar.bz2 cd boost_1_59_0 @@ -25,10 +28,21 @@ export BOOST_ROOT=`pwd` ./bootstrap.sh ./b2 link=static cxxflags=-fPIC stage cd ../../ + +mkdir libevent_build +git clone https://github.com/libevent/libevent.git +export LIBEVENT_PREFIX="`pwd`/libevent_build" +cd libevent +./autogen.sh +./configure --prefix=$LIBEVENT_PREFIX --enable-static --disable-shared --with-pic LDFLAGS="-L${OPENSSL_PREFIX}/lib/" CPPFLAGS="-I${OPENSSL_PREFIX}/include" +make +make install +cd .. + git clone https://github.com/lbryio/lbrycrd cd lbrycrd ./autogen.sh -./configure --without-gui LDFLAGS="-L${OPENSSL_PREFIX}/lib/ -L${BDB_PREFIX}/lib/ -static-libstdc++" CPPFLAGS="-I${OPENSSL_PREFIX}/include -I${BDB_PREFIX}/include" +./configure --without-gui LDFLAGS="-L${OPENSSL_PREFIX}/lib/ -L${BDB_PREFIX}/lib/ -L${LIBEVENT_PREFIX}/lib/ -static-libstdc++" CPPFLAGS="-I${OPENSSL_PREFIX}/include -I${BDB_PREFIX}/include -I${LIBEVENT_PREFIX}/include/" make strip src/lbrycrdd strip src/lbrycrd-cli From 6fc0a906d38d176a37d4c7e89e138d01b43b38be Mon Sep 17 00:00:00 2001 From: Jack Robison Date: Tue, 7 Jun 2016 21:34:19 -0400 Subject: [PATCH 2/8] update seeds --- src/chainparamsseeds.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/chainparamsseeds.h b/src/chainparamsseeds.h index 91af2e3ad..4d997309e 100644 --- a/src/chainparamsseeds.h +++ b/src/chainparamsseeds.h @@ -8,10 +8,10 @@ * IPv4 as well as onion addresses are wrapped inside a IPv6 address accordingly. */ static SeedSpec6 pnSeed6_main[] = { - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x34,0x1b,0x4e,0x38}, 8333} + {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2d,0x20,0x27,0xf1}, 9246} }; static SeedSpec6 pnSeed6_test[] = { - + {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2d,0x20,0x27,0xf1}, 19246} }; #endif // BITCOIN_CHAINPARAMSSEEDS_H From cada713b1d68e41a958ab5dd3bae3bc1142777ff Mon Sep 17 00:00:00 2001 From: Jack Robison Date: Tue, 7 Jun 2016 21:36:03 -0400 Subject: [PATCH 3/8] update node ip --- contrib/seeds/nodes_main.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/seeds/nodes_main.txt b/contrib/seeds/nodes_main.txt index ed5059ffc..0ebe54b97 100644 --- a/contrib/seeds/nodes_main.txt +++ b/contrib/seeds/nodes_main.txt @@ -1 +1 @@ -52.27.78.56:9246 +45.32.39.241:9246 From b4e19e9ca43a4251222da5b4df23e69f2b29d864 Mon Sep 17 00:00:00 2001 From: Jack Robison Date: Tue, 7 Jun 2016 21:36:27 -0400 Subject: [PATCH 4/8] add testnet node --- contrib/seeds/nodes_test.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/contrib/seeds/nodes_test.txt b/contrib/seeds/nodes_test.txt index 289ed4a77..f73578089 100644 --- a/contrib/seeds/nodes_test.txt +++ b/contrib/seeds/nodes_test.txt @@ -1,5 +1,7 @@ # List of fixed seed nodes for testnet +45.32.39.241:19246 + # Onion nodes #thfsmmn2jbitcoin.onion #it2pj4f7657g3rhi.onion From 34d3d467b52da1751c443167fd8017ecf7ed1df3 Mon Sep 17 00:00:00 2001 From: Jack Robison Date: Tue, 7 Jun 2016 22:41:38 -0400 Subject: [PATCH 5/8] checkout real branch and don't build for generic32 --- reproducable-build | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/reproducable-build b/reproducable-build index 62c9104d5..e89a1b5b6 100644 --- a/reproducable-build +++ b/reproducable-build @@ -14,8 +14,9 @@ cd ../../ wget https://www.openssl.org/source/openssl-1.0.1p.tar.gz tar xf openssl-1.0.1p.tar.gz export OPENSSL_PREFIX="`pwd`/openssl_build" +mkdir $OPENSSL_PREFIX cd openssl-1.0.1p -./Configure --prefix=$OPENSSL_PREFIX --openssldir=$OPENSSL_PREFIX/ssl [linux-generic32/linux-x86_64] -fPIC -static no-shared no-dso +./Configure --prefix=$OPENSSL_PREFIX --openssldir=$OPENSSL_PREFIX/ssl linux-x86_64 -fPIC -static no-shared no-dso make make install export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}:${OPENSSL_PREFIX}/lib/pkgconfig/" @@ -41,6 +42,7 @@ cd .. git clone https://github.com/lbryio/lbrycrd cd lbrycrd +git checkout real ./autogen.sh ./configure --without-gui LDFLAGS="-L${OPENSSL_PREFIX}/lib/ -L${BDB_PREFIX}/lib/ -L${LIBEVENT_PREFIX}/lib/ -static-libstdc++" CPPFLAGS="-I${OPENSSL_PREFIX}/include -I${BDB_PREFIX}/include -I${LIBEVENT_PREFIX}/include/" make From ae72d636db78456a4780416bbf530c7e368e7c7f Mon Sep 17 00:00:00 2001 From: Jack Date: Mon, 13 Jun 2016 14:38:35 -0400 Subject: [PATCH 6/8] merge claimtrie-commands --- contrib/seeds/nodes_main.txt | 1 + reproducable-build | 3 ++- src/chainparams.cpp | 2 +- src/chainparamsseeds.h | 3 ++- src/rpc/claimtrie.cpp | 19 +++++++++++++++++++ src/rpc/register.h | 4 ++++ src/wallet/rpcwallet.cpp | 6 ++++++ 7 files changed, 35 insertions(+), 3 deletions(-) diff --git a/contrib/seeds/nodes_main.txt b/contrib/seeds/nodes_main.txt index 0ebe54b97..7e0bbbe19 100644 --- a/contrib/seeds/nodes_main.txt +++ b/contrib/seeds/nodes_main.txt @@ -1 +1,2 @@ 45.32.39.241:9246 +45.32.40.180:9246 \ No newline at end of file diff --git a/reproducable-build b/reproducable-build index e89a1b5b6..e2e20b070 100644 --- a/reproducable-build +++ b/reproducable-build @@ -1,4 +1,5 @@ sudo apt-get install build-essential python-dev libbz2-dev libtool autotools-dev autoconf git pkg-config + mkdir dependencies cd dependencies @@ -24,8 +25,8 @@ cd .. wget http://sourceforge.net/projects/boost/files/boost/1.59.0/boost_1_59_0.tar.bz2/download -O boost_1_59_0.tar.bz2 tar xf boost_1_59_0.tar.bz2 +export BOOST_ROOT="`pwd`/boost_1_59_0" cd boost_1_59_0 -export BOOST_ROOT=`pwd` ./bootstrap.sh ./b2 link=static cxxflags=-fPIC stage cd ../../ diff --git a/src/chainparams.cpp b/src/chainparams.cpp index 23f3e10d0..7ce739aae 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -159,7 +159,7 @@ public: vSeeds.clear(); vFixedSeeds.clear(); - vSeeds.push_back(CDNSSeedData("lbrycrd.lbry.io", "seed.lbrycrd.lbry.io")); // lbry.io + vSeeds.push_back(CDNSSeedData("lighthouse.lbry.io", "seed.lighthouse.lbry.io")); // lbry.io base58Prefixes[PUBKEY_ADDRESS] = std::vector(1,0x55); base58Prefixes[SCRIPT_ADDRESS] = std::vector(1,0x7a); diff --git a/src/chainparamsseeds.h b/src/chainparamsseeds.h index 4d997309e..1e66a3621 100644 --- a/src/chainparamsseeds.h +++ b/src/chainparamsseeds.h @@ -8,7 +8,8 @@ * IPv4 as well as onion addresses are wrapped inside a IPv6 address accordingly. */ static SeedSpec6 pnSeed6_main[] = { - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2d,0x20,0x27,0xf1}, 9246} + {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2d,0x20,0x27,0xf1}, 9246}, + {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2d,0x20,0x28,0xb4}, 9246} }; static SeedSpec6 pnSeed6_test[] = { diff --git a/src/rpc/claimtrie.cpp b/src/rpc/claimtrie.cpp index 388225609..1307a1c6f 100644 --- a/src/rpc/claimtrie.cpp +++ b/src/rpc/claimtrie.cpp @@ -520,3 +520,22 @@ UniValue getnameproof(const UniValue& params, bool fHelp) return proofToJSON(proof); } + +static const CRPCCommand commands[] = +{ // category name actor (function) okSafeMode + // --------------------- ------------------------ ----------------------- ---------- + { "Claimtrie", "getclaimsintrie", &getclaimsintrie, true }, + { "Claimtrie", "getclaimtrie", &getclaimtrie, true }, + { "Claimtrie", "getvalueforname", &getvalueforname, true }, + { "Claimtrie", "gettotalclaimednames", &gettotalclaimednames, true }, + { "Claimtrie", "gettotalclaims", &gettotalclaims, true }, + { "Claimtrie", "gettotalvalueofclaims", &gettotalvalueofclaims, true }, + { "Claimtrie", "getclaimsfortx", &getclaimsfortx, true }, + { "Claimtrie", "getnameproof", &getnameproof, true }, +}; + +void RegisterClaimTrieRPCCommands(CRPCTable &tableRPC) +{ + for (unsigned int vcidx = 0; vcidx < ARRAYLEN(commands); vcidx++) + tableRPC.appendCommand(commands[vcidx].name, &commands[vcidx]); +} diff --git a/src/rpc/register.h b/src/rpc/register.h index 01aa58a25..e8406deac 100644 --- a/src/rpc/register.h +++ b/src/rpc/register.h @@ -19,6 +19,9 @@ void RegisterMiscRPCCommands(CRPCTable &tableRPC); void RegisterMiningRPCCommands(CRPCTable &tableRPC); /** Register raw transaction RPC commands */ void RegisterRawTransactionRPCCommands(CRPCTable &tableRPC); +/** Register claim trie RPC commands */ +void RegisterClaimTrieRPCCommands(CRPCTable &tableRPC); + static inline void RegisterAllCoreRPCCommands(CRPCTable &tableRPC) { @@ -27,6 +30,7 @@ static inline void RegisterAllCoreRPCCommands(CRPCTable &tableRPC) RegisterMiscRPCCommands(tableRPC); RegisterMiningRPCCommands(tableRPC); RegisterRawTransactionRPCCommands(tableRPC); + RegisterClaimTrieRPCCommands(tableRPC); } #endif diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index d1c5cbb17..bfa0623fb 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -3138,6 +3138,12 @@ static const CRPCCommand commands[] = { "wallet", "walletpassphrasechange", &walletpassphrasechange, true }, { "wallet", "walletpassphrase", &walletpassphrase, true }, { "wallet", "removeprunedfunds", &removeprunedfunds, true }, + { "Claimtrie", "claimname", &claimname, true }, + { "Claimtrie", "updateclaim", &updateclaim, true }, + { "Claimtrie", "abandonclaim", &abandonclaim, true }, + { "Claimtrie", "listnameclaims", &listnameclaims, true }, + { "Claimtrie", "supportclaim", &supportclaim, true }, + { "Claimtrie", "abandonsupport", &abandonsupport, true }, }; void RegisterWalletRPCCommands(CRPCTable &tableRPC) From e8212f3eb76c37fcd2c9383d0f8505ce5b2d606c Mon Sep 17 00:00:00 2001 From: Jack Date: Mon, 13 Jun 2016 14:42:37 -0400 Subject: [PATCH 7/8] add more dns seeds --- src/chainparams.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/chainparams.cpp b/src/chainparams.cpp index 7ce739aae..c77b288fb 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -159,7 +159,10 @@ public: vSeeds.clear(); vFixedSeeds.clear(); - vSeeds.push_back(CDNSSeedData("lighthouse.lbry.io", "seed.lighthouse.lbry.io")); // lbry.io + vSeeds.push_back(CDNSSeedData("lbry.io", "dnsseed1.lbry.io")); // lbry.io + vSeeds.push_back(CDNSSeedData("lbry.io", "dnsseed2.lbry.io")); // lbry.io + vSeeds.push_back(CDNSSeedData("lbry.io", "dnsseed3.lbry.io")); // lbry.io + base58Prefixes[PUBKEY_ADDRESS] = std::vector(1,0x55); base58Prefixes[SCRIPT_ADDRESS] = std::vector(1,0x7a); From ed381288f173f0240ede51952513797aa8b58664 Mon Sep 17 00:00:00 2001 From: Jack Date: Tue, 14 Jun 2016 15:28:02 -0400 Subject: [PATCH 8/8] register mining commands --- src/rpc/mining.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/rpc/mining.cpp b/src/rpc/mining.cpp index 2c34ccac4..76a0cea50 100644 --- a/src/rpc/mining.cpp +++ b/src/rpc/mining.cpp @@ -857,6 +857,8 @@ static const CRPCCommand commands[] = { "mining", "prioritisetransaction", &prioritisetransaction, true }, { "mining", "getblocktemplate", &getblocktemplate, true }, { "mining", "submitblock", &submitblock, true }, + { "mining", "setgenerate", &setgenerate, true }, + { "mining", "getgenerate", &getgenerate, true }, { "generating", "generate", &generate, true }, { "generating", "generatetoaddress", &generatetoaddress, true },