From bd8a2e3fab7a518c17e947fb40d19a972aae749b Mon Sep 17 00:00:00 2001 From: jeffgrunewald Date: Thu, 12 May 2022 14:26:41 -0400 Subject: [PATCH 1/2] switching to all compressed snaps: --- rebar.config | 2 +- rebar.lock | 10 +++++----- src/be_db_block.erl | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/rebar.config b/rebar.config index 01e8fb4c..75b14d9b 100644 --- a/rebar.config +++ b/rebar.config @@ -24,7 +24,7 @@ {psql_migration, {git, "https://github.com/helium/psql-migration.git", {branch, "master"}}}, {clique, {git, "https://github.com/helium/clique.git", {branch, "develop"}}}, {blockchain, - {git, "https://github.com/helium/blockchain-core.git", {branch, "master"}}}, + {git, "https://github.com/helium/blockchain-core.git", {branch, "jg/add_snap_gz_extension"}}}, {envloader, {git, "https://github.com/nuex/envloader.git", {branch, "master"}}} ]}. diff --git a/rebar.lock b/rebar.lock index 5511c531..412df192 100644 --- a/rebar.lock +++ b/rebar.lock @@ -5,12 +5,12 @@ {<<"base64url">>,{pkg,<<"base64url">>,<<"1.0.1">>},0}, {<<"blockchain">>, {git,"https://github.com/helium/blockchain-core.git", - {ref,"256ba67cd18ea6f763e505f540595dc8d89feb41"}}, + {ref,"f5f7a4693ca68ddd1010f9248fd3a853ad6b9cf7"}}, 0}, {<<"certifi">>,{pkg,<<"certifi">>,<<"2.9.0">>},1}, {<<"chatterbox">>, {git,"https://github.com/andymck/chatterbox", - {ref,"b56a2a08b8a31b7ab0d536e5e8a55d5abe70390f"}}, + {ref,"9055e611d509eec2f182bbf52a54ec821b17ac59"}}, 2}, {<<"clique">>, {git,"https://github.com/helium/clique.git", @@ -75,7 +75,7 @@ 2}, {<<"grpcbox">>, {git,"https://github.com/andymck/grpcbox.git", - {ref,"fbf689bb9c25fc2943155c891974e1f745ce5ac7"}}, + {ref,"e7e81ea7518280ec30cccb9f386e52eb111d170a"}}, 1}, {<<"h3">>, {git,"https://github.com/helium/erlang-h3.git", @@ -84,7 +84,7 @@ {<<"hackney">>,{pkg,<<"hackney">>,<<"1.17.0">>},0}, {<<"helium_proto">>, {git,"https://github.com/helium/proto.git", - {ref,"ff36c415bcc5056dc306eb50d7afa83e52016df8"}}, + {ref,"73ed90cc875451ddcdff968a368c586e55eb730a"}}, 1}, {<<"hpack">>,{pkg,<<"hpack_erl">>,<<"0.2.3">>},3}, {<<"idna">>,{pkg,<<"idna">>,<<"6.1.1">>},1}, @@ -100,7 +100,7 @@ {<<"lager">>,{pkg,<<"lager">>,<<"3.9.2">>},0}, {<<"libp2p">>, {git,"https://github.com/helium/erlang-libp2p.git", - {ref,"059ab21518633b1a99dbf17d6d5ca510d8e50f6f"}}, + {ref,"95fd37f967e6d83b9fd7796ef7d060abff47a018"}}, 1}, {<<"libp2p_crypto">>, {git,"https://github.com/helium/libp2p-crypto.git", diff --git a/src/be_db_block.erl b/src/be_db_block.erl index b4196022..d0247d11 100644 --- a/src/be_db_block.erl +++ b/src/be_db_block.erl @@ -139,11 +139,11 @@ maybe_write_snapshot(_, <<>>, _, _Chain) -> maybe_write_snapshot(Height, SnapshotHash, SnapshotDir, Chain) -> {ok, BinSnap} = case blockchain:get_snapshot(SnapshotHash, Chain) of - {error, not_found} -> blockchain:get_snapshot(Height, Chain); + {error, NF} when NF =:= not_found; NF =:= file_not_found -> blockchain:get_snapshot(Height, Chain); Other -> Other end, Filename = filename:join([SnapshotDir, io_lib:format("snap-~p", [Height])]), - ok = blockchain:save_bin_snapshots(Filename, BinSnap), + ok = blockchain:save_compressed_bin_snapshot(Filename, BinSnap), {ok, Sz, FHash} = blockchain:maybe_get_compressed_snapdata(Filename), LatestMap = #{ height => Height, From 0e790f40a1d59ba141c5de5a627e8a4cf1d89b51 Mon Sep 17 00:00:00 2001 From: jeffgrunewald Date: Fri, 13 May 2022 12:47:26 -0400 Subject: [PATCH 2/2] pulling in latest core updates --- rebar.config | 2 +- rebar.lock | 15 ++++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/rebar.config b/rebar.config index 75b14d9b..01e8fb4c 100644 --- a/rebar.config +++ b/rebar.config @@ -24,7 +24,7 @@ {psql_migration, {git, "https://github.com/helium/psql-migration.git", {branch, "master"}}}, {clique, {git, "https://github.com/helium/clique.git", {branch, "develop"}}}, {blockchain, - {git, "https://github.com/helium/blockchain-core.git", {branch, "jg/add_snap_gz_extension"}}}, + {git, "https://github.com/helium/blockchain-core.git", {branch, "master"}}}, {envloader, {git, "https://github.com/nuex/envloader.git", {branch, "master"}}} ]}. diff --git a/rebar.lock b/rebar.lock index 412df192..42b417eb 100644 --- a/rebar.lock +++ b/rebar.lock @@ -1,15 +1,18 @@ {"1.2.0", -[{<<"acceptor_pool">>,{pkg,<<"acceptor_pool">>,<<"1.0.0">>},2}, +[{<<"acceptor_pool">>, + {git,"https://github.com/novalabsxyz/acceptor_pool", + {ref,"1f0a0c0ff43ab8a0cb074e71d9319237b155afe7"}}, + 2}, {<<"backoff">>,{pkg,<<"backoff">>,<<"1.1.6">>},2}, {<<"base32">>,{pkg,<<"base32">>,<<"0.1.0">>},4}, {<<"base64url">>,{pkg,<<"base64url">>,<<"1.0.1">>},0}, {<<"blockchain">>, {git,"https://github.com/helium/blockchain-core.git", - {ref,"f5f7a4693ca68ddd1010f9248fd3a853ad6b9cf7"}}, + {ref,"de79b0869a19d053edc7399e2c42c1c863e36bdd"}}, 0}, {<<"certifi">>,{pkg,<<"certifi">>,<<"2.9.0">>},1}, {<<"chatterbox">>, - {git,"https://github.com/andymck/chatterbox", + {git,"https://github.com/novalabsxyz/chatterbox", {ref,"9055e611d509eec2f182bbf52a54ec821b17ac59"}}, 2}, {<<"clique">>, @@ -74,8 +77,8 @@ {ref,"a77686b55b60b052d6c7cd927d04dde429bbdabf"}}, 2}, {<<"grpcbox">>, - {git,"https://github.com/andymck/grpcbox.git", - {ref,"e7e81ea7518280ec30cccb9f386e52eb111d170a"}}, + {git,"https://github.com/novalabsxyz/grpcbox.git", + {ref,"5cca01a52b6bb4c8dbadf1fe7f6441a350308235"}}, 1}, {<<"h3">>, {git,"https://github.com/helium/erlang-h3.git", @@ -156,7 +159,6 @@ 1}]}. [ {pkg_hash,[ - {<<"acceptor_pool">>, <<"43C20D2ACAE35F0C2BCD64F9D2BDE267E459F0F3FD23DAB26485BF518C281B21">>}, {<<"backoff">>, <<"83B72ED2108BA1EE8F7D1C22E0B4A00CFE3593A67DBC792799E8CCE9F42F796B">>}, {<<"base32">>, <<"044F6DC95709727CA2176F3E97A41DDAA76B5BC690D3536908618C0CB32616A2">>}, {<<"base64url">>, <<"F8C7F2DA04CA9A5D0F5F50258F055E1D699F0E8BF4CFDB30B750865368403CF6">>}, @@ -200,7 +202,6 @@ {<<"throttle">>, <<"E881B46D9836AFB70F3E2FA3BE9B0140805BA324ED26AA734FF6C5C1568C6CA7">>}, {<<"unicode_util_compat">>, <<"BC84380C9AB48177092F43AC89E4DFA2C6D62B40B8BD132B1059ECC7232F9A78">>}]}, {pkg_hash_ext,[ - {<<"acceptor_pool">>, <<"0CBCD83FDC8B9AD2EEE2067EF8B91A14858A5883CB7CD800E6FCD5803E158788">>}, {<<"backoff">>, <<"CF0CFFF8995FB20562F822E5CC47D8CCF664C5ECDC26A684CBE85C225F9D7C39">>}, {<<"base32">>, <<"10A73951D857D8CB1ECEEA8EB96C6941F6A76E105947AD09C2B73977DEE07638">>}, {<<"base64url">>, <<"F9B3ADD4731A02A9B0410398B475B33E7566A695365237A6BDEE1BB447719F5C">>},