question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Why handling coin amount field using `Uint53`?

See original GitHub issue

Our team recently discovered an issue with using this coin amount with the approach as described in https://github.com/cosmos/cosmjs/blob/79396bfaa49831127ccbbbfdbb1185df14230c63/packages/amino/src/coins.ts#L12

What we can figure out was Uint53 was unable to handle large values. What is the CosmJs team’s rationale behind using Uint53? Any specific details?

Thanks

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
webmaster128commented, Nov 17, 2021

Done in https://github.com/cosmos/cosmjs/pull/923. Will be released as partof the next 0.26.x.

0reactions
webmaster128commented, Nov 17, 2021

For now, I have written my own implementation matching almost yours.

Are you planning to merge it in a future version of cosmJs?

I’d love to. The case is valid: an SDK coin is of arbitrary length and right now we only support up to 53 bit. This might be good for most users but we also want to support advanced use cases as long as they are in line with main Cosmos SDK development.

Ideally you can drop your own implementation and share the one in #923 with other CosmJS users.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Handling large transaction amounts with Altcoins #562 - GitHub
When dealing with an Altcoin, there's the need to handle larger amounts, while mantaining the precision, which is impossible at the moment with ......
Read more >
lib - Go Packages
TODO(DELETEME): This entire file is replaced by remote_miner.go. ... coin HasPurchased bool // contains filtered or unexported fields }.
Read more >
api documentation for bitcoinjs-lib (v3.0.2)
Client-side Bitcoin JavaScript library ... This is the number i in xi = xpar/i, with xi the key being serialized. // This is...
Read more >
Bitfields in Rust - Reddit
We need named fields, not indexes and we need each field to be a given number of bits in size, not necessarily one....
Read more >
EdgeWrite: A Versatile Design for Text Entry and Control
The EdgeWrite design includes a square input area, four corner sensors, corner- ... Total error rates of experts in all three joystick methods....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found