Commit 823a8105 authored by Evan Vigil-McClanahan's avatar Evan Vigil-McClanahan
Browse files

1.1.0

- add more predicates for gossip peers
- add bloom gossip
- retune connections
- update core to have new vars
parent 6386f610
Showing with 25 additions and 10 deletions
+25 -10
......@@ -15,5 +15,5 @@ docker login -u="team-helium+buildkite" -p="${QUAY_BUILDKITE_PASSWORD}" ${REGIST
docker build -t helium:$DOCKER_NAME -f "${DOCKERFILE_NAME}" .
docker tag helium:$DOCKER_NAME "$MINER_REGISTRY_NAME:$DOCKER_NAME"
docker push "$MINER_REGISTRY_NAME:$DOCKER_NAME"
docker tag helium:$DOCKER_NAME "$MINER_REGISTRY_NAME:latest-validator-${IMAGE_ARCH}"
docker push "$MINER_REGISTRY_NAME:latest-validator-${IMAGE_ARCH}"
# docker tag helium:$DOCKER_NAME "$MINER_REGISTRY_NAME:latest-validator-${IMAGE_ARCH}"
# docker push "$MINER_REGISTRY_NAME:latest-validator-${IMAGE_ARCH}"
......@@ -16,13 +16,14 @@
{validation_width, 8},
{block_sync_batch_size, 10},
{block_sync_batch_limit, 100},
{max_inbound_connections, 12},
{max_inbound_connections, 32},
{key, undefined},
{relay_limit, 100},
{base_dir, "/var/data"}
]},
{libp2p,
[
{random_peer_pred, fun miner_util:true_predicate/1},
{nat_map, #{ {"${NAT_INTERNAL_IP}", "${NAT_INTERNAL_PORT}"} => {"${NAT_EXTERNAL_IP}", "${NAT_EXTERNAL_PORT}"}}}
]},
{relcast,
......
......@@ -25,8 +25,8 @@
]},
{libp2p,
[
{random_peer_pred, fun miner_util:random_peer_predicate/1},
{similarity_time_diff_mins, 30},
{random_peer_pred, fun miner_util:random_val_predicate/1},
{node_aliases,
[
{"/p2p/112qB3YaH5bZkCnKA5uRH7tBtGNv2Y5B4smv1jsmvGUzgKT71QpE", "/ip4/52.8.80.146/tcp/2154"},
......
......@@ -16,13 +16,14 @@
{block_sync_batch_size, 10},
{block_sync_batch_limit, 100},
{validation_width, 8},
{max_inbound_connections, 12},
{max_inbound_connections, 32},
{key, undefined},
{relay_limit, 100},
{base_dir, "data"}
]},
{libp2p,
[
{random_peer_pred, fun miner_util:true_predicate/1},
{nat_map, #{ {"${NAT_INTERNAL_IP}", "${NAT_INTERNAL_PORT}"} => {"${NAT_EXTERNAL_IP}", "${NAT_EXTERNAL_PORT}"}}}
]
},
......
......@@ -5,8 +5,12 @@
{<<"base64url">>,{pkg,<<"base64url">>,<<"1.0.1">>},1},
{<<"blockchain">>,
{git,"https://github.com/helium/blockchain-core.git",
{ref,"b81c22a471e06fec33a3d5d128fde8ce8d1d1a1f"}},
{ref,"c9d8b748304f9011800819de9c1948340bfbcf15"}},
0},
{<<"bloom">>,
{git,"https://github.com/Vagabond/erbloom",
{ref,"a1768fa6a63e979017fe94ee86a86164e3c21d88"}},
2},
{<<"chatterbox">>,
{git,"https://github.com/andymck/chatterbox",
{ref,"b56a2a08b8a31b7ab0d536e5e8a55d5abe70390f"}},
......@@ -135,7 +139,7 @@
{<<"lager">>,{pkg,<<"lager">>,<<"3.9.2">>},1},
{<<"libp2p">>,
{git,"https://github.com/helium/erlang-libp2p.git",
{ref,"f600df28b1b977b28b4e759f974d69164f61ccc4"}},
{ref,"1643f16eb40d1af84ce500618d1eb6ace3ce32a1"}},
1},
{<<"libp2p_crypto">>,{pkg,<<"libp2p_crypto">>,<<"1.4.0">>},2},
{<<"longfi">>,
......
......@@ -307,7 +307,7 @@ remove_consensus() ->
version() ->
%% format:
%% MMMmmmPPPP
0010000011.
0010010000.
%% ------------------------------------------------------------------
%% gen_server
......
......@@ -13,7 +13,9 @@
median/1,
mark/2,
metadata_fun/0,
random_peer_predicate/1,
random_val_predicate/1,
random_miner_predicate/1,
true_predicate/1,
has_valid_local_capability/2,
hbbft_perf/0
]).
......@@ -117,10 +119,17 @@ metadata_fun() ->
#{}
end.
random_peer_predicate(Peer) ->
random_val_predicate(Peer) ->
not libp2p_peer:is_stale(Peer, timer:minutes(360)) andalso
maps:get(<<"release_version">>, libp2p_peer:signed_metadata(Peer), undefined) /= undefined.
random_miner_predicate(Peer) ->
not libp2p_peer:is_stale(Peer, timer:minutes(360)) andalso
maps:get(<<"release_info">>, libp2p_peer:signed_metadata(Peer), undefined) /= undefined.
true_predicate(_Peer) ->
true.
-spec has_valid_local_capability(Capability :: non_neg_integer(),
Ledger :: blockchain_ledger_v1:ledger())->
ok |
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment