Remove legacy wildcard key support#512
Conversation
There was a problem hiding this comment.
Thanks for finding this! I'm afraid that this fix is not enough.
This is the encoding of StatementArg:
pod2/src/middleware/statement.rs
Lines 568 to 571 in a2f427e
Since the
key in AnchoredKey can now be an integer, it could be 0. And then we can have an AnchoredKey that is encoded like a Literal.
The circuit uses this function to determine whether a StatementArg is a literal, and would treat an anchored key with key=0 as a literal
pod2/src/backends/plonky2/circuits/common.rs
Lines 1557 to 1562 in a2f427e
We need to figure out a way to distinguish the encoding of StatementArg::Literal and StatementArg::Key with ak.key = integer.
One option is to add a new field element to store a tag. But will affect performance, as it grows the number of fields required to encode a statement :(
Perhaps changing the encoding of integers isn't a bad idea after all.
Update: I've just seen you opened an issue about this #513
This PR removes legacy support for wildcard keys, which was interfering with the new integer "index" keys.