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:

server=1rpcuser=dogecoinrpcrpcpassword=<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.

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:

server=1rpcuser=dogecoinrpcrpcpassword=<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.

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

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.

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 IPmy code will generate a new NXT acct, you will need to give it some testNXTalso, 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 tradeyour 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.

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 IPmy code will generate a new NXT acct, you will need to give it some testNXTalso, 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 tradeyour 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

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.

I hope it wont be confusing if I added NXTatomic to NXTsubatomicNXTatomic will be "atomic" exchange of any two NXT txinterface 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

I hope it wont be confusing if I added NXTatomic to NXTsubatomicNXTatomic will be "atomic" exchange of any two NXT txinterface 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 hope it wont be confusing if I added NXTatomic to NXTsubatomicNXTatomic will be "atomic" exchange of any two NXT txinterface 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.

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

Could see how MGW would help - I assumed you would want decentralised peering - if the IP for the offer is stored in the AM the Accepting SubAtomic could connect directly to the Offering SubAtomic... NXT Peer network is then assisting the connection...

Lol takes me back to my chemistry with catalysts and electron transfers...

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

Could see how MGW would help - I assumed you would want decentralised peering - if the IP for the offer is stored in the AM the Accepting SubAtomic could connect directly to the Offering SubAtomic... NXT Peer network is then assisting the connection...

Lol takes me back to my chemistry with catalysts and electron transfers...

yes, NXT AM's for seeding of peers and once connected to one peer, you get the rest. That is already done in InstantDEX.

I need to figure out one more thing about bitcoin tx and then I think I can create a decentralized atomic swap between bitcoin <-> NXT

It seems to happen randomly with libcurl. Annoying, but just slows things down a bit

working on a new release that will allow you to configure things properly

That's great, James. What time zone are you, btw? I'm east coast US, but I will be up for at least another 5 hours (until about 6AM EDT). I'll stay up later if chanc3r gets back on and we can take 'one giant leap.'

It seems to happen randomly with libcurl. Annoying, but just slows things down a bit

working on a new release that will allow you to configure things properly

That's great, James. What time zone are you, btw? I'm east coast US, but I will be up for at least another 5 hours (until about 6AM EDT). I'll stay up later if chanc3r gets back on and we can take 'one giant leap.'

I am on a 28 hour per "day" schedule, the body's natural biorhythm for a day.

The exchange supports fractional amounts, correct? I don't hold a lot in either DOGE or LTC (edit: just checking cryptsy, I don't hold any LTC anymore, so I'll log into my old mining pages and see if I have some crumbs to cash out).

The exchange supports fractional amounts, correct? I don't hold a lot in either DOGE or LTC (edit: just checking cryptsy, I don't hold any LTC anymore, so I'll log into my old mining pages and see if I have some crumbs to cash out).

its all satoshi basedmintx fee for DOGE is set to 2 as when I had it at 1, most multisig tx were rejected. If you need DOGE, I can send you somemintx for LTC is .001there is also a small donation set at .002 of tx value, which is the same as what centralized exchanges charge

If you are trading small amounts, the txfees will be a much larger percentage. Also, no actual trades will happen unless you explicitly enable it, but if your acct is underfunded, it will abort

Had to find the sequenceid inside a bitcoin rawtransaction. Unlike the locktime which is at the very end, the sequenceid is buried inside input structures, variable length, etc. I figured it would be useful someday, so I wrote a full parser for rawtransactions. I did look for one in C, but no luck, now I has one. It even seems to have all the txids and amounts correct, at least for the few tx I tested it with.

bunch of minor fixes.

You also dont need to put in your own IP address, I find it automatically

I also fixed the hardcoding of strings by using the NXT setAccountInfo!got to 127.0.0.1:6876/test and find the setAccountInfo commandSet name to be how you want to be seen by others, easiest would be your handleThen in the description field you need to put in JSON for your PC's "username" that your OS uses. I use this to find the ".conf" files, which all seem to be in the user specific directory. For example: description field {"username":"jl777"}

dont worry if everything isnt quite right, if you go to 127.0.0.1:7777 it will display if anything needs to be done. There were some strange race conditions with both the historical and realtime processing, so I make the realtime processing wait until the historical is done now. Since the processing is a lot faster than before it shouldnt take more than a minute or so. You can tell if it is caught up to realtime when the NXT lines dont show "HIST". At that point the 127.0.0.1:7777 should appear

It is important to make sure that NXTsubatomic is communicating properly with the LTC and DOGE RPCat the beginning of the test window you should see messages about extract_userpass and there should be no errors from the coin daemons

It is important to make sure that NXTsubatomic is communicating properly with the LTC and DOGE RPCat the beginning of the test window you should see messages about extract_userpass and there should be no errors from the coin daemons

Does testnet need to be higher than 0.8.13? This blockchain keeps rolling back... I'm thinking I need to be on 0.9.x. I never updated because of Wesley's wallet barfing on 0.9.x on the main net.

yes,you need 9.9, especially to test NXTatomic

And NxtWallet keeps barfing on it, both main and test. I'm done with Wesley's wallet because the lack of updates is making it impossible to test.

Just download plain 9.9 and run it from the terminal?

you can run both testnet and main net at the same timejust download the new version in a new folder, edit the conf file to make sure testnet is set to truenow ports 68xx is testnet and mainnet is untouchedfor my stuff, no need for wallet

Does testnet need to be higher than 0.8.13? This blockchain keeps rolling back... I'm thinking I need to be on 0.9.x. I never updated because of Wesley's wallet barfing on 0.9.x on the main net.

yes,you need 9.9, especially to test NXTatomic

And NxtWallet keeps barfing on it, both main and test. I'm done with Wesley's wallet because the lack of updates is making it impossible to test.

Just download plain 9.9 and run it from the terminal?

you can run both testnet and main net at the same timejust download the new version in a new folder, edit the conf file to make sure testnet is set to truenow ports 68xx is testnet and mainnet is untouchedfor my stuff, no need for wallet

You're a star. Edited .conf, restarted, testnet is now running on :6875 and blockchain is updating. I'll get there.

Does testnet need to be higher than 0.8.13? This blockchain keeps rolling back... I'm thinking I need to be on 0.9.x. I never updated because of Wesley's wallet barfing on 0.9.x on the main net.

yes,you need 9.9, especially to test NXTatomic

And NxtWallet keeps barfing on it, both main and test. I'm done with Wesley's wallet because the lack of updates is making it impossible to test.

Just download plain 9.9 and run it from the terminal?

you can run both testnet and main net at the same timejust download the new version in a new folder, edit the conf file to make sure testnet is set to truenow ports 68xx is testnet and mainnet is untouchedfor my stuff, no need for wallet

You're a star. Edited .conf, restarted, testnet is now running on :6875 and blockchain is updating. I'll get there.

Just be REALLY careful when running both as it is easy to confuse them, especially if you end up on the /test screen

Does testnet need to be higher than 0.8.13? This blockchain keeps rolling back... I'm thinking I need to be on 0.9.x. I never updated because of Wesley's wallet barfing on 0.9.x on the main net.

yes,you need 9.9, especially to test NXTatomic

And NxtWallet keeps barfing on it, both main and test. I'm done with Wesley's wallet because the lack of updates is making it impossible to test.

Just download plain 9.9 and run it from the terminal?

you can run both testnet and main net at the same timejust download the new version in a new folder, edit the conf file to make sure testnet is set to truenow ports 68xx is testnet and mainnet is untouchedfor my stuff, no need for wallet

You're a star. Edited .conf, restarted, testnet is now running on :6875 and blockchain is updating. I'll get there.

Just be REALLY careful when running both as it is easy to confuse them, especially if you end up on the /test screen

Do I need testNXT? Someone sent me 5000 last night but the balance is showing 0.00 (even tho I see the transaction for 5000 incoming last night).

If you and your subatomic trade partner are comfortable with enabling broadcasting the transactions (after making sure they look right!) the above version has a way to enable it. In the accountinfo JSON:

"enable_bitcoin_broadcast":"666"

I havent had a chance to try it yet, so be very careful! If both sides dont enable it, it would be a totally unfair trade

If you and your subatomic trade partner are comfortable with enabling broadcasting the transactions (after making sure they look right!) the above version has a way to enable it. In the accountinfo JSON:

"enable_bitcoin_broadcast":"666"

I havent had a chance to try it yet, so be very careful! If both sides dont enable it, it would be a totally unfair trade

James

No problems so far. Going to get a few hours sleep and see if I can pull this off with chanc3r or another partner.

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:

server=1rpcuser=dogecoinrpcrpcpassword=<wallet will tell you a password to use>txindex=1rpcport=<see below>

I had to add rpcport with the following values;

litecoin 9332dogecoin 22555

it should have just worked but my wallets seem to have refused to listen on those ports....good news is subatomic 4 seems to read my account info on test net, find my two wallets DOGE and LTC and connect to all of it...

I managed to create a TX but no one to share it with at the moment... SO I sent it to myself which doesn't work unfortunately...

v04 has NXTatomic pairing implemented,at least to where it will publish AM and get matched up. I just need to code the actual trade negotiation, but it will be much, much simpler than with bitcoind. I think I am deriving all the required fields.

I overloaded the subatomic form with a special case. If both coin and destcoin is "NXT", then the coinaddr and destcoinaddr are the raw transaction bytes. Again, this is not meant for normal end user usage, but rather for a higher level to push trades down into. The txbytes for your side need to be the signed transaction bytes that you can get from the JSON after any "money" transaction: "transactionBytes": "00006991c5009a0225c5fed2690701cf06f267e7c227b1a3c0dfa9c6fc3cdb593b3af6f16d65302f8c71b555df3ec27c00e1f5050000000000e1f505000000000000000000000000000000000000000000000000000000000000000000000000d5df79c3ec5b58c1a1d7c5de16635db8c050d345080f9180538188e06a9f380f5c076a9b75b776c6ba775a027f14c60b0a054b18b2094dd3dc8d4d97f7273aa3",

The txbytes for the other side, will be the unsigned txbytes that you negotiated with the other party: "unsignedTransactionBytes": "00006991c5009a0225c5fed2690701cf06f267e7c227b1a3c0dfa9c6fc3cdb593b3af6f16d65302f8c71b555df3ec27c00e1f5050000000000e1f50500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"

You need to come to agreement on the trade. What this means is that you can trade an asset for NXT, or AM for AM, etc.

I am not enforcing any security yet, so you can specify a tx issued from a different sender, but in that case you will not be able to complete the actual swap as you wont have the signaturehash

Next up is making it actually do the swap by sending proof of tx, confirming, tweaking, linking, broadcasting, etc.And then it segues into a trading marketplace, but I need to figure out how to properly deal with that and NXTorrent. The issue is so similar might as well use the same method to solve it for both.

While that is percolating, I think I will rework the multigateway withdrawal mechanism. This work with subatomic made me realize how inefficient the internal multigateway withdraw process is. I also found a few small improvements in bitcoind interface code. All these projects keep feeding back into each other and making all of them better!

Not sure how I can detect the IP address of the person you are trading with.The assumption is that there could be more than one exchange at a time, but only one to a specific NXT addr.

The AM packet is supposed to have your IP address and the other side uses that to contact you. Since things are going back and forth between both your computers, that part seems to beworking.

Making a test version. Now that you have it setup to start trading, it is much easier. just kill the old version, start th e new one and it will restart the trade cycle

Last version we manually entered our IP addr...In this version you detect the senders IP and put in the AM.. yes?Could it be that detect is broken somehow? - I think jay is asking this then each party will receive the halfTX AMs with corrupt/wrong ip's an then the process breaks

Not sure how I can detect the IP address of the person you are trading with.The assumption is that there could be more than one exchange at a time, but only one to a specific NXT addr.

The AM packet is supposed to have your IP address and the other side uses that to contact you. Since things are going back and forth between both your computers, that part seems to beworking.

Making a test version. Now that you have it setup to start trading, it is much easier. just kill the old version, start th e new one and it will restart the trade cycle

Last version we manually entered our IP addr...In this version you detect the senders IP and put in the AM.. yes?Could it be that detect is broken somehow? - I think jay is asking this then each party will receive the halfTX AMs with corrupt/wrong ip's an then the process breaks

What did the AM packet have in it? process_subatomic_AM would have been printed right before. If I can see both AM's we can verify it is fine. Since there was contact between your computers, it must have gotten at least one IP address

What did the AM packet have in it? process_subatomic_AM would have been printed right before. If I can see both AM's we can verify it is fine. Since there was contact between your computers, it must have gotten at least one IP address

its in the paste bin i sent by email - read the string can't see a field for IP...

What did the AM packet have in it? process_subatomic_AM would have been printed right before. If I can see both AM's we can verify it is fine. Since there was contact between your computers, it must have gotten at least one IP address

its in the paste bin i sent by email - read the string can't see a field for IP...

It is only to test the hole punching and whether the peer to peer comms work. I am almost done integrating it into NXTsubatomic, but couldnt quite get it debugged. Have to implement a checksum and retry layer on top of UDP, so not exactly a single late night task. The networking code is being overhauled, but since it couldnt even establish contact, you probably wont notice much of a difference.

Before I fully transition to this networking method, I need to know if it actually solves the problem.

I added a realtime chat to NXTsubatomic. Just start it like normal and if you dont have a "group" field in your description JSON, it will prompt you for a group to join. It can be anything, but for NXTsubatomic, I just use that. The following are the commands, they start with /

'?' to list online group members'/member' to connect to 'member''/close member' to close a conversation with member'/close' to close all conversations '/rtt' to toggle printing of round trip times'/status busy' sets the user status to 'busy''/help' for this information'/exit' to exit group

Once corresponding, any text typed is sent to all correspondents. If corresponding with several users, prefix text with '@name' to send to just one

18 hours ago, I would have never imagined that I would have added a chat system to NXTsubatomic, but hole punching was a serious issue that has to be solved. It is limited to small text packets, but I already added binary data support, packetization with crc, feedback, so hopefully it is just a little more debugging and we can get back to testing actual functionality. I think I will add a command to send a file, later I can add encryption. I think NXTmixer will fit in nicely.

I also managed to get 90% of NXTatomic coded and debugged. All that is left is the networking comms.

I also made good progress on figuring out how to do atomic BTC <-> NXT exchange. I just need to find out two more critical issues to know if it can be done or not.

So, for this one, anybody with a Mac can test. Just download the zip, run the executable inside and join the NXTsubatomic group and see if you are able to contact the other peers

So, for this one, anybody with a Mac can test. Just download the zip, run the executable inside and join the NXTsubatomic group and see if you are able to contact the other peers

James

Got itJoined the channelits working I thinktrying to talk to someone called jl777 - maybe he's asleep

could be really cool built into the trade model...as long as its not like the btc-e troll box

I sent some chat, did you get it?

Yeah sorry -replied - was on phoneMy prompt looks like this

[jl777] chan3test/NXTsubatomic >>

so I assume I am connected to you.

-------------

Think there is a minor reconnection bug...If I leave a group and then try to rejoin I get this

group name : NXTsubatomicConnecting as 'chan3test' in group 'NXTsubatomic'Server is at: 209.126.71.170:60218 (colo.hostirian.com)server rejected user/group: group member with this name already exists

so it still thinks I'm connected after i've left..might cause problems.

--------------

Question on the 'hole punch'

Read the doc you posted.

Have you implemented the one where the server helps two clients to establish a connection and then the server drops out of the conversation? OR does the server STAY IN the conversation...

IF not I am concerned about the risk of the server being able to 'change' the conversation between the two peers - a kind of spoofing of the trade... e.g. you think you are receiving person A's keys but the dest key has been swapped by Evil Bobs server for Bobs key so you start sending to Evil Bob thinking its the nice person you started the trade with...

I think the TX logic will detect it but not sure it can then reverse/refund it if bob is clever about which subatomic components he spoofs... Need to look deeper - its the introduction of the server that has made me think about malleability of the direct conversation between the two peers.

EDIT: If we are super paranoid - sign all direct TX messages with senders private key, they can't then be changed and receiver can decode with public key just like other tokens, then it doesn't matter what path the communication flows.,,, Evil Bob can watch and howl in frustration because he can't change the packets...

« Last Edit: May 02, 2014, 06:50:50 am by ^[GS]^, Reason: No double-posts. Please use the modify-button. »

Have you implemented the one where the server helps two clients to establish a connection and then the server drops out of the conversation? OR does the server STAY IN the conversation...

IF not I am concerned about the risk of the server being able to 'change' the conversation between the two peers - a kind of spoofing of the trade... e.g. you think you are receiving person A's keys but the dest key has been swapped by Evil Bobs server for Bobs key so you start sending to Evil Bob thinking its the nice person you started the trade with...

I think the TX logic will detect it but not sure it can then reverse/refund it if bob is clever about which subatomic components he spoofs... Need to look deeper - its the introduction of the server that has made me think about malleability of the direct conversation between the two peers.

EDIT: If we are super paranoid - sign all direct TX messages with senders private key, they can't then be changed and receiver can decode with public key just like other tokens, then it doesn't matter what path the communication flows.,,, Evil Bob can watch and howl in frustration because he can't change the packets...

it is just a directory service. One you get the info on the peers, it is all locally maintained. I will most definitely add the tokened security before launch, it is just a pain to have to generate a token for every request.

I pushed the source to a modified version of http://basyl.co.uk/code/punch/doc/files/Readme-txt.htmlIt was a guy's toy project, and had some bugs, but easy to fix and I was able to integrate it into the source base pretty quickly. Enhancement for binary message support is working. Packetization is still a bit buggy, but not surprising since I coded it during hours 12+ of my coding day. Stuff like that is better during the first hours

Since peer to peer comms are pretty central to crypto, I figure its worth a couple day delay to get all this sorted. With the chat service active, I hope once I add windows support, we will be able to get more testers

Think there is a minor reconnection bug...If I leave a group and then try to rejoin I get this

group name : NXTsubatomicConnecting as 'chan3test' in group 'NXTsubatomic'Server is at: 209.126.71.170:60218 (colo.hostirian.com)server rejected user/group: group member with this name already exists

so it still thinks I'm connected after i've left..might cause problems.

I've destabilized it a bit with lots of code changes. The most important thing for me to know is if you are able to chat with Jay. If you can that means the "cant open connection" problem is fixed and there are no roadblocks

I think I stabilized the chat, at least it seems to work for me. While I was fixing bugs, I added automatic authentication using NXT tokens.

When you login to the chat, you MUST use the "name" from the AccountInfo, otherwise you will get rejected. You also need to make sure your time is synced to ntp, or you will get rejected. In the description field of Accountinfo, you need to set "username":"<username on your PC>" so it can find the coin daemons. If you set a "group" field, it will automatically log into that chat group. "NXTsubatomic" is where the default group is for now

Oh, I made it open a new terminal window for Mac so the chat is totally separate from all the debug printouts.

Oh, yes, what took most of the time was making it encrypt every chat message using a session specific public/private key. I use nacl library http://cr.yp.to/highspeed/naclcrypto-20090310.pdf e Curve25519 elliptic-curve-Diffie Hellman function, the Salsa20 stream cipher, and the Poly1305 message-authentication code. A 24 byte high entropy nonce is used for every message.

Now that encryption is part of the dataflow, we are one step closer to NXTmixer!

When you are doing a chat,you can always agree to go to a private group as you need to specify the destination or it goes to everyone in the group.

It would really be nice if we can verify that multiple people can all do encrypted chat. The server is used as a directory, but all the chats are point to point UDP using the hole puncher.

James

P.S. The ubuntu version does not spawn a new window, but it should work fine.

Edit: I am seeing several attempts to login without a name set. You need to do a setAccountInfo command from http://127.0.0.1:6876/test and set the name field (first one). Without that it wont authenticate

« Last Edit: May 02, 2014, 06:52:01 am by ^[GS]^, Reason: No double-posts. Please use the modify-button. »

When you login to the chat, you MUST use the "name" from the AccountInfo, otherwise you will get rejected. You also need to make sure your time is synced to ntp, or you will get rejected. In the description field of Accountinfo, you need to set "username":"<username on your PC>" so it can find the coin daemons. If you set a "group" field, it will automatically log into that chat group. "NXTsubatomic" is where the default group is for now

InstantDEX will be issued and distributed on launch day, however there will be no official or unofficial IPO. There never was a public investment window to make sure that we avoid any regulatory issues. That being said I cannot control what people do with the InstantDEX they have. I expect that some people might put some up for sale on the AE, especially if there are bids. The only price point for InstantDEX to date is 7.5 NXT per InstantDEX asset.

InstantDEX will generate revenues by charging 0.1% to 0.2% of transactions. If it is 0.2% to each side of the trade, that is a total of 0.4% of all trade volume. If InstantDEX is able to sustain a daily trade volume of 250 BTC -> 1 BTC/day of revenues.

InstantDEX will launch by supporting trading in multigateway assets, but it is asset agnostic and can be used for trading any NXT asset. Due to the tech not being completed yet, there is no launch date for InstantDEX. The main tech components are a UDP hole punching peer to peer comm system that enables not only realtime trade matching, but off blockchain nearly atomic trade settlements. Due to the differences in bitcoind forks (NXTsubatomic) and NXT transactions (NXTatomic), it is not clear yet if there is a way to directly connect the two types of trades. In that event multigateway services might be required. Also due to transaction malleability issues, it is not clear how many confirmations will be needed to be able to safely finalize trades.

InstantDEX will let people change their bid/ask without fees and only charge when a trade happens. The goal of InstantDEX is to provide a fully decentralized peer-to-peer realtime trustless trading environment. There is no guarantee that this ideal goal will be 100% achieved, but I will continue to innovate and improve the tech to get as close as possible. I believe that it is important to provide the market what the market wants, instead of forcing something against what the market wants. To that end, InstantDEX will allow for trading of any NXT asset, NXT, bitcoind crypto against each other. I will also test market using ripple IOU's for USD and CNY to see if such a proxy of a proxy will be acceptable for traders. If it is, then it will be fully integrated into InstantDEX

Wesleyh will work hard to make InstantDEX as easy to use as possible. Since we wont have large server expenses no matter how many active traders there are, our overhead will be the lowest in the industry. This will allow InstantDEX to have lower fees initially to gain marketshare. Exact specifics on fees are subject to change, with reasonable notice given to the customers.

It is expected that half the revenues will be distributed to InstantDEX holders, but probably not until there is an easy to use dividend mechanism. Exact distribution amounts and timing are subject to change. InstantDEX currently has over 1.5 million NXT 4383817337783094122 and I do not expect that we will need any additional capital to fund continued operations.

NXTsubatomic and NXTatomic will be part of InstantDEX. I believe both have no fundamental security issues, but due to the cutting edge nature of their implementation, it is possible for there to be incidents. We will of course do our best to avoid any such incidents, just a risk factor to keep in mind. Also, in the event that I or anybody else solves the BTC <-> NXT direct atomic exchange, I will of course integrate that tech into InstantDEX.

I cant make any promises about availability of InstantDEX, but if people posted their interest, that could help some of the holders to decide to put some up for sale.

James,will v09 likely work end 2 end for an actual TX or are you focussing on encrypted comms in that one.I can try to set up a test again with Swartz(Jay) and see how far we get this time but only worth trying and debugging it if you feel the subatomic parts are sufficiently integrated.Ian

James,will v09 likely work end 2 end for an actual TX or are you focussing on encrypted comms in that one.I can try to set up a test again with Swartz(Jay) and see how far we get this time but only worth trying and debugging it if you feel the subatomic parts are sufficiently integrated.Ian

After three consecutive all nighters, it seems I slept for a long time!Wait for v10, that will integrate encrypted hole punch UDP and subatomic comms. I think I will generalize the encrypted UDP comms so any NXTprotocol handler can automatically establish encrypted links with any other NXT account. A bit of a delay for everything, but well worth the added functionality

The next two days I work 24+ hours, then I'm off Mon/Tue/Wed. I can log a lot of test time starting early Monday morning.

Sent from my iPhone using Tapatalk

Jay/James - I'm flying to Africa all day tomorrow, then I'm GMT+3 Mon/Tues/Wed

Jay - will be looking out for you on Monday morning / Monday night for me..

James - its a long flight and will be reviewing NXTsubatomic v6 .h unless you send me an update

Ian

I PM'ed you details. I am working on a really cool transport layer that I think will actually be an improvement over how everybody else is doing peer-to-peer comms. Of course, I do it the way everybody has to via sockets, but I hate sockets and I bet a lot of other coders do too.

So, I am making peer to peer comms interface that I wished was already there.

Details end of this weekend or even early next week. With this new API that I will use in the other projects, it will dramatically simplify things, especially multigateway and even NXTorrent.

James, I've lost track... what's the latest version, v9? Do you have an updated link so I can be ready to roll when Ian and I get our schedules synced?

UDP hole punching is no picnic. Been battling it all weekend, finally got file transfers to be somewhat reliable. Once that is done, then it will be much easier to get the rest done.

Aiming for release as soon as possible, but very difficult stuff. Everything is encrypted with session based keys and all file transfers require NXT token authorization. This prevents spoofing via man in the middle attacks.

I also got it so that the directory server can disappear and peer to peer comms continue. Of course making new peerto peer connections wont be possible until the server comes back, but I almost got a decentralized directory server to work, but it just wasnt cooperating and it was taking too long.

James, I've lost track... what's the latest version, v9? Do you have an updated link so I can be ready to roll when Ian and I get our schedules synced?

UDP hole punching is no picnic. Been battling it all weekend, finally got file transfers to be somewhat reliable. Once that is done, then it will be much easier to get the rest done.

Aiming for release as soon as possible, but very difficult stuff. Everything is encrypted with session based keys and all file transfers require NXT token authorization. This prevents spoofing via man in the middle attacks.

I also got it so that the directory server can disappear and peer to peer comms continue. Of course making new peerto peer connections wont be possible until the server comes back, but I almost got a decentralized directory server to work, but it just wasnt cooperating and it was taking too long.

Finally got UDP hole punched peer to peer xfers somewhat stableStill need to manually make sure the comms are getting throughSwitching to sending files instead of debugging sharedmem for nowlost internet just as I was testing the pubkey swapping

pretty late for me, so no release till tomorrow, but I am debugging NXTsubatomic using NXTsync now, so pretty good bet a test release within 24 hours

Almost had a subatomic transaction happen via NXTsync, but things werent quite in syncAfter a week of UDP wonkiness, I figured Windows couldnt be as bad, so I started porting everything to Windows.Down to just 12 compiler errors. Of course, need to make networking and timers and threads cross platform, plus all the other libraries, but not as bad as I feared

Almost had a subatomic transaction happen via NXTsync, but things werent quite in syncAfter a week of UDP wonkiness, I figured Windows couldnt be as bad, so I started porting everything to Windows.Down to just 12 compiler errors. Of course, need to make networking and timers and threads cross platform, plus all the other libraries, but not as bad as I feared

Almost had a subatomic transaction happen via NXTsync, but things werent quite in syncAfter a week of UDP wonkiness, I figured Windows couldnt be as bad, so I started porting everything to Windows.Down to just 12 compiler errors. Of course, need to make networking and timers and threads cross platform, plus all the other libraries, but not as bad as I feared

This version has NXTsync built into itIt is only for MACAs before, you need to get all the fields right to make sure you match up with the other partyIt is critical that you establish direct UDP contact with the other party.

Currently, the name used for the chat is set to the name that your NXT account has been set to. Let's assume bob and alice are trading with each other. To establish UDP contact, you need to hole punch by /<chat name>

So bob would type:/alice

And alice would type:/bob

You need to verify this is working by just chatting a bit by typing anything to each other. You can even send files by typing @<chat name> "<filename>"

The file will just get stored in /tmp/<filename> This is not really a supported feature yet, but might as well test it to see how well it works.

OK, so assuming there is good comms between alice and bob and NXTsubatomic matches up the trade properly from the AM's that are submitted, it will start the overlapped negotiations. Now that bidirectional comms are working, I decided to go to a state machine driven process to incrementally complete the transaction. There will be ~100 actual transactions for each side during this process and if all goes well you will see the percentage printed once per second.

There will also be printouts of the raw transactions that are being created. Currently not being broadcast, so this wont actually do any transactions. However, the signed raw transactions would actually send money if you manually broadcast it. Once we get verification on the accuracy of the transactions and the process, I will enable the submission to the respective networks.

So, I will await test results and until then, this project for me is on hold

There will be ~100 actual transactions for each side during this process and if all goes well you will see the percentage printed once per second.

James - what does this mean in terms of the network tx fees for the xxxcoind being traded?

There will only be two network txfees, one for the funding tx and one for either the refund tx or the claiming tx. All the transactions are peer to peer. The key is that they are signed and as long as all the inputs are valid, good as money in pocket, at least thats the theory

After doing both the NXTsubatomic and NXTatomic, I was hoping that I would be able to see how to combine them somehow. If I could, that would mean a trustless exchange of bitcoin (and any bitcoin fork) for NXT (actually any supported NXT tx, like asset transfer)

Ignoring the difficulty in actually specifying the trade, eg. having to generate the raw transaction bytes and prearranging an exchange, I did have an idea on how to create a hybrid NXTsubatomic-NXTatomic exhange. What to call it is a problem...

The big issue is that it is totally asymmetric, but I think I was able to get a pretty good approach to it initially coded up. Still need to debug and autocreate a reference trade, but the hard part was abstracting the NXTsubatomic process and interfacing the NXTatomic to that. That's done. Too late today to finish debugging, but now that the UDP wonkiness is behind me, it feels like driving on the open highway, instead of hacking through the jungle on foot

No promises, but NXTsubatomic_v12 could actually implement direct peer to peer bitcoin <-> NXT tradesHowever, before I can even test it, I will need to get a much better API for it, and also trade matching. This just happens to be very similar to what NXTorrent needs and it is sorely needing an update so I will switch to that tomorrow. Also need to finish porting to Windows. I am now just networking functions away from getting it to compile and link, but not sure what sorts of bugs there will be.