elective-stereophonic
elective-stereophonic
NXTsubatomic - atomic crosschain exchange & NXTatomic - atomic NXT tx swap singapore
Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest Stable Nxt Client: Nxt 1.11.15 | Latest Experimental Nxt Client: Nxt 1.12.0e

Pages: [1] 2 3 ... 7  All

Author Topic: NXTsubatomic - atomic crosschain exchange & NXTatomic - atomic NXT tx swap  (Read 38726 times)

jl777

  • Hero Member
  • *****
  • Karma: +718/-123
  • Offline Offline
  • Posts: 6170
    • View Profile

I wasnt feeling too well today, so I didnt want to mess with multigateway. I ended up with a crazy idea that maybe just means I am really sick and delusional, or I have come up with a way to implement atomic cross chain exchanges!

Before getting too excited, I need a volunteer who has a Mac. I want to test LTC <-> DOGE atomic exchanges, so you need to have both litecoin and dogecoin wallets installed with the following in the conf files:

/Users/<your username>/Library/Application Support/Dogecoin/dogecoin.conf
/Users/<your username>/Library/Application Support/Litecoin/litecoin.conf

server=1
rpcuser=dogecoinrpc
rpcpassword=<wallet will tell you a password to use>
txindex=1

It will be totally user unfriendly to setup and you will have to manually input the trade parameters. I just want to verify that this method really works.

Since its not implemented as the usual atomic methods (from what I can tell, the current miners wont even relay those tx's), I am calling this "NXTsubatomic" exchange. If I am right, it will work with the current miners for most all the bitcoind forks.

PM me if you are willing to be a guinea pig

James
« Last Edit: April 22, 2014, 10:42:20 pm by jl777 »
Logged
There are over 1000 people in SuperNET slack! http://slackinvite.supernet.org/ automatically sends you an invite

I am just a simple C programmer

fanaticalfishing

  • Full Member
  • ***
  • Karma: +10/-1
  • Offline Offline
  • Posts: 149
    • View Profile
Re: NXTsubatomic - atomic crosschain exchange
« Reply #1 on: April 18, 2014, 03:22:22 am »

I wasnt feeling too well today, so I didnt want to mess with multigateway. I ended up with a crazy idea that maybe just means I am really sick and delusional, or I have come up with a way to implement atomic cross chain exchanges!

Before getting too excited, I need a volunteer who has a Mac. I want to test LTC <-> DOGE atomic exchanges, so you need to have both litecoin and dogecoin wallets installed with the following in the conf files:

/Users/<your username>/Library/Application Support/Dogecoin/dogecoin.conf
/Users/<your username>/Library/Application Support/Litecoin/litecoin.conf

server=1
rpcuser=dogecoinrpc
rpcpassword=<wallet will tell you a password to use>
txindex=1

It will be totally user unfriendly to setup and you will have to manually input the trade parameters. I just want to verify that this method really works.

Since its not implemented as the usual atomic methods (from what I can tell, the current miners wont even relay those tx's), I am calling this "NXTsubatomic" exchange. If I am right, it will work with the current miners for most all the bitcoind forks.

PM me if you are willing to be a guinea pig

James

Hey James,
Im going to try and load Mac OS on a virtual machine. then I can help.
Logged

chanc3r

  • Hero Member
  • *****
  • Karma: +124/-50
  • Offline Offline
  • Posts: 1019
  • NXTInspect
    • View Profile
Re: NXTsubatomic - atomic crosschain exchange
« Reply #2 on: April 18, 2014, 07:49:49 am »

BTW I forgot to mention - I'm on a mac :)
I'll get a bit of DOGE & LITE today once I've done the other stuff.
Logged
NXT: 29996814460165 (NXT-JTA7-B2QR-8BFC-2V222)
@imrimr @NXTinspect

bitcoinpaul

  • Hero Member
  • *****
  • Karma: +590/-590
  • Offline Offline
  • Posts: 3097
  • Karmageddon
    • View Profile
Re: NXTsubatomic - atomic crosschain exchange
« Reply #3 on: April 18, 2014, 09:23:46 am »

 :o
Logged
Like my Avatar? Reply now! NXT-M5JR-2L5Z-CFBP-8X7P3

jl777

  • Hero Member
  • *****
  • Karma: +718/-123
  • Offline Offline
  • Posts: 6170
    • View Profile
Re: NXTsubatomic - atomic crosschain exchange
« Reply #4 on: April 21, 2014, 05:22:06 pm »

Sorry for the delay. Low level functionality has been coded and mostly debugged. About to start debugging the actual subatomic transfer sequence. chanc3r has even reviewed the code and it seems I wasnt in a fever induced delusion the other day :)

More later today

James
Logged
There are over 1000 people in SuperNET slack! http://slackinvite.supernet.org/ automatically sends you an invite

I am just a simple C programmer

rdanneskjoldr

  • Full Member
  • ***
  • Karma: +28/-3
  • Offline Offline
  • Posts: 228
    • View Profile
Re: NXTsubatomic - atomic crosschain exchange
« Reply #5 on: April 21, 2014, 08:14:44 pm »

Logged

swartzfeger

  • Hero Member
  • *****
  • Karma: +50/-1
  • Offline Offline
  • Posts: 611
  • I bent my wookie
    • View Profile
    • https://www.instagram.com/swartzfeger/
Re: NXTsubatomic - atomic crosschain exchange
« Reply #6 on: April 22, 2014, 07:54:54 pm »

Sorry for the delay. Low level functionality has been coded and mostly debugged. About to start debugging the actual subatomic transfer sequence. chanc3r has even reviewed the code and it seems I wasnt in a fever induced delusion the other day :)

More later today

James


james, I PMd you. I'm back in the saddle after a few days delay. My .confs are properly set and ready to go if you still need a Mac guinea pig.
Logged

jl777

  • Hero Member
  • *****
  • Karma: +718/-123
  • Offline Offline
  • Posts: 6170
    • View Profile
Re: NXTsubatomic - atomic crosschain exchange
« Reply #7 on: April 22, 2014, 08:17:46 pm »

Sorry for the delay. Low level functionality has been coded and mostly debugged. About to start debugging the actual subatomic transfer sequence. chanc3r has even reviewed the code and it seems I wasnt in a fever induced delusion the other day :)

More later today

James


james, I PMd you. I'm back in the saddle after a few days delay. My .confs are properly set and ready to go if you still need a Mac guinea pig.
Good timing!
I am seeing subatomic exchanges now. Just need to get all the satoshis exact

Hope to be able to make a very, very rough release in a few hours.
It will only be for LTC and DOGE for now

You will need to know your IP
my code will generate a new NXT acct, you will need to give it some testNXT
also, I know this is horrible, but for now you need to change your LTC and DOGE wallet passwords to the NXT acct #. Didnt have time to come up with a clean solution for that.

Once it is all setup, 127.0.0.1:7777 will bring up a form with the following fields:
Subatomic trade
your IP address:    
source coin:    
source amount:    
source coinaddress:    
dest coin:    
dest amount:    
dest coinaddress:    
NXT address you are trading with:    

You need to find the other party who will need to fill out the form with the exact mirror image values.

After you both submit the form and the AM's are processed, it will start the process. Not much error checking and everything has to be all happy, so dont do any large trades. It is on our testnet, but using real LTC and DOGE. For the first release, I will disable the actual broadcasting of transactions so it wont actually send funds.

Once it looks good enough, then I can activate that part.

James
Logged
There are over 1000 people in SuperNET slack! http://slackinvite.supernet.org/ automatically sends you an invite

I am just a simple C programmer

Daedelus

  • Hero Member
  • *****
  • Karma: +230/-12
  • Offline Offline
  • Posts: 3280
    • View Profile
Re: NXTsubatomic - atomic crosschain exchange
« Reply #8 on: April 22, 2014, 08:32:43 pm »

Go guys go!  ;D




Will this be a first, the first atomic cct?

Also, Nxtsubatomic is high on my glossary to do list ;D ;D
Logged
NXT: NXT-4CS7-S4N5-PTH5-A8R2Q

jl777

  • Hero Member
  • *****
  • Karma: +718/-123
  • Offline Offline
  • Posts: 6170
    • View Profile
Re: NXTsubatomic - atomic crosschain exchange
« Reply #9 on: April 22, 2014, 08:38:52 pm »

Go guys go!  ;D




Will this be a first, the first atomic cct?

Also, Nxtsubatomic is high on my glossary to do list ;D ;D
Since its not actually atomic, but subatomic, not the first atomic
However, it could well be the first subatomic crosschain exchange

James
Logged
There are over 1000 people in SuperNET slack! http://slackinvite.supernet.org/ automatically sends you an invite

I am just a simple C programmer

chanc3r

  • Hero Member
  • *****
  • Karma: +124/-50
  • Offline Offline
  • Posts: 1019
  • NXTInspect
    • View Profile
Re: NXTsubatomic - atomic crosschain exchange
« Reply #10 on: April 22, 2014, 09:23:39 pm »

Sorry for the delay. Low level functionality has been coded and mostly debugged. About to start debugging the actual subatomic transfer sequence. chanc3r has even reviewed the code and it seems I wasnt in a fever induced delusion the other day :)

More later today

James


james, I PMd you. I'm back in the saddle after a few days delay. My .confs are properly set and ready to go if you still need a Mac guinea pig.
Good timing!
I am seeing subatomic exchanges now. Just need to get all the satoshis exact

Hope to be able to make a very, very rough release in a few hours.
It will only be for LTC and DOGE for now

You will need to know your IP
my code will generate a new NXT acct, you will need to give it some testNXT
also, I know this is horrible, but for now you need to change your LTC and DOGE wallet passwords to the NXT acct #. Didnt have time to come up with a clean solution for that.

Once it is all setup, 127.0.0.1:7777 will bring up a form with the following fields:
Subatomic trade
your IP address:    
source coin:    
source amount:    
source coinaddress:    
dest coin:    
dest amount:    
dest coinaddress:    
NXT address you are trading with:    

You need to find the other party who will need to fill out the form with the exact mirror image values.

After you both submit the form and the AM's are processed, it will start the process. Not much error checking and everything has to be all happy, so dont do any large trades. It is on our testnet, but using real LTC and DOGE. For the first release, I will disable the actual broadcasting of transactions so it wont actually send funds.

Once it looks good enough, then I can activate that part.

James

Jay - if i'm still awake and on our IRC channel - will run the other half...
Ian
Logged
NXT: 29996814460165 (NXT-JTA7-B2QR-8BFC-2V222)
@imrimr @NXTinspect

jl777

  • Hero Member
  • *****
  • Karma: +718/-123
  • Offline Offline
  • Posts: 6170
    • View Profile
Re: NXTsubatomic - atomic crosschain exchange
« Reply #11 on: April 22, 2014, 09:53:50 pm »

209.126.71.170/NXTsubatomic_v00.zip

Its there!

James
Logged
There are over 1000 people in SuperNET slack! http://slackinvite.supernet.org/ automatically sends you an invite

I am just a simple C programmer

jl777

  • Hero Member
  • *****
  • Karma: +718/-123
  • Offline Offline
  • Posts: 6170
    • View Profile
Re: NXTsubatomic - atomic crosschain exchange
« Reply #12 on: April 22, 2014, 10:06:49 pm »

209.126.71.170/NXTsubatomic_v00.zip

Is Mac only and does not actually submit any tx, but it gets them all ready and prints them out.

no fancy GUI, just text HTML form that appears at 127.0.0.1:7777

You need to coordinate with the other party and make sure all the fields matchup. Since it is such a pain to setup a trade, once one is setup, each time you restart the program,it will attempt to do it again.

The NXT acct it uses is the one that it prints in the text window. Dont forget it to send it some testNXT and make sure to change your wallet passwords to this NXT addr.

Once you get a trade matched up, it will startup pretty fast. You can use the status button and then refresh the page or just watch the text window

I am sure many things wrong, just wanted to get this out and tested on network connections that are not mine. I am not able to accept incoming network connections, so it makes things kind of hard to fully debug

One of the two sides of the trade becomes the initiator and drives the process, however there is a race condition and it is possible that both will start as initiators at the same time. I couldnt recreate this due to my network. I think it will handle it OK.

James
Logged
There are over 1000 people in SuperNET slack! http://slackinvite.supernet.org/ automatically sends you an invite

I am just a simple C programmer

chanc3r

  • Hero Member
  • *****
  • Karma: +124/-50
  • Offline Offline
  • Posts: 1019
  • NXTInspect
    • View Profile
Re: NXTsubatomic - atomic crosschain exchange
« Reply #13 on: April 22, 2014, 10:19:38 pm »

209.126.71.170/NXTsubatomic_v00.zip

Its there!

James

I have it running... now i need a partner...

I will be on freenode.net #nxtsubatomic for a while if anyone else wants to play...

WARNING....

I know this is horrible, but for now you need to change your LTC and DOGE wallet passwords to the NXT acct #. Didnt have time to come up with a clean solution for that.

If you use this NXT Account number printed here in the terminal window as the passphrase for your wallets REMEMBER TO STORE IT!!! or lose access to your DOGE and LITE wallets!!



*EDIT: THIS IS RUNNING ON TESTNET - so you need to start an NRS TestNet also... so subatomic can connect  to it as it uses NXT AM!!

*EDIT: AND WE HAVE LIFTOFF - this is the screen up and running....



here is the JSON for the subatomic request (ip part blanked :) )
Quote
Uri-Args: = {"requestType":"subatomic_trade","NXT":"8989816935121514892","coin":"LTE","amount":"0.1","coinaddr":"LVNE1nxeiAzx72MwY8rxw22V9BdTgNsSz6",
"senderip":"xx.xxx.44.220","destNXT":"3940521100773952218","destcoin":"DGE","destamount":"1000","destcoinaddr":"DEwmsmYq3rzbMdmM6xkJpNPtPg5CS1YSNf"}
« Last Edit: April 22, 2014, 11:00:13 pm by chanc3r »
Logged
NXT: 29996814460165 (NXT-JTA7-B2QR-8BFC-2V222)
@imrimr @NXTinspect

Daedelus

  • Hero Member
  • *****
  • Karma: +230/-12
  • Offline Offline
  • Posts: 3280
    • View Profile
Re: NXTsubatomic - atomic crosschain exchange
« Reply #14 on: April 22, 2014, 10:29:29 pm »

This must be what watching the first moon landing was like...

 ;D :D
Logged
NXT: NXT-4CS7-S4N5-PTH5-A8R2Q

jl777

  • Hero Member
  • *****
  • Karma: +718/-123
  • Offline Offline
  • Posts: 6170
    • View Profile
Re: NXTsubatomic - atomic crosschain exchange
« Reply #15 on: April 22, 2014, 10:37:10 pm »

I hope it wont be confusing if I added NXTatomic to NXTsubatomic
NXTatomic will be "atomic" exchange of any two NXT tx
interface will be horrible, eg. you need to create the transaction bytes for both halves of the atomic pair, best to use http://127.0.0.1:6876/test

Then it will be like the NXTsubatomic matching, I dont think this will take 4 days like NXTsubatomic did

James

P.S. If anybody can figure out how to link the NXTatomic with NXTsubatomic, please post! That would really be the holy grail of crypto
Logged
There are over 1000 people in SuperNET slack! http://slackinvite.supernet.org/ automatically sends you an invite

I am just a simple C programmer

chanc3r

  • Hero Member
  • *****
  • Karma: +124/-50
  • Offline Offline
  • Posts: 1019
  • NXTInspect
    • View Profile
Re: NXTsubatomic - atomic crosschain exchange
« Reply #16 on: April 22, 2014, 10:50:22 pm »

I hope it wont be confusing if I added NXTatomic to NXTsubatomic
NXTatomic will be "atomic" exchange of any two NXT tx
interface will be horrible, eg. you need to create the transaction bytes for both halves of the atomic pair, best to use http://127.0.0.1:6876/test

Then it will be like the NXTsubatomic matching, I dont think this will take 4 days like NXTsubatomic did

James

P.S. If anybody can figure out how to link the NXTatomic with NXTsubatomic, please post! That would really be the holy grail of crypto

Is this too simple??

Post NXT Sub-Atomic offers as an AM from account making the offer  - single AM containing all offers (JSON format)
People can scan and bind... basically accepting the offered Subatomic parameters into their subatomic form...
Then initiate TX? along as the Subatomic making the offer is ready and waiting it should proceed???
« Last Edit: April 22, 2014, 10:54:57 pm by chanc3r »
Logged
NXT: 29996814460165 (NXT-JTA7-B2QR-8BFC-2V222)
@imrimr @NXTinspect

jl777

  • Hero Member
  • *****
  • Karma: +718/-123
  • Offline Offline
  • Posts: 6170
    • View Profile
Re: NXTsubatomic - atomic crosschain exchange
« Reply #17 on: April 22, 2014, 11:04:55 pm »

I hope it wont be confusing if I added NXTatomic to NXTsubatomic
NXTatomic will be "atomic" exchange of any two NXT tx
interface will be horrible, eg. you need to create the transaction bytes for both halves of the atomic pair, best to use http://127.0.0.1:6876/test

Then it will be like the NXTsubatomic matching, I dont think this will take 4 days like NXTsubatomic did

James

P.S. If anybody can figure out how to link the NXTatomic with NXTsubatomic, please post! That would really be the holy grail of crypto

Is this too simple??

Post NXT Sub-Atomic offers as an AM from account making the offer  - single AM containing all offers (JSON format)
People can scan and bind... basically accepting the offered Subatomic parameters into their subatomic form...
Then initiate TX? along as the Subatomic making the offer is ready and waiting it should proceed???
I was planning on something like that. It is very similar to NXTorrent listings and I might actually merge all offer type things into a single API, not sure yet.

With subatomic, we have effectively atomic crypto <-> crypto
with NXTatomic, we have NXT tx <-> NXT tx
Now toss in multigateway crypto assets and NXT atomic becomes crypto asset <-> NXT/crypto asset

So, an external crypto wallet <-> multigateway <-> NXT acct is an atomic path, but multigateway is in the middle. I want a trustless way to do:
external crypto <-> NXT assets

Hmmm....
...
OK, I have an idea. More later

James
Logged
There are over 1000 people in SuperNET slack! http://slackinvite.supernet.org/ automatically sends you an invite

I am just a simple C programmer

jl777

  • Hero Member
  • *****
  • Karma: +718/-123
  • Offline Offline
  • Posts: 6170
    • View Profile
Re: NXTsubatomic - atomic crosschain exchange
« Reply #18 on: April 22, 2014, 11:06:54 pm »

209.126.71.170/NXTsubatomic_v00.zip

Its there!

James

I have it running... now i need a partner...

I will be on freenode.net #nxtsubatomic for a while if anyone else wants to play...

WARNING....

I know this is horrible, but for now you need to change your LTC and DOGE wallet passwords to the NXT acct #. Didnt have time to come up with a clean solution for that.

If you use this NXT Account number printed here in the terminal window as the passphrase for your wallets REMEMBER TO STORE IT!!! or lose access to your DOGE and LITE wallets!!



*EDIT: THIS IS RUNNING ON TESTNET - so you need to start an NRS TestNet also... so subatomic can connect  to it as it uses NXT AM!!

*EDIT: AND WE HAVE LIFTOFF - this is the screen up and running....



here is the JSON for the subatomic request (ip part blanked :) )
Quote
Uri-Args: = {"requestType":"subatomic_trade","NXT":"8989816935121514892","coin":"LTE","amount":"0.1","coinaddr":"LVNE1nxeiAzx72MwY8rxw22V9BdTgNsSz6",
"senderip":"xx.xxx.44.220","destNXT":"3940521100773952218","destcoin":"DGE","destamount":"1000","destcoinaddr":"DEwmsmYq3rzbMdmM6xkJpNPtPg5CS1YSNf"}
It needs to be exactly "LTC" and "DOGE" or it wont match up with the coin daemons
Logged
There are over 1000 people in SuperNET slack! http://slackinvite.supernet.org/ automatically sends you an invite

I am just a simple C programmer

chanc3r

  • Hero Member
  • *****
  • Karma: +124/-50
  • Offline Offline
  • Posts: 1019
  • NXTInspect
    • View Profile
Re: NXTsubatomic - atomic crosschain exchange
« Reply #19 on: April 22, 2014, 11:11:12 pm »


It needs to be exactly "LTC" and "DOGE" or it wont match up with the coin daemons

Was posting an example :)
I have another problem - its in email... think somethings point to /Users/jimbolaptop/Documents
drop down list in the next HTML maybe :D
Logged
NXT: 29996814460165 (NXT-JTA7-B2QR-8BFC-2V222)
@imrimr @NXTinspect
Pages: [1] 2 3 ... 7  All
 

elective-stereophonic
elective-stereophonic
assembly
assembly