Comments (4)
Here is the problem.
- gno's amino marshaled pubkey byte length is 58
- converted base256 pubkey byte length is 93
- encoded bech32 pubkey byte length is 104
however, the github.com/btcsuite/btcutil v1.0.2 require the bech32 max length to be 90
When we add gno pubkey back to the local keybase, btcutil.bech32 tried to decode it and threw an error.
"invalid bech32 string length 104"
Solution:
-
install the latest version of btcutil
github.com/btcsuite/btcd/btcutil v1.1.1 -
call a new method bech32.DecodeNoLimit(bech), which does not limit the pubkey bech32 length to 90.
Line 25 in 1b7dad1
I will make a pull request, if this solution is accepted.
from gno.
Trade-Off:
Since Bech32 is designed for max length 90 bytes/character with 6 checksum characters to detect and correct 4 errors with 0 faults. When we extend the length to 104, it will slightly decrease the success rate of error detection.
However, the chances of failure could be tiny. According to the BIP173 the current code selection performs well up to 1023 characters.
from gno.
that sounds great, yes please.
from gno.
Fixed by #264
from gno.
Related Issues (20)
- [GnoVM] Add Event support when testing or running expressions HOT 7
- bug: self-referential types crash the VM
- bug: type coercion HOT 1
- bug: type problem
- Clarify gRPC and Amino
- Add a documentation section on how to interact with the chain without using Gnoweb or Gnokey
- [docs] Document `map` usage & its pros & cons over AVL tree
- bug(tm2/gnovm): multi-msg call overwrites previous event HOT 1
- [Amino] [GnoVM] Implement JSON marshalling on `gnoland.TypedValue` through Amino
- [tm2/gnovm] Identify each msg's event
- Infinite Loop Caused by Self-Referencing Struct in Map
- cannot use non-empty(comparable) struct as key of a map HOT 1
- [GnoVM] Panics in tests do not revert state
- [GnoVM] Deprecate & remove `std.CurrentRealmPath()` HOT 3
- Website Design Update HOT 1
- Proposal for support Fully Onchain Games (FOCG)
- limit import path length HOT 4
- `block_results` result.devlier_tx[i].ResponseBase.Data does not identify msg
- Proposal: Transaction status within tm2 / bank package: About #std.Emit() and output HOT 2
- [GnoVM] bug: inconsistent map key HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gno.