Very interesting proposal!
Can the data be composite at multiple layers, like [[x₁, x₂, ..., xₙ], [y₁, y₂, ..., yₙ]]
?
And what’s the actual gas cost for a specific number of messages (n)?
@hellohanchen thanks for the review!
Currently the messages must be flattened for signature: [x₁, x₂, ..., xₙ]
.
Gas cost for verification? Thats a good question I can run a test to find out. Runtime should be log(n)
number of messages, if the tree is properly constructed.
Thanks for replying. I currently don’t have a great use case for this but this is interesting. Signature and validation work should become more flexible to prepare for the future use cases.
I do have some use cases that the signatures need to be layered like
sig1 = sign(message, key_1)
sig2 = sign(sig1, key_2)
And both signatures need to be verified.