You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enabling the feature adds functions to the Storage trait, which breaks anyone implementing that themselves.
This is probably not a huge problem because few people do that, but I recently ran into this when implementing it based on QueryRaw.
The simplest way to avoid this is a default implementation that either just fails with unimplemented!() or returns an empty iterator.
Ultimately, a better (but breaking) solution would probably have a separate RangedStorage super-trait of Storage, altough I'm not sure how we would propagate that through the codebase without it becoming non-additive again.
The text was updated successfully, but these errors were encountered:
chipshort
changed the title
Iterator feature is not additiveiterator feature is not additive
Jul 23, 2024
Ultimately, a better (but breaking) solution would probably have a separate RangedStorage super-trait of Storage, altough I'm not sure how we would propagate that through the codebase without it becoming non-additive again.
I would not do that part. It will increase complexity by a lot not only in our codebase but a lot of user codebases. Using CosmWasm without iterator is something that might only be used by Secret Network and they have all sorts of forks. For Ethereum it would be needed too but I don't see CosmWasm on top of Ethereum any time soon.
Enabling the feature adds functions to the
Storage
trait, which breaks anyone implementing that themselves.This is probably not a huge problem because few people do that, but I recently ran into this when implementing it based on
QueryRaw
.The simplest way to avoid this is a default implementation that either just fails with
unimplemented!()
or returns an empty iterator.Ultimately, a better (but breaking) solution would probably have a separate
RangedStorage
super-trait ofStorage
, altough I'm not sure how we would propagate that through the codebase without it becoming non-additive again.The text was updated successfully, but these errors were encountered: