ssz
ssz copied to clipboard
Typescript implementation of Simple Serialize (SSZ)
SSZ generic spec tests include a ByteList, like a ByteVector. We will want to implement the ByteList, which practically is indistinguishable from a `ListType({..., elementType: byteType})` _other than json serialization/deserialization_,...
Proto noted that we are missing some tests from the python implementation https://github.com/ChainSafe/ssz/blob/fe890be83a63d7c45e774f92f97f8499dc611540/test/unit/deserialize.test.ts#L39 https://github.com/protolambda/remerkleable/blob/master/remerkleable/test_impl.py
create cli for serialize, deserialize, hash-tree-root
When getting a property from a tree backed ssz type this if decides to return the "raw" value or tree backed. https://github.com/ChainSafe/ssz/blob/d6efe104a3bdc2d2beebc47af8234a3e40d414f4/src/backings/tree/container.ts#L138 In my opinion I would assume that a...
part of https://github.com/ChainSafe/lodestar/issues/2046 this is a simple test to calculate `hashTreeRoot` ```ts it.only("set validator valances", function () { this.timeout(0); const originalState = state.getOriginalState(); // cache hashTreeRoot config.types.BeaconState.hashTreeRoot(originalState); const balances =...
@wemeetagain wrote this great write-up that should be added to the README upon revision https://hackmd.io/KuV9Ca1dTyaIRkKNKzwWQA
``` import {ContainerType, ByteVectorType} from "@chainsafe/ssz"; // Creates a "Keypair" SSZ data type (a private key of 32 bytes, a public key of 48 bytes) const Keypair = new ContainerType({...
Since my attempt to improve types just scratched surface, I would suggest some bottom to top type revision I would like to confirm some basic presumptions: ``` type BasicValue =...
https://github.com/ethereum/eth2.0-specs/pull/2043
We need the `@chainsafe/lodestar-types` package to run spec tests. A fix for this will likely look like: - a new github action to run on pull_request - clone lodestar monorepo,...