Skip to content

Commit

Permalink
Merge pull request #1766 from aeternity/PT-161587081-tweak_cuckoo
Browse files Browse the repository at this point in the history
Update to tweaked cuckoo + tweak verification (and tests)
  • Loading branch information
hanssv committed Nov 13, 2018
2 parents f66ae79 + 5c47f15 commit d226983
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion apps/aecore/test/aec_mining_tests.erl
Expand Up @@ -34,7 +34,7 @@ mine_block_test_() ->
% in order to find a proper nonce for your
% block uncomment the line below
% let_it_crash = generate_valid_test_data(TopBlock, 100000000000000),
Nonce = 2842318173940299374,
Nonce = 8116356783679140109,
{BlockCandidate,_} = aec_test_utils:create_keyblock_with_state(
[{TopBlock, aec_trees:new()}], ?TEST_PUB),

Expand Down
2 changes: 1 addition & 1 deletion apps/aecore/test/aec_pow_cuckoo_tests.erl
Expand Up @@ -16,7 +16,7 @@

-define(TEST_BIN, <<"wsffgujnjkqhduihsahswgdf">>).

-define(TEST_HIGH_NONCE, 74). %% Nonce with solution with high target.
-define(TEST_HIGH_NONCE, 38). %% Nonce with solution with high target.

pow_test_() ->
{setup,
Expand Down
2 changes: 1 addition & 1 deletion apps/aecuckoo/Makefile
Expand Up @@ -26,7 +26,7 @@ BLAKE_2B_SRC ?= ../crypto/blake2b-ref.c
# end Flags from upstream

REPO = https://github.com/aeternity/cuckoo.git
COMMIT = 51351332d23a11bc30e2457bd98f1c2ba358eb1e
COMMIT = a66b88ab8514b7232b1e148a4760f9258d5457f0

.PHONY: all
all: $(EXECUTABLES)
Expand Down
2 changes: 1 addition & 1 deletion apps/aecuckoo/test/aecuckoo_SUITE.erl
Expand Up @@ -33,7 +33,7 @@ groups() ->
].

init_per_group(smoke_tests_15, Config) ->
[{nonce, 86} | Config];
[{nonce, 28} | Config];
init_per_group(mean15, Config) ->
[{miner, 'mean15-generic'} | Config];
init_per_group(lean15, Config) ->
Expand Down
3 changes: 2 additions & 1 deletion apps/aeutils/src/aeu_siphash24.erl
Expand Up @@ -48,7 +48,8 @@ hash(K0, K1, K2, K3, Nonce) ->
V3 = K3 bxor Nonce,
{V01, V11, V21, V31} =
sip_round(sip_round(sip_round(sip_round(sip_change(Nonce, sip_round(sip_round({V0, V1, V2, V3}))))))),
((V01 bxor V11) bxor (V21 bxor V31)) band 16#ffffffffffffffff.
rotl64(((V01 bxor V11) bxor (V21 bxor V31)), 17) band 16#ffffffffffffffff.


%%%=============================================================================
%%% Internal functions
Expand Down
2 changes: 1 addition & 1 deletion deployment/DB_VERSION
@@ -1 +1 @@
110
111

0 comments on commit d226983

Please sign in to comment.