Commit graph

933 commits

Author SHA1 Message Date
Brannon King
fd6e26608d removed duplicate trie in RAM, other norm fixes
also includes code to validate incoming utf8
moved normalization from claimTrie; all in cache now

also fixed a few post-merge issues
added handling for support normalization

fixed failure to handle unnormalized items reinserted on rollback

fixing ICU deps for Travis build

get more info on Travis build failure

Travis experiment 2: ICU fPIC

add independent tests to check string normalization only

move comment to proper location, and note what excpetion is thrown

add RPC call checknormalization so user can see what normalization does

made expiration at norm time smarter

also rearranged unit test code to avoid some spurious errors
made ICU compile statically

also fixed early exit in reproducible_build script
changed to keep original name

removed ability to return just-added supports

it was impossible to get the normalized names correct there
apparently the -s is no longer appreciated

moved normalization code to separate file

also fixed bug on effective amount
fixed performance problem on trie upgrade

fixed issue with valid height on rollback

fixed issue with post-normalization name q data

fixed failure to remove normalized claims on rollback

post-merge fixes

post-merge fixes
2019-02-09 12:02:59 -07:00
lbrynaut
3edbb2627e Implement a hard fork to normalize claim names
Apply (self) review feedback
Clean deps required for boost to rebuild with icu support (for now)
Normalization bug fixes and improvements
Clang-formatting
2019-02-09 12:02:59 -07:00
Brannon King
02986f766c Replace flattenTrie by callback
Signed-off-by: Anthony Fieroni <bvbfan@abv.bg>

Use interruption point instead of boolean condition

Signed-off-by: Anthony Fieroni <bvbfan@abv.bg>

Add ability to earlier exit in rpc methods getclaimtrie and getclaimsintrie

Signed-off-by: Anthony Fieroni <bvbfan@abv.bg>

simplified early exit handling


ran formatter
2018-12-14 08:27:35 +01:00
kay kurokawa
3ca72b18cc Adjust each unit test to use its own reinitialized unique_block_counter, move CreateCoinbase and CreateBlock functions inside of ClaimTrieChainFixture 2018-12-06 22:41:40 -05:00
kay kurokawa
8b3f2e8b03 Add tests to trigger https://github.com/lbryio/lbrycrd/issues/243 2018-12-06 17:03:31 -05:00
Ariel Rodriguez
15be5dacce Remove unnecessary height field in removeClaim method 2018-11-08 15:29:28 -07:00
Brannon King
0830074e15 fixed issue with invalid usage of trie's root node in cache 2018-10-31 13:44:14 -06:00
kay kurokawa
bed577d9cf add some tests for new CClaimTrieCache functions in claimtriecache_tests.cpp 2018-10-31 13:44:14 -06:00
Anthony Fieroni
f86eb54077 Add block hash parameter to claimtrie rpc methods
Signed-off-by: Anthony Fieroni <bvbfan@abv.bg>
2018-10-31 13:44:14 -06:00
lbrynaut
0113a3ad70
Merge pull request #194 from shyba/claim_index_tests
add extra tests for the claim index
2018-09-04 07:55:02 -05:00
lbrynaut
e5d80b0f51 Fix incorrect usage of the claim index so that we can properly
maintain state through re-orgs and delayed activation states.

Includes get_claim_by_id_test_2 and get_claim_by_id_test_3 written by
Kay.
2018-08-28 09:25:30 -05:00
Victor Shyba
d93f4d8b09 add extra tests for the claim index 2018-08-20 23:59:41 -03:00
Brannon King
7c3ef9b635 moved claimtrie_tests into claimtriebranching_tests
to take advantage of the test fixture there

added counts & hash checks to tests

also ran the code format tool

ran the formatting tool

cleaned up the earlier question on hashes, fixed crash bug

ran formatter
2018-08-07 16:03:53 -06:00
winder
e381336281
Sanitize claimtrie RPC commands. 2018-07-19 15:03:05 -04:00
lbrynaut
30c65694b9 Ensure bool is allocated for later assignment(s) 2018-07-16 09:17:30 -04:00
kay kurokawa
aed3b9b148 add a comment about nProportionalDelayFactor for a test on claimtriebranching_tests.cpp
Signed-off-by: kay kurokawa <kay@lbry.io>
2018-07-08 15:05:26 -04:00
kay kurokawa
4e147cb380 Extend expiration of pre fork claims and supports. Adjust and add unit test for the extended expiration hardfork. 2018-05-24 00:30:07 -04:00
lbrynaut
dc34766423 Implement a hard fork for extended claim expiration times. Added unit tests for extended claim expiration. 2018-05-24 00:30:07 -04:00
lbrynaut
7930840005 Add a simple claim by id test 2018-05-18 13:15:43 -04:00
lbrynaut
d5df3ff10d Simplify the claim index by reducing the memory cache in exchange for
slightly higher latency calls to leveldb

Add a simple claim by id test
2018-05-18 13:15:43 -04:00
kay kurokawa
e120c1de69 best_claim_effective_amount_equals was not using getEffectiveAmountForClaim 2018-05-14 17:48:50 -04:00
Victor Shyba
6b13bd1d45 Add tests for CClaimTrie::getEffectiveAmountForClaim 2018-04-23 13:35:44 -04:00
Kay Kurokawa
4ff143387e integrate new CalcMinClaimTrieFee function into the memory pool check and wallet transaction creation.
increase DEFAULT_TRANSACTION_MAXFEE to accomodate the claim trie minimum fee that will exceed 0.1 credits.
2018-04-18 16:54:11 -04:00
Kay Kurokawa
8817a7df51 Add new function CalcMinClaimTrieFee to calulate the fee required for claimtrie transactions 2018-04-18 16:54:11 -04:00
Kay Kurokawa
62f4bedb17 add unit test for recursivePruneName and merklehash computation test in claimtriecache_tests.cpp 2018-04-18 16:24:32 -04:00
Kay Kurokawa
2f7c03cbe8 added a sanity check for making sure updates extend the expiration in claimtriebranching_tests, fixed white space 2018-04-16 12:32:51 -04:00
Kay Kurokawa
865f746636 add unit test to see if having a support and an abandon in the same block when there are not other claim will crash lbryrcrd 2017-12-28 11:43:10 -05:00
Kay Kurokawa
86592934cb Adding effective amount function to CClaimTrie 2017-01-04 13:57:28 -05:00
kkurokawa
03b3828a65 adding test to check for spend of support where i in of txin[i] is not 0 2016-11-01 15:46:32 -04:00
kkurokawa
34f61bbbf0 adding new claimtrie branching tests 2016-10-28 14:28:11 -04:00
Job Evers‐Meltzer
b89ff5f456 Merge pull request #34 from kaykurokawa/check_dust
Re-enable dust threshold checks
2016-10-18 11:27:20 -05:00
kkurokawa
1b80858a44 adding test to check the POW algorithm 2016-08-10 21:04:04 -04:00
kkurokawa
e0089d19f2 adding test for block with bogus claim trie hash 2016-08-10 16:45:36 -04:00
kkurokawa
50c2ed0fee lowering dust threshold to 1 , in order to not break lbrynet 2016-08-08 20:49:40 -04:00
kkurokawa
b51444fd5c Re-enable dust threshold checks 2016-08-07 18:58:14 -04:00
Jeremy Kauffman
d0214d14c5 Merge pull request #14 from jimmykiselak/bogus_claimid_tests
Bogus claimid tests
2016-07-27 18:35:31 -04:00
kkurokawa
ad7304e321 Limits name length of claimtrie transactions to 255 bytes 2016-07-21 14:58:49 -04:00
Jimmy Kiselak
b6e686538f add tests that verify updates with bogus claimids never make it into the trie 2016-07-11 00:07:04 -04:00
kkurokawa
88c28a7fd6 Updating chainparams, adding checkpoint at block 4000 to mainnet, fixing broken tests 2016-07-01 15:06:28 -04:00
Jack
4d4e693788 merge realnewpow2 2016-06-22 10:04:22 -04:00
kkurokawa
131006b10d Switching to digishield difficulty retargeting algorithm
merge from kaykurokawa/lbrycrd
2016-06-20 17:34:02 -04:00
Jimmy Kiselak
c09b81d37e new PoW hash function 2016-06-17 22:44:51 -04:00
Jimmy Kiselak
864533c699 use PoW hash in test_bitcoin, use pound defs for generating genesis block 2016-06-17 22:34:48 -04:00
Jimmy Kiselak
e08d765f11 Merge branch 'master' of https://github.com/bitcoin/bitcoin into realusmerge
Conflicts:
	Makefile.am
	README.md
	configure.ac
	contrib/seeds/nodes_main.txt
	qa/rpc-tests/decodescript.py
	qa/rpc-tests/test_framework/util.py
	src/Makefile.am
	src/Makefile.qt.include
	src/Makefile.qttest.include
	src/Makefile.test.include
	src/bitcoin-cli-res.rc
	src/bitcoin-cli.cpp
	src/bitcoin-tx.cpp
	src/bitcoind.cpp
	src/chainparams.cpp
	src/chainparamsseeds.h
	src/init.cpp
	src/main.cpp
	src/main.h
	src/miner.cpp
	src/net.cpp
	src/primitives/block.cpp
	src/rpc/mining.cpp
	src/rpc/rawtransaction.cpp
	src/rpc/server.cpp
	src/rpcserver.h
	src/script/interpreter.cpp
	src/script/script.cpp
	src/script/script.h
	src/test/alert_tests.cpp
	src/test/data/alertTests.raw
	src/test/data/script_invalid.json
	src/test/data/script_valid.json
	src/test/data/tx_invalid.json
	src/test/data/tx_valid.json
	src/test/miner_tests.cpp
	src/test/script_tests.cpp
	src/test/test_bitcoin.cpp
	src/test/test_bitcoin.h
	src/test/transaction_tests.cpp
	src/timedata.cpp
	src/util.cpp
	src/wallet/rpcwallet.cpp
	src/wallet/wallet.cpp
	src/wallet/wallet.h
2016-05-15 22:16:56 -04:00
Jimmy Kiselak
a78dfae04f get tests passing for new block rewards, change initial reward to 400M 2016-04-16 18:42:11 -04:00
Kaz Wesley
4ed41a2b61 test prevector::swap
- add a swap operation to prevector tests (fails due to broken prevector::swap)
- fix 2 prevector test operation conditions that were impossible
2016-04-16 08:05:11 -07:00
Jimmy Kiselak
f2ebd4bcd4 fix address prefix tests and change difficulty readjustment interval 2016-04-16 02:16:32 -04:00
Wladimir J. van der Laan
9e47fcec17
Merge #7756: Add cursor to iterate over utxo set, use this in gettxoutsetinfo
509cb00 txdb: Add Cursor() method to CCoinsView to iterate over UTXO set (Wladimir J. van der Laan)
2016-04-15 16:43:21 +02:00
Wladimir J. van der Laan
509cb006d5 txdb: Add Cursor() method to CCoinsView to iterate over UTXO set
Add a method Cursor() to CCoinsView that returns a cursor which can be
used to iterate over the whole UTXO set.

- rpc: Change gettxoutsetinfo to use new Cursor method

- txdb: Remove GetStats method - Now that GetStats is implemented in
  terms of Cursor, remove it.
2016-04-15 16:33:05 +02:00
Wladimir J. van der Laan
48c5adfbce
Merge #6215: add bip32 pub key serialization
90604f1 add bip32 pubkey serialization (Jonas Schnelli)
2016-04-15 07:59:38 +02:00