feat: historical access of key getters, fixing logic in contracts after rotation#6656
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
d50a4ba to
7b5ba09
Compare
60a7517 to
407c44e
Compare
7b5ba09 to
e0d4166
Compare
407c44e to
62189cd
Compare
Benchmark resultsMetrics with a significant change:
Detailed resultsAll benchmarks are run on txs on the This benchmark source data is available in JSON format on S3 here. Proof generationEach column represents the number of threads used in proof generation.
L2 block published to L1Each column represents the number of txs on an L2 block published to L1.
L2 chain processingEach column represents the number of blocks on the L2 chain where each block has 16 txs.
Circuits statsStats on running time and I/O sizes collected for every kernel circuit run across all benchmarks.
Stats on running time collected for app circuits
Tree insertion statsThe duration to insert a fixed batch of leaves into each tree type.
MiscellaneousTransaction sizes based on how many contract classes are registered in the tx.
Transaction size based on fee payment method | Metric | | |
62189cd to
269b51b
Compare
20fb637 to
4443965
Compare
…ion (#6653) Mitigates failing state vars test
4443965 to
9994faa
Compare
LHerskind
left a comment
There was a problem hiding this comment.
I quite like this as it is very explicit about the keys that you are picking 👀
There are a few things that are related to diff from earlier, but should be addressed with a gt sync, likely because it have not been rebased after partial merges higher up. When merged it this should be good to go 👍
| // docs:start:key-getters | ||
| pub fn get_npk_m(context: &mut PrivateContext, address: AztecAddress) -> GrumpkinPoint { | ||
| get_master_key(context, address, NULLIFIER_INDEX) | ||
| trait GetIvpkM { |
There was a problem hiding this comment.
For the keys might makes sense just to do a single trait for these? Not as separated as the other inclusions so reduces the boilerplate a bit 🤷
There was a problem hiding this comment.
Good point, I like this too. Thanks for the shout.
| let y_coordinate = y_coordinate_registry.get_value_in_private(header); | ||
|
|
||
| GrumpkinPoint::new(x_coordinate, y_coordinate) | ||
| } |
There was a problem hiding this comment.
Unrelated to this pr, but this one is still slightly painful in my eyes as it is just calling the oracle so we have just "hidden" that we are doing an oracle call and not a constrained call. Think it would be better if we deal with this as an oracle directly to not mix it up, but should likely be done as part of #6543
See this comment inline on Graphite.
| fn cast_vote(candidate: Field) { | ||
| let msg_sender_npk_m_hash = get_npk_m_hash(&mut context, context.msg_sender()); | ||
| // TODO (#6312): This will break with key rotation. Fix this. Can vote multiple times by rotating keys. | ||
| // Below, we make sure to get our nullifier public key at a specific block. By pinning the nullifier public key at a specific block, |
|
|
||
| describe('votes', () => { | ||
| it('votes', async () => { | ||
| it('votes, rotates nullifier keys, then tries to vote again', async () => { |
9994faa to
bf7019a
Compare
269b51b to
008bf7d
Compare
bf7019a to
f094691
Compare
008bf7d to
51ce776
Compare
f094691 to
511478a
Compare
51ce776 to
73b1a4a
Compare
73b1a4a to
df6258e
Compare
…6654) Adding another state vars test that fails
…g-test' into ek/fix/logic-issues-in-contracts-with-key-rotation-after-feedback
…rotation-after-feedback
2ddb7cc to
8a25055
Compare


Resolves #6312.