Skip to content
This repository has been archived by the owner on Jun 4, 2024. It is now read-only.

update eth2fuzz to use lodestar v0.17.0 #97

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion eth2fuzz/docker/lodestar.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
33 changes: 17 additions & 16 deletions eth2fuzz/workspace/targets/js/lib.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,72 +29,73 @@ 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);
}
}

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);
}
}


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);
}
Expand Down