-
Notifications
You must be signed in to change notification settings - Fork 241
Open
Description
For current version, codec provide the compact for u8 ~ u128, while in substrate, there are also lots of cases need to use U256.
In my case, we use lots of u256 in some structs, which are the types in some extrinsic and storage. I hope I can use Compact to wrap U256 type to save some bytes
I tested for it, while meet error:
e.g.:
#[derive(Encode, Decode)]
struct A {
a: Compact<U256>
}
When compile, it will print
error[E0275]: overflow evaluating the requirement `for<'b> CompactRef<'b, _>: Encode`
|
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "512"]` attribute to your crate (`primitive_zklogin`)
= note: required for `CompactRef<'b, _>` to implement `for<'b> Encode`
= note: 253 redundant requirements hidden
= note: required for `CompactRef<'a, _>` to implement `for<'a> Encode`
it looks like it's in a dead loop, so that what ever value for recursion_limit
I set is useless
Metadata
Metadata
Assignees
Labels
No labels