ChainSafe / ssz

Typescript implementation of Simple Serialize (SSZ)
https://simpleserialize.com/
Other
53 stars 20 forks source link

Invalid gindex calculation #311

Open wemeetagain opened 1 year ago

wemeetagain commented 1 year ago

Describe the bug

import {ssz} from "@lodestar/types";

const {BeaconState} = ssz.phase0;
console.log(
  BeaconState.getPathInfo(["validators", 0, "activationEpoch"]).gindex === BeaconState.getPathInfo(["validators", 0, "pubkey"]).gindex
);
// true

Expected behavior

false

ratankaliani commented 1 year ago

Currently running into this - how do I calculate the gindices of these fields manually?

Trying to generate a merkle proof of these fields, but can't do so if the gindices are the same for the Validator container, as well as all of the fields within it.

philknows commented 1 month ago

Related to #328