From 8cd96244a3697d0a9a3dfedab70845b4de38304a Mon Sep 17 00:00:00 2001 From: 3xtr4t3rr3str14l <32028745+3xtr4t3rr3str14l@users.noreply.github.com> Date: Wed, 3 Mar 2021 14:54:19 -0600 Subject: [PATCH 1/2] update lodestar.Dockerfile to use lodestar v0.17.0 --- eth2fuzz/docker/lodestar.Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eth2fuzz/docker/lodestar.Dockerfile b/eth2fuzz/docker/lodestar.Dockerfile index 38a85d8..308826f 100644 --- a/eth2fuzz/docker/lodestar.Dockerfile +++ b/eth2fuzz/docker/lodestar.Dockerfile @@ -30,7 +30,7 @@ RUN make -f eth2fuzz.mk build FROM ubuntu:18.04 -ARG LODESTAR_VERSION="0.13.0" +ARG LODESTAR_VERSION="0.17.0" ARG DISCV5_VERSION="0.5.0" # Update ubuntu From 10be4ef14f24e13f57c8be18a0700ad0cd12ffe2 Mon Sep 17 00:00:00 2001 From: 3xtr4t3rr3str14l <32028745+3xtr4t3rr3str14l@users.noreply.github.com> Date: Wed, 3 Mar 2021 14:58:38 -0600 Subject: [PATCH 2/2] Update lib.js --- eth2fuzz/workspace/targets/js/lib.js | 33 ++++++++++++++-------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/eth2fuzz/workspace/targets/js/lib.js b/eth2fuzz/workspace/targets/js/lib.js index dc4a7eb..ea1bd45 100644 --- a/eth2fuzz/workspace/targets/js/lib.js +++ b/eth2fuzz/workspace/targets/js/lib.js @@ -29,10 +29,11 @@ function is_lodestar_valid_exception(e) { } + function fuzz_lodestar_attestation(buf) { - var mainnet_1 = require("@chainsafe/lodestar-types/lib/ssz/presets/mainnet"); + var mainnet_1 = require("@chainsafe/lodestar-types/lib/presets/mainnet"); try { - mainnet_1.types.Attestation.deserialize(buf); + mainnet_1.types.phase0.Attestation.deserialize(buf); } catch (e) { // verify if it's a valid exception is_lodestar_valid_exception(e); @@ -40,9 +41,9 @@ function fuzz_lodestar_attestation(buf) { } function fuzz_lodestar_attester_slashing(buf) { - var mainnet_1 = require("@chainsafe/lodestar-types/lib/ssz/presets/mainnet"); + var mainnet_1 = require("@chainsafe/lodestar-types/lib/presets/mainnet"); try { - mainnet_1.types.AttesterSlashing.deserialize(buf); + mainnet_1.types.phase0.AttesterSlashing.deserialize(buf); } catch (e) { is_lodestar_valid_exception(e); } @@ -50,51 +51,51 @@ function fuzz_lodestar_attester_slashing(buf) { function fuzz_lodestar_block(buf) { - var mainnet_1 = require("@chainsafe/lodestar-types/lib/ssz/presets/mainnet"); + var mainnet_1 = require("@chainsafe/lodestar-types/lib/presets/mainnet"); try { - mainnet_1.types.BeaconBlock.deserialize(buf); + mainnet_1.types.phase0.BeaconBlock.deserialize(buf); } catch (e) { is_lodestar_valid_exception(e); } } function fuzz_lodestar_block_header(buf) { - var mainnet_1 = require("@chainsafe/lodestar-types/lib/ssz/presets/mainnet"); + var mainnet_1 = require("@chainsafe/lodestar-types/lib/presets/mainnet"); try { - mainnet_1.types.BeaconBlockHeader.deserialize(buf); + mainnet_1.types.phase0.BeaconBlockHeader.deserialize(buf); } catch (e) { is_lodestar_valid_exception(e); } } function fuzz_lodestar_deposit(buf) { - var mainnet_1 = require("@chainsafe/lodestar-types/lib/ssz/presets/mainnet"); + var mainnet_1 = require("@chainsafe/lodestar-types/lib/presets/mainnet"); try { - mainnet_1.types.Deposit.deserialize(buf); + mainnet_1.types.phase0.Deposit.deserialize(buf); } catch (e) { is_lodestar_valid_exception(e); } } function fuzz_lodestar_proposer_slashing(buf) { - var mainnet_1 = require("@chainsafe/lodestar-types/lib/ssz/presets/mainnet"); + var mainnet_1 = require("@chainsafe/lodestar-types/lib/presets/mainnet"); try { - mainnet_1.types.ProposerSlashing.deserialize(buf); + mainnet_1.types.phase0.ProposerSlashing.deserialize(buf); } catch (e) { is_lodestar_valid_exception(e); } } function fuzz_lodestar_voluntary_exit(buf) { - var mainnet_1 = require("@chainsafe/lodestar-types/lib/ssz/presets/mainnet"); + var mainnet_1 = require("@chainsafe/lodestar-types/lib/presets/mainnet"); try { - mainnet_1.types.VoluntaryExit.deserialize(buf); + mainnet_1.types.phase0.VoluntaryExit.deserialize(buf); } catch (e) { is_lodestar_valid_exception(e); } } function fuzz_lodestar_beaconstate(buf) { - var mainnet_1 = require("@chainsafe/lodestar-types/lib/ssz/presets/mainnet"); + var mainnet_1 = require("@chainsafe/lodestar-types/lib/presets/mainnet"); try { - mainnet_1.types.BeaconState.deserialize(buf); + mainnet_1.types.phase0.BeaconState.deserialize(buf); } catch (e) { is_lodestar_valid_exception(e); }