You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the array length is different in different preset(mainnet_preset and minimal_preset), this mainly affects encode and decode
like HistoricalBatch, in fact the block_roots and state_roots are both array type, not Slice, but in different preset, the length is different
// 8192 in mainnet_preset and 64 in minimal_preset
pub const HistoricalBatch = struct {
block_roots: []primitives.Root,
state_roots: []primitives.Root,
};
maybe we can use union to solve the problem, like types in different forks
The current way of ssz has some flaws
encode
anddecode
like
HistoricalBatch
, in fact theblock_roots
andstate_roots
are both array type, notSlice
, but in different preset, the length is differentmaybe we can use
union
to solve the problem, like types in different forksSlice
type, we must know the limit of the slice, likeattesting_indices
field inIndexedAttestation
typewe can add a
attrs
to present the limit forSlice
, the field inattrs
represent the limit of corresponding propertiesor we can consider using codegen, so some other information can be present in comments, just like
tag
in golangThe text was updated successfully, but these errors were encountered: