ferranbt / fastssz

Fast Ethereum2.0 SSZ encoder/decoder
MIT License
73 stars 44 forks source link

How does raw ssz list ser/dser? #142

Closed fearlessfe closed 5 months ago

fearlessfe commented 5 months ago

I want to ser TestList, which is a ssz list

TestList [][]byte

But I must use a struct to wrap it as below

type TestStruct struct {
      TestList [][]byte
}

Because TestStruct is a container, the ser result is container offset + TestList.

How can i get the ssz result of only TestList.

ferranbt commented 5 months ago

That specific example cannot be done. If you have a struct it is always assumed to be a container. What is the use case for this? Is this part of the ssz spec?

GrapeBaBa commented 5 months ago

same issue #135