Commit Graph

124 Commits

Author SHA1 Message Date
Michael Toutonghi
0c8fa56a02 All latest updates, smart contracts, including oracle from KMD/jl777 2018-09-13 13:00:13 -07:00
Jonathan "Duke" Leto
25709e3078 These %lli/%li formats are platform-dependent 2018-08-06 22:50:38 +02:00
Michael Toutonghi
5034d1c134 Sync with latest Komodo changes 2018-08-06 12:52:22 -07:00
Jonathan "Duke" Leto
8e5de27a67 Fix some compile issues on os x 2018-08-05 23:53:07 -07:00
jl777
334687197b Merge pull request #789 from letolabs/snapshot
getsnapshot of top N addresses
2018-07-25 19:43:17 -11:00
Jonathan "Duke" Leto
66d08a3640 Fix compiler error: call of overloaded 'Pair(const char [9], time_t)' is ambiguous 2018-07-25 21:40:31 -07:00
Duke Leto
f1e1ea6133 WIP add 'top N only' feature to gensnapshot rpc 2018-07-23 04:33:47 +00:00
CHMEX
16f2495e19 add RD6GgnrMpPaTSMn8vai6yiGA7mN4QGPVMY Burnaddress
add burnaddress to excuding list
2018-07-20 09:48:34 +02:00
Duke Leto
1aa7af1794 Allow certain addresses to be ignored in snapshot 2018-07-20 05:01:07 +00:00
Duke Leto
70748123a9 Sort addresses by amounts in descending order 2018-07-20 04:40:34 +00:00
Duke Leto
c4a73444de Fix bug where some addresses are lost in sorting by using a vector instead of set and avoiding custom comparison function 2018-07-20 03:58:05 +00:00
Duke Leto
20ba439d05 Add number of utxos to metadata in json response 2018-07-19 05:37:27 +00:00
Duke Leto
a4d41984f6 Modify how we iterate and deal with the end of iteration, since iter->Valid seems to always be true 2018-07-18 19:44:16 +00:00
Duke Leto
3350160a6c Fix bug where finding index entries of other types, such as timestampindex, stopped our iterator 2018-07-18 16:02:53 +00:00
Duke Leto
539080b3a4 Less noise to stderr 2018-07-17 22:33:19 +00:00
Duke Leto
3eb535b8b4 Include start_time+end_time and correctly format amount 2018-07-17 22:31:06 +00:00
Duke Leto
6e74fd2578 In memory sorting, add a few metadata fields; printing small floats correctly still not working 2018-07-17 21:37:52 +00:00
Duke Leto
29a5aa99fd Move address+amount data to addresses key in JSON; add some useful metadata to snapshot response 2018-07-17 19:39:55 +00:00
Duke Leto
92dc28a3c9 Return snapshot info as JSON 2018-07-17 18:42:30 +00:00
Duke Leto
920f960122 Correctly print out snapshot data to stderr for now 2018-07-17 06:05:36 +00:00
Duke Leto
d62d9d7889 Almost working snapshot, we need to sum unspent outputs for each address and return to final snapshot data in json response 2018-07-17 01:40:24 +00:00
Duke Leto
cbce9f1f65 WIP debugging why leveldb iterator is broke 2018-07-14 23:00:09 +00:00
jl777
afd86eb21e Undo 2018-06-12 03:46:42 -11:00
jl777
32748f525e New iterator 2018-06-12 03:38:36 -11:00
jl777
de84abc1b0 Prints 2018-06-12 02:06:11 -11:00
jl777
74db3cd027 SeekToFirst 2018-06-12 02:01:14 -11:00
jl777
67d2e41b3f Test 2018-06-12 00:41:46 -11:00
jl777
bf91fda682 SnapShot -> snapshot 2018-06-12 00:35:59 -11:00
jl777
bd14699824 Syntax 2018-06-12 00:10:37 -11:00
jl777
936078888d int32_t CBlockTreeDB::SnapShot() 2018-06-12 00:04:00 -11:00
Michael Toutonghi
1f722359c1 Verus Proof of Stake Compete with Additional ant-fork protection on block 1 2018-05-13 18:59:06 -07:00
jl777
103fde3508 Test 2018-04-17 14:48:12 +03:00
jl777
a30dd993bf Test 2018-04-16 20:16:28 +03:00
jl777
e284540042 Test 2018-04-16 20:01:00 +03:00
jl777
3ad8d2478f Test 2018-04-16 19:46:37 +03:00
Scott Grayson
0c4f43951e Merge branch 'dev' of https://github.com/jl777/komodo into trunk-merge
* 'dev' of https://github.com/jl777/komodo: (1062 commits)
  Delay PoW check until connect block
  Declare
  KOMODO_NEWBLOCKS
  Prevent autorewind if syncing. Not a critical update
  Change n0/n1 size to int32_t
  Syntax
  Fix n -> static n0/n1
  Test
  Test
  Test
  KOMODO_LONGESTCHAIN = height;
  Sync main.cpp to jl777
  -print
  -USD/EUR
  readme
  curl fix
  -print
  Fix buffer overflows and reduce KMD men usage
  -print
  Test
  ...
2018-04-15 21:59:37 -04:00
TheTrunk
8b78a8199e Bitcore port 2018-03-27 13:34:52 +02:00
jl777
9000990c30 Merge remote-tracking branch 'zcash/master' into rebase2
# Conflicts:
#	.travis.yml
#	Makefile.am
#	README.md
#	configure.ac
#	depends/Makefile
#	depends/builders/darwin.mk
#	depends/funcs.mk
#	depends/hosts/darwin.mk
#	depends/packages/googlemock.mk
#	depends/packages/googletest.mk
#	depends/packages/libsnark.mk
#	depends/packages/libsodium.mk
#	depends/packages/packages.mk
#	depends/packages/rust.mk
#	src/Makefile.am
#	src/Makefile.gtest.include
#	src/chainparams.cpp
#	src/chainparams.h
#	src/checkpoints.h
#	src/clientversion.h
#	src/coins.cpp
#	src/consensus/consensus.h
#	src/gtest/test_mempool.cpp
#	src/httprpc.cpp
#	src/init.cpp
#	src/komodo-tx.cpp
#	src/main.cpp
#	src/miner.cpp
#	src/policy/fees.cpp
#	src/policy/fees.h
#	src/rpcmining.cpp
#	src/rpcrawtransaction.cpp
#	src/rpcserver.cpp
#	src/test/policyestimator_tests.cpp
#	src/test/rpc_wallet_tests.cpp
#	src/test/transaction_tests.cpp
#	src/txdb.cpp
#	src/txmempool.cpp
#	src/wallet/asyncrpcoperation_sendmany.cpp
#	src/wallet/rpcwallet.cpp
#	src/wallet/wallet.cpp
#	src/wallet/wallet.h
#	src/zcash/CreateJoinSplit.cpp
#	zcutil/build.sh
2018-03-25 18:44:38 +03:00
Jack Grigg
704b76358d Use block hash comparison for consistency check when loading block index
The Equihash check caused block index loading to take around 38x longer.
However, we don't need to check it directly, as the only paths to writing a
block header to disk already go through a proof-of-work check (e.g. receiving a
block over the network). By forcing the block header inside the CBlockIndex to
be re-serialized, we retain the benefits of the consistency check without the
overhead at startup.

Co-authored-by: Brad Miller <brad@z.cash>
2018-02-27 00:47:56 +00:00
Homu
50400310af Auto merge of #2977 - str4d:loadblockindexguts-correctness, r=str4d
Check Equihash solution when loading block index

An additional consistency check, which also ensures that the in-memory representation
matches the stored index.
2018-02-21 19:05:23 -08:00
Jack Grigg
44488400c1 Check Equihash solution when loading block index 2018-02-21 22:37:19 +00:00
Homu
6264927fef Auto merge of #2931 - jc23424:hashreserved-diskindex, r=str4d
read hashReserved from disk

This fixes a bug where the hashReserved field of the block header is not properly read back into CBlockIndex when loaded from disk. This happens to cause no issues currently because hashReserved has always been its default value (== 0), but if a block were ever mined where this was not the case, headers read back from disk would appear to have an invalid solution
2018-02-21 14:35:58 -08:00
jl777
81c5ec4f3c Dukeleto's https://github.com/zcash/zcash/pull/2931 2018-02-18 12:45:22 +02:00
Jonathan "Duke" Leto
c989bc86e3 Read hashReserved from disk instead of assuming 0
Related to https://github.com/zcash/zcash/pull/2931
2018-02-17 20:45:00 -08:00
Jack Grigg
828940b163 Use a boost::optional for nCachedBranchId
This enables us to distinguish between it being unset vs. being set to zero.
2018-02-06 22:42:18 +00:00
jc
15fb13f629 read hashReserved from disk block index 2018-02-04 21:40:14 -05:00
Jack Grigg
9e851450ab Adjust rewind logic to use the network upgrade mechanism 2018-02-04 22:58:42 +00:00
Jack Grigg
ad6a36ad02 Track net value entering and exiting the Sprout circuit
Delta values will be stored for new blocks; old blocks can be filled in by
re-indexing. The net value currently in the Sprout circuit is only calculated
when delta values for all previous blocks are present.
2017-12-14 22:06:11 +00:00
Jack Grigg
c66c731adf Add a benchmark for calling ConnectBlock on a block with many inputs
Requires placing block-107134.tar.gz (containing the block, and a fake CoinsDB
containing its inputs) into the base directory of the repository. This can be
generated using qa/zcash/create_benchmark_archive.py (see the script for usage
details).

To facilitate generation of the fake CoinsDB, an additional field 'valueZat' has
been added to 'getrawtransaction' containing the integer number of zatoshis
instead of a decimal number of ZEC.

Closes #2355.
2017-05-18 11:03:46 +12:00
jl777
945f015d80 Initial merge 2017-03-30 04:35:16 +03:00