hermeznetwork / hermez-node

Hermez node Go implementation
GNU Affero General Public License v3.0
61 stars 33 forks source link

State root should be represented as a string in GET /health #993

Closed arnaubennassar closed 3 years ago

arnaubennassar commented 3 years ago

Rationale

The State Root is represented as a big.Int, however when this is transformed into JSON, such a big number will have precission problems and be displayed as something like: 2.0723800499378798e+76. Since this value is a hash, it's completley useless if it's not 100% accurate

Implementation

Transform big.Int into string