diff --git a/beacon_chain.nimble b/beacon_chain.nimble index 14e2becad..26e512c5d 100644 --- a/beacon_chain.nimble +++ b/beacon_chain.nimble @@ -48,5 +48,9 @@ task test, "Run all tests": buildBinary "all_tests", "tests/", "-r -d:release -d:chronicles_log_level=ERROR" # Minimal config buildBinary "all_tests", "tests/", "-r -d:release -d:chronicles_log_level=ERROR -d:const_preset=minimal" + + buildBinary "test_fixture_ssz_static", "tests/official", "-r -d:release -d:chronicles_log_level=DEBUG -d:const_preset=minimal" + buildBinary "test_fixture_ssz_static", "tests/official", "-r -d:release -d:chronicles_log_level=DEBUG -d:const_preset=mainnet" + # State sim; getting into 3rd epoch useful buildBinary "state_sim", "research/", "-r -d:release", "--validators=128 --slots=140" diff --git a/beacon_chain/spec/crypto.nim b/beacon_chain/spec/crypto.nim index aac0c4f62..2f9bb1a58 100644 --- a/beacon_chain/spec/crypto.nim +++ b/beacon_chain/spec/crypto.nim @@ -280,3 +280,15 @@ else: proc read*(rlp: var Rlp, T: type ValidatorSig): T {.inline.} = let bytes = fromBytes(T, rlp.toBytes) +proc writeValue*(writer: var JsonWriter, value: VerKey) {.inline.} = + writer.writeValue($value) + +proc readValue*(reader: var JsonReader, value: var VerKey) {.inline.} = + value = VerKey.init(reader.readValue(string)) + +proc writeValue*(writer: var JsonWriter, value: Signature) {.inline.} = + writer.writeValue($value) + +proc readValue*(reader: var JsonReader, value: var Signature) {.inline.} = + value = Signature.init(reader.readValue(string)) + diff --git a/tests/all_tests.nim b/tests/all_tests.nim index 45fa759d2..203d4b688 100644 --- a/tests/all_tests.nim +++ b/tests/all_tests.nim @@ -20,5 +20,4 @@ import # Unit test import # Official fixtures ./official/test_fixture_shuffling, ./official/test_fixture_bls, - ./official/test_fixture_ssz_uint, - ./official/test_fixture_ssz_static + ./official/test_fixture_ssz_uint