fix: deriving serde on more public structs#17380
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
| @@ -1,14 +0,0 @@ | |||
| use crate::{hash::compute_secret_hash, oracle::random::random}; | |||
|
|
|||
| pub struct SecretAndHash { | |||
| } | ||
|
|
||
| #[test] | ||
| fn serialization_of_empty() { |
There was a problem hiding this comment.
Dropped this test as now, that serde is derived, it seems out of place.
|
|
||
| // TODO: Replace this with the derived version. Not done yet as this uncovered a bug in the AVM. See the discussion | ||
| // below for more details: | ||
| // https://aztecprotocol.slack.com/archives/C02M7VC7TN0/p1754463522334449 |
There was a problem hiding this comment.
CI passed so this is no longer an issue. What a nice surprise.
nventuro
left a comment
There was a problem hiding this comment.
Thanks! How did you find these and check there are no remnants?
c18f5d1 to
b4fea5d
Compare
aa83f67 to
e226e02
Compare
b4fea5d to
a185f09
Compare
e226e02 to
ceb46ab
Compare
5467aab to
079f99d
Compare
@nventuro I just looked through the occurrences of "pub struct" string in noir-projects/aztec-nr and then guessed if it makes sense to ever return from a function. I didn't apply it to a lot of those structs as I couldn't foresee those to ever be returned (e.g. state variables). |
ceb46ab to
ee8ab33
Compare
In a PR down the stack I needed to slap `#[derive(Deserialize)]` on `RetrievedNote` because I returned it from a function. Nico proposed that we derive serde on more public structs because external won't be able to do so. In this PR I went through the public structs in Aztec.nr and applied serde where I thought it could make sense to return from a contract function - in most of the cases it didn't make sense.
ee8ab33 to
4369e5e
Compare
In a PR down the stack I needed to slap `#[derive(Deserialize)]` on `RetrievedNote` because I returned it from a function. Nico proposed that we derive serde on more public structs because external won't be able to do so. In this PR I went through the public structs in Aztec.nr and applied serde where I thought it could make sense to return from a contract function - in most of the cases it didn't make sense.
Pull Request is not mergeable

In a PR down the stack I needed to slap
#[derive(Deserialize)]onRetrievedNotebecause I returned it from a function. Nico proposed that we derive serde on more public structs because external won't be able to do so.In this PR I went through the public structs in Aztec.nr and applied serde where I thought it could make sense to return from a contract function - in most of the cases it didn't make sense.