Comments (12)
Would it be possible to disregard the distinction between addresses and just defer to torut::OnionAddress
/torut::TorPublicKey
?
from rust-lnpbp.
Good news! Lets try to remove Copy on InetAddr and see how much problems we will get after
from rust-lnpbp.
Opened the PR. @Kixunil would appreciate your review. So far it can only parse onion v2 from an address string.
from rust-lnpbp.
Hard to say... We do distinguish IPv4 from IPv6 in the enum, so at least at that level it would be nice to distinguish TORv2 from TORv3.
Don't spend time on this issue, I left it for new contributors b/c it's very simple to implement as a first issue
from rust-lnpbp.
Sure, was just randomly looking around and noticed it because I had to look into torut
to implement parse_arg
properly. :)
from rust-lnpbp.
If this issue is still open, I am willing to work on it.
Small note after initial look, torut doesn't seem to support TorPubKeyV2 to OnionAddressV2 conversion. As we are only storing the publickeys in the structure do we plan to implement the conversion too? Or there are other ways of doing it?
from rust-lnpbp.
It is still open, you are welcome to pick it!
As for V2, I think we only need to support OnionAddressV2, w/o support for TorPubKeyV2
from rust-lnpbp.
Ok, I went some distance and so far it seems workable.
Need some technical help. OnionAddressV2
from torut
doesn't implement Copy
. This is causing error in #[derive(Copy)]
for InetAddr
which wraps over OnionAddressV2
. I cant manually implement Copy
as OnionAddressV2
is from an external crate.
One option is to disable Copy derivation on InetAddr
but that will cause ripple effects upstream.
So what's the best way to fix this situation?
from rust-lnpbp.
@rajarshimaitra What about a PR against torut
for the address to implement Copy
?
from rust-lnpbp.
We can do that for sure, but I expect there are some limitations b/c of the key structure such that Copy is unreasonable?
from rust-lnpbp.
@rajarshimaitra What about a PR against torut for the address to implement Copy?
@Kixunil I thought of the same at first. But the OnionAddressV3 also doesn't implement copy. So there is probably something with it as @dr-orlovsky suggested.
Good news! Lets try to remove Copy on InetAddr and see how much problems we will get after
I gave a try at removing Copy derivations. The changes ripples through few more modules of the library, but nothing major. Not sure about the rgb node though. There might be more dependency on it.
from rust-lnpbp.
such that Copy is unreasonable?
I wonder why though, keys should be representable as a fixed-length array of bytes, which is always Copy
...
from rust-lnpbp.
Related Issues (20)
- Decompose library into a multi-crate
- Update code coverage default requirement in `codecov.yml`
- Refactor all `CommitEncode` implementation to not require cloning
- Complete crate documentation
- Update trait derivation in `bech32::Error`
- Use p2p magic numbers from rust-bitcoin
- Rewrite `CHAIN_PARAMS` exhaustive enum test
- Use HashedTag in `MultimsgCommitment::try_commit()`
- Implement Publication related method HOT 1
- Move `test_enum_u8_exhaustive` to derive macro HOT 1
- Implement publication-related methods in `TxGraph` HOT 1
- Complete test coverage HOT 4
- Refactor tests using strict_encoding_test crate
- Remove lazy_static dependency from chain crate
- Introduce new chain type system HOT 2
- Switch on x-only public keys in ElGamal encryption
- Update Liquid Network Magic number in `CHAIN_PARAMS`
- Update RGB height in`CHAIN_PARAMS`
- Implement Base64 ASCII armoring library
- Deprecate lnpbp_bech32 in favor of baid58 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 rust-lnpbp.