snapshot-labs / sx-monorepo

Snapshot X monorepo
https://docs.snapshotx.xyz
MIT License
11 stars 10 forks source link

bug: Can't store large number as proposal validation threshold #442

Closed bonustrack closed 6 days ago

bonustrack commented 1 week ago

When creating a space I'm trying to add 100000000000000000000000 as threshold for proposal validation, on the input it get replaced by 1e+23.

image

There is also an issue more important that is the SX API failed to index because the space field "proposal_threshold" it out of range. Here is some of the error:

...ting_power_validation_strategy_strategies_params\") values ($1, int8range($2, NULL), $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25) - value \"99999999999999991611392\" is out of range for type integer","stack":"error: insert into \"spaces\" (\"authenticators\", \"block_range\", \"controller\", \"created\", \"id\", \"max_voting_period\", \"metadata\", \"min_voting_period\"...

Here is the tx when the proposal was created

This is blocking NSTR space creation

bonustrack commented 6 days ago

Fixed in #445