# KZG Ceremony - ECDSA EIP-712 signature problem
**Update 2023-01-10: This [has been fixed in a`go-ethereum` PR](https://github.com/ethereum/go-ethereum/pull/26462).**
While going the extra mile to add a feature to [the client I’m working](https://github.com/jsign/go-kzg-ceremony-client) on to verify the sequencer transcript, I found a situation while trying to validate the ECDSA signatures that I think has two possible conclusions:
- There’s a bug in `go-ethereum` regarding the EIP-712 implementation.
- There’s a bug in `eth-rs` used by the sequencer regarding the EIP-712 implementation.
If the latter is true, this might be a bit concerning since the ECDSA signing accepted by the sequencer would be incorrect and sounds like a potential blocker for the main ceremony.
I’m not an expert in EIP-712, so sharing my findings here to get some eyes/help checking!
## The problem
The crux of the issue is the template used for EIP-712 [described here](https://github.com/ethereum/kzg-ceremony-specs/blob/master/docs/cryptography/contributionSigning.md#types). Here there’s a custom type `contributionPubkey`.
When trying to parse a message using that template with `go-ethereum` I got this error: `unknown type "contributionPubkey[]"`.
OK, that’s a bit obscure, so I dug into the `go-ethereum` code to understand how this was triggered since some manual inspection of the JSON I was trying to verify was correct.
In the end, I found this snippet which explains [the cause of the problem](https://github.com/ethereum/go-ethereum/blob/master/signer/core/apitypes/types.go#L734).
There you can see a `type.isReferenceType()`, which [it enforces that the first leter of the custom type is uppercase](https://github.com/ethereum/go-ethereum/blob/master/signer/core/apitypes/types.go#L227-L234)
It's even made explicit in a comment: `// Reference types must have a leading uppercase character`
So if I change the custom type from `contributionPubkey` to `ContributionPubkey`, then `go-ethereum` is happy, and the error disappears.
## OK, is this a bug in go-ethereum or eth-rs?
[Looking at the EIP-712](https://eips.ethereum.org/EIPS/eip-712#specification-1) says:
> **Definition**: The *reference types* are arrays and structs. Arrays are either fixed size or dynamic and denoted by `Type[n]` or `Type[]` respectively. Structs are references to other structs by their name. The standard supports recursive struct types
While it’s true that it doesn’t talk about “uppercase”, the name used in the example `Type` starts with uppercase. So it might be inferred that what `go-ethereum` is doing is actually correct. Probably the interpretation of the EIP might be the real dilemma?
Note that I'm assuming `eth-rs` (used by the sequencer) is accepting `contributionPubkey` as a correct name. I haven't checked this, but I'm trusting what's described in the spec.
## Why is this relevant for signing or verifying signatures?
The type names are part of the hashing process of the message. Having `contributionPubkey` o `ContributionPubkey` would produce a different hash to be signed (or verify the signature).
If `eth-rs` has the wrong interpretation/implementation, this would mean the sequencer would be accepting invalid signatures as defined in EIP-712.