AztecProtocol / aztec-packages

Apache License 2.0
157 stars 160 forks source link

Decouple/refactor view, private, public data oracles (typescript) #7057

Open fcarreiro opened 3 weeks ago

fcarreiro commented 3 weeks ago

IIUC the TypedOracle class defines all possible kind of oracles that would then be used in view (unconstrained), private and public. If you look closely at the methods, then you see that some of them are just unimplemented in some of the contexts.

I think these 3 contexts may not need to be grouped under the same class since their needs are different.

There's no rush to do this, but it might be a good cleanup.

cc other teams: @nventuro @dbanks12 @sirasistant

nventuro commented 3 weeks ago

I think this is partially due to us slowly realizing what these different environments are and how they differ, and the TS classes not being properly updated to reflect that. We're now adding TXE (#6985) as a fourth environment that also implements this interface.

I'd recommend perfoming some review of the expectations of each environment before attemtping any refactors.