-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
List Ndau (XND) #3110
List Ndau (XND) #3110
Conversation
NACK I guess we would rather skip the altcoin altogether (it's not even present on CMC), or have no full address validation rather than adding a new dependency. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NACK for adding dependency!
Why would you expect Bisq to trust your 13 day old jar dependency? 🤔 |
The jar is about 500 lines of code and easily auditable. It's 13 days old because our primary development language is go, not Java; that JAR was developed specifically to support this project. If you prefer, it would be possible for us to inline the necessary code here. It just means adding a substantial amount more code than other altcoins have. |
For bringing the code into this repo, what is the preferred style: to keep all necessary code within the |
@coriolinus inlining this dependency won't help. |
If I were to use a regex validator, it would necessarily accept addresses which the actual validator would reject: you can't check internal hash codes with a regex. That said, I do not know what the actual effects would be if the bisq validator accepted addresses which are in fact invalid. If the consequences are acceptable, it would be easy to implement. Doing so will necessitate changing the test suite, many of the invalid cases of which are single-character replacements which invalidate the internal hash. @battleofwizards would that be more palatable? |
I have updated this PR to remove the external dependency. I would appreciate a re-review of the code as it now stands. |
utACK |
@coriolinus please resolve the conflict with Asset (because of merged new assets) |
@ripcurlx Done. |
@blabno Any comments regarding our other asset requirements? Codewise it looks fine to me now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NACK per comments.
Squash commits into one, keeping proper commit message.
// this regex performs superficial validation, but there is a large space of addresses marked valid | ||
// by this regex which are not in fact valid ndau addresses. For actual ndau address validation, | ||
// use the Address class in github.com/oneiro-ndev/ndauj (java) or github.com/oneiro-ndev/ndaumath/pkg/address (go). | ||
private static AddressValidator validator = new RegexAddressValidator("nd[anexbm][abcdefghijkmnpqrstuvwxyz23456789]{45}"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no need to make this an object property. Move validator instantiation and declaration into constructor.
private static AddressValidator validator = new RegexAddressValidator("nd[anexbm][abcdefghijkmnpqrstuvwxyz23456789]{45}"); | ||
|
||
public Ndau() { | ||
super("ndau", "XND", Ndau.validator, Network.MAINNET); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mainnet is the default value, so no need for that parameter.
private static AddressValidator validator = new RegexAddressValidator("nd[anexbm][abcdefghijkmnpqrstuvwxyz23456789]{45}"); | ||
|
||
public Ndau() { | ||
super("ndau", "XND", Ndau.validator, Network.MAINNET); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Name of asset should be uppercased I guess.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Stet: style guide rules for this asset mandate lowercase usage.
- Official project URL: https://ndau.io/ - Official block explorer URL: https://explorer.service.ndau.tech
@blabno Could you please re-visit this PR if it is up to be merged now? Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK
Note: as ndau address validation is fairly complicated, this PR addsa dependency to a library which handles this. This library can be
inspected at https://github.com/oneiro-ndev/ndauj. It is licensed
under the LGPL 3.0.
This code has been removed.