-
Notifications
You must be signed in to change notification settings - Fork 710
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
with_genesis_config
not support u128
type
#4853
Comments
I think this was discussed before in #2963 and should have been fixed in #2987. @michalkucharczyk Have not looked deeply, but probably we should enable this feature in |
Well, I don't think that's actually a fix on the user side. We still need to construct that JSON on our end and then pass it to the For instance, if people don't pay attention to this, they will likely fail at:
|
Add this feature ( This should fix the problem. |
But should we leave this to the downstream? What if make this function accept a |
From what I understand, the creation of JSON failed. Not deserialization on runtime side. (some |
Basically this program fails (and this happens on node side): [package]
name = "xxx"
version = "0.1.0"
edition = "2021"
[dependencies]
serde_json = {version = "1.0.117", default-features = false, features = ["alloc"] } fn main() {
serde_json::json!({
"balances": {
"balances": 1u128 << 112
}
});
} |
You mean that features shall be merged by cargo? Yeah, we could add this, as BTW: if this genesis config was defined on the runtime side (as preset) then this would not be a problem. |
Yeah was a misconception on my side. Building the JSON the responsibility of the downstream user of polkadot-SDK and easily fixed by |
with_genesis_config
requires aserde_json::Value
type. But it only supports up tou64
.But I think most chains are using
u128
as their balance type.https://substrate.stackexchange.com/questions/11100/number-out-of-range-on-configuring-balances/11522#11522
The text was updated successfully, but these errors were encountered: