-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The client does not support Gnosis/Chiado spec #153
Comments
Please could you provide details on the specific differences. |
We are still trying to narrow this down. For now we know the difference appears in ExecutionPayload object serialization, but we could not prove it yet. |
I have no knowledge of gnosis, but if there are changes to any of the sizes of lists (e.g. maximum number of validators) that could cause problems. |
@mcdee we have just found that the single spec parameter that actually impacts block serialization (and hash): |
in that case you'll need to set up the connection using the |
probably this is where it is hardcoded as 16.. UPD: Therefore I can't get how |
UPD: we are testing a simple patch (replaced 16 with 8) in gnosis to prove this would work. |
Hello @mcdee, we tested the patch and this worked great. UPD: Testing |
UPD: |
The static SSZ functions cannot work with different values, hence the custom spec support. However, the custom spec support needs to create a |
@mcdee I checked the current implementation for If we start adding custom Do you have an idea for a better design given that we need not just SSZ marshaling, but also hash calculation to be driven by dynamic-ssz? Another "minor" findings is that making |
Yes, as mentioned the dynamic ssz system would need to add support for creating roots. Any dynamic system will be slower than one that is hard-coded, which is noted in There is nothing in the |
Heya, Driven by this issue I've started another try to implement the hash tree root calculation in the In theory this should work the same way when using the To make the dynamic hash calculation work, there are quite a few additional The hash tree root calculation code is currently in a quite early prototype state. It probably needs a lot more time to get it as cleanly implemented as the marshaling/unmarshaling code. So yea, please use with care :) @mcdee: I'm not really happy with that solution, but it's the best I could do without really huge changes to the library :D I'm not sure how to go forward with that. I'm feeling a bit bad just leaving these methods broken as that would lead to huge headaches of devs :D Any thoughts on this? |
I've been considering this, and there's no simple/clean solution here that I can come up with. Is our best solution to add a note to all of the relevant methods that these will only work with mainnet configurations, and point them to the dynamic versions if whatever they are building needs to work with other configurations? |
Coming back to this, is the issue purely around SSZ encoding and decoding? And if so, would using the |
Yes, this issue is about SSZ encoding and decoding. UPD: Check my comment above #153 (comment), the struct tag is hardcoded, while it has to be dynamic depending on the spec. Various VC vendors implemented dynamic SSZ serialization customizable with the spec, depending on the network. |
In which case have you investigated the solution at #153 (comment) as a potential solution (various issues with it notwithstanding; if it works we will need to consider how to support it more fully). |
What we have done in Charon: we maintain two sets of structures having different structure attributes values (and generated different set of serializers). Then, depending on the current network with switch them on the fly. PR for reference: https://github.com/ObolNetwork/charon/pull/3238/files |
We are investigating full block hash mismatching issue calculated by VC (confirmed with Lodestar, Teku) and Charon that uses go-eth2-client.
Initially we observed that the signed block submitted by a VC in Gnosis/Chiado fails signature verification. We quickly realized the block hash calculated inside of VC before signing differs from how we calculate hash in Charon using go-eth2-client.
A little deeper investigation led us to chain specification differences that likely impact how ssz serialization behaves and therefore produces different hash.
After checking go-eth2-client code, we saw no conditional code or variables that would change serialization flow. An exception is the fork, of course. However, given that most CL/VC clients support network-specific ssz serializaiton, we wanted to clarify if go-eth2-client would do the same and implement variations for Gnosis/Chiado.
The text was updated successfully, but these errors were encountered: