Skip to content
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

Get the Namecoin daemon merged #25

Closed
JeremyRand opened this issue Jul 15, 2017 · 15 comments
Closed

Get the Namecoin daemon merged #25

JeremyRand opened this issue Jul 15, 2017 · 15 comments

Comments

@JeremyRand
Copy link
Contributor

As you're aware, I made a Namecoin name lookup daemon, loosely based on bitcoinj-daemon. I'd like to work toward getting it upstreamed to bitcoinj-addons, the question is what the best way to do that is, without too much maintenance complexity and code duplication.

My initial inclination is to create a new Git branch of bitcoinj-addons for this purpose, so that changes made to bitcoinj-addons can easily be merged to the Namecoin branch via standard Git merging procedures. I'm pretty sure this is how Coinomi handles altcoin support (though I haven't actually looked at Coinomi's source code for a few months).

An alternative might be to make the bitcoinj-addons programs support network parameters from libdohj via a command-line flag, so that arbitrary libdohj-supported altcoins would work with bitcoinj-addons without any additional changes. (This would still require changes to support name operations in bitcoinj-daemon, either via a Git branch or via an extra module.)

Curious what your thoughts are.

Cheers!

@msgilligan
Copy link
Member

msgilligan commented Jul 15, 2017

Funny you should send this now. I've been thinking about the focus of this project and how to name, structure, and position it going forward. My original intention was to contribute it (or major parts of it) to the bitcoinj project. But bitcoinj is focused solely on Bitcoin and this project already is being used in and/or has components implemented for Bitcoin, Omni, Namecoin, and Ethereum.

Yesterday I was thinking about creating a new Github organization for the project and name it jCrypto or something similar that covers multiple currencies/chains. The goal would be to create reusable components that could be used by as many projects as possible and -- of perhaps greater importance -- attract as many contributions and contributors as possible. Maybe we could even merge in libdohj. I'd love to hear your thoughts on this.

Although, for this immediate issue of merging your code, we can certainly do it right here in this repository.

My suggestion would be to create a new submodule, called namecoin-daemon (or similar) for your daemon. bitcoinj-daemon is only 4 classes (a main Application class, and 3 configuration classes) so the namecoin-daemon could just have its own version of these files. The rest of the Namecoin functionality could be put in one or more Namecoin submodules. Any changes to the existing classes that you need can be addressed on a case-by-case basis, but I'm sure we'll be able to figure out how to create a nice, clean, modern OO architecture to maximize reusability and flexibility. And, yes, I should probably take another look at libdohj to refresh my memory.

@msgilligan
Copy link
Member

See also #8 and #14.

@JeremyRand
Copy link
Contributor Author

JeremyRand commented Jul 26, 2017 via email

@msgilligan
Copy link
Member

msgilligan commented Aug 10, 2017

Both of these changes sound reasonable. I've already dabbled a bit with (1). For (2) it might be better to use Java interfaces than subclassing and I think we should be able to make it work that way. I also think the Namecoin daemon should have it's own Gradle submodule that builds the final application.

I'm leaning towards renaming this project ConsensusJ, by the way...

@JeremyRand
Copy link
Contributor Author

@msgilligan Is it okay for libdohj to be added as a dependency to the various existing submodules (so that non-Bitcoin network parameters can be used with them), or should extra submodules be added for this purpose?

@msgilligan
Copy link
Member

In general, I believe that modules should have as few dependencies as possible. In fact, the module structure is largely about keeping overall dependencies minimized (and avoiding optional dependencies)

Which modules would need libdohj and what extra modules would need to be created when we add that dependency?

@JeremyRand
Copy link
Contributor Author

Which modules would need libdohj and what extra modules would need to be created when we add that dependency?

@msgilligan I think it would be whichever modules currently access the Bitcoin mainnet and/or testnet network parameter classes. Libdohj provides alternate network parameters for a few altcoins; I don't think anything else would need libdohj (besides the Namecoin name lookup client, which is out of scope for this question).

@msgilligan
Copy link
Member

@JeremyRand You see that we've moved the project to ConensusJ/consensusj -- would you like to be a contributor to/member of this new Github organization?

@JeremyRand
Copy link
Contributor Author

@JeremyRand You see that we've moved the project to ConensusJ/consensusj -- would you like to be a contributor to/member of this new Github organization?

@msgilligan Sure, sounds good to me.

@msgilligan
Copy link
Member

So there's been some activity in bitcoinj that is related to this issue.

First @marvin-we created Issue bitcoinj/bitcoinj#1486 on bitcoinj, then he created a thread Create a separate library that contains those parts which are useful for other Blockchains on the mailing list, and finally he created a project https://github.com/marvin-we/crypto-core to explore the idea.

I respond on his thread and created an issue on the project requesting that we get the changes merged into bitcoinj -- if possible. I think that would ultimately be the best solution for everyone.

@JeremyRand
Copy link
Contributor Author

In terms of short-term strategy (say, the next few months), does it make sense for me to just continue maintaining my Namecoin fork of ConsensusJ without upstreaming things until we have a clearer picture of how we want things to look long-term? NLnet Foundation is willing to fund me to do some work on my Namecoin fork of ConsensusJ, and one of the things they'd like to fund is for me to get it upstreamed to ConsensusJ. If that's not doable short-term, that's totally fine, I'll just redirect the funding for that particular item to other Namecoin work (we have some flexibility in choosing which things NLnet funds). Thoughts?

@msgilligan
Copy link
Member

I think there's a short-term solution to get it merged and we should pursue it.

Separately, it would be nice to see a longer-term solution that solves the deeper issues that @marvin-we and others would like to address.

@msgilligan
Copy link
Member

OK, we've made some progress on this issue as of: b086d9b
This is based on the wok from @JeremyRand 's PR: #40 -- even though that PR was not directly merged.

The next step (I think) is to get the needed libdohj libraries published to a public Maven repo. Right @JeremyRand ?

@msgilligan msgilligan changed the title Best way to get the Namecoin daemon merged? Get the Namecoin daemon merged Jul 14, 2018
@msgilligan
Copy link
Member

To be more specific: once libdohj is in a public Maven repo (easiest is probably bintray) it should be a roughly 10 line PR.

@msgilligan
Copy link
Member

Since this is not currently a priority for @msgilligan or @JeremyRand (see #69 (comment)) I am going to close this issue.

If someone new decides they want to work on a Namecoin daemon, please feel free to open any issues for changes that are needed, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants