Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: TheWolf666 on June 30, 2019, 05:19:53 PM



Title: Is Lightning network suitable for Altcoin blockchain based on Bitcoin core?
Post by: TheWolf666 on June 30, 2019, 05:19:53 PM
I was wondering if there was some sort of gateway so that Alcoins could use the lightning network technology.
Since Litecoin implemented it, if you have an altcoin that is a fork of Bitcoin 0.18, all the functionalities should be there?



Title: Re: Is Lightning network suitable for Altcoin blockchain based on Bitcoin core?
Post by: Rath_ on June 30, 2019, 06:39:14 PM
You should be able to get Lightning Network running easily on every Bitcoin fork which supports SegWit. If you make a fork of Bitcoin Core 0.18 then there shouldn't be any problems.


Title: Re: Is Lightning network suitable for Altcoin blockchain based on Bitcoin core?
Post by: TheWolf666 on June 30, 2019, 06:59:16 PM
I will try with Electron or Zap and post the result here. The complicated part is to compile and install the server on several nodes.
I guess the only change apart from the name and logo is the RPC port since Lightning is all working through RPC I think.


You should be able to get Lightning Network running easily on every Bitcoin fork which supports SegWit. If you make a fork of Bitcoin Core 0.18 then there shouldn't be any problems.


Title: Re: Is Lightning network suitable for Altcoin blockchain based on Bitcoin core?
Post by: yojoots on July 01, 2019, 04:55:35 PM
Since Litecoin implemented it, if you have an altcoin that is a fork of Bitcoin 0.18, all the functionalities should be there?

Yes, any coin based off of Bitcoin Core 0.18 (which didn't make any strange Lightning-breaking changes) should support Lightning Network functionality. More good news: lnd has multi-chain abstraction set up (https://lightning.community/release/software/lnd/lightning/2017/05/03/litening/) and there are tutorials out there (https://medium.com/@jason.hcwong/litecoin-lightning-howto-d6f8e115949c) which you'd probably find useful as references.

Also, on a related note, Lightning Labs' blog post on Bitcoin Litecoin atomic swaps on Lightning (https://blog.lightning.engineering/announcement/2017/11/16/ln-swap.html) is definitely worth a read.

I will try with Electron or Zap and post the result here.

See here (https://github.com/LN-Zap/zap-desktop/pull/1081/files) for the code changes that were necessary to add Litecoin support to Zap. You could use this as a template for your own extensions to support whatever coin(s) you're interested in.


Title: Re: Is Lightning network suitable for Altcoin blockchain based on Bitcoin core?
Post by: TheWolf666 on July 01, 2019, 06:09:30 PM
I tried to install Zap, but I cannot because when I run yarn it gives me a network connection and stop at the end of the package update.

I have a network connection. I know how to develop with electron, nodejs and in general javascript, but I never used yarn. I don't think that the connection is not working here, I have no problem browsing anywhere and my line is fiber 200 Mbs

Code:
yarn install v1.16.0
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
info There appears to be trouble with your network connection. Retrying...

See here (https://github.com/LN-Zap/zap-desktop/pull/1081/files) for the code changes that were necessary to add Litecoin support to Zap. You could use this as a template for your own extensions to support whatever coin(s) you're interested in.


Title: Re: Is Lightning network suitable for Altcoin blockchain based on Bitcoin core?
Post by: yojoots on July 01, 2019, 06:33:00 PM
It might be as simple as increasing the default timeout value:
Code:
yarn install v1.16.0 --network-timeout 1000000

If that doesn't work, you might run down this list (https://github.com/yarnpkg/yarn/issues/5259#issuecomment-379769451) and see if anything suggested there helps.


Title: Re: Is Lightning network suitable for Altcoin blockchain based on Bitcoin core?
Post by: TheWolf666 on July 02, 2019, 04:55:56 AM
This worked, but I got 1 error.
Next when I do rpm run build I get a bunch of errors. I guess I need to edit some config files but, there is no instruction about it.
I am on windows 10

Code:

error An unexpected error occurred: "https://registry.yarnpkg.com/v1.16.0: Not found".
info If you think this is a bug, please open a bug report with the information provided in "d:\\projects 2\\zap-desktop-master\\yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

d:\projects 2\zap-desktop-master>npm run build

> zap-desktop@0.5.0-beta build d:\projects 2\zap-desktop-master
> cross-env NODE_CONFIG_ENV=production webpack -r @babel/register --config webpack/webpack.config.prod.js

'cross-env' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! zap-desktop@0.5.0-beta build: `cross-env NODE_CONFIG_ENV=production webpack -r @babel/register --config webpack/webpack.config.prod.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the zap-desktop@0.5.0-beta build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Nikko\AppData\Roaming\npm-cache\_logs\2019-07-02T04_48_23_680Z-debug.log


It might be as simple as increasing the default timeout value:
Code:
yarn install v1.16.0 --network-timeout 1000000

If that doesn't work, you might run down this list (https://github.com/yarnpkg/yarn/issues/5259#issuecomment-379769451) and see if anything suggested there helps.