Skip to content

Change how we handle Sorted JSON encoding #2350

Closed
@ValarDragon

Description

Currently what we do is inefficient. We marshal a JSON string, and then run MustSortJSON on it. MustSortJSON JSON decodes the input, and then re-JSON encodes, but using the stdlib instead of amino.

Either we should make amino provide a method to JSON sort its input, or we should make a method to just sort the lines of a JSON encoded blob. In a 30 block simulation I ran, it was responsible for about 10% of the time. (A little bit skewed though, since the simulation didn't really hit anything that actually makes the chain slow down. This simulation did however have 525 signature verifications)


For Admin Use

  • Not duplicate issue

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions