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.12.2

Pages: 1 2 3 [4] 5 6 7  All

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

jl777

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

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!

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

swartzfeger

  • Hero Member
  • *****
  • Karma: +50/-1
  • Offline Offline
  • Posts: 611
  • I bent my wookie
    • View Profile
    • https://www.instagram.com/swartzfeger/

just downloaded v4. Should be able to test here shortly.
Logged

swartzfeger

  • Hero Member
  • *****
  • Karma: +50/-1
  • Offline Offline
  • Posts: 611
  • I bent my wookie
    • View Profile
    • https://www.instagram.com/swartzfeger/

Running v4. Anyone want to try this?
Logged

Daedelus

  • Hero Member
  • *****
  • Karma: +230/-12
  • Offline Offline
  • Posts: 3280
    • View Profile

http://youtube.com/watch?v=e-QFj59PON4

I would play this just as your setting up and about to press 'the button' for the first time :D :D :D

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

chanc3r

  • Hero Member
  • *****
  • Karma: +124/-50
  • Offline Offline
  • Posts: 1019
  • NXTInspect
    • View Profile

Running v4. Anyone want to try this?

I'm on IRC - where are you?
Logged
NXT: 29996814460165 (NXT-JTA7-B2QR-8BFC-2V222)
@imrimr @NXTinspect

jl777

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

Running v4. Anyone want to try this?

I'm on IRC - where are you?
You will need to use http://209.126.71.170/NXTsubatomic_v05.zip
v04 will get confused by the NXTatomic AM's I am testing with

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

swartzfeger

  • Hero Member
  • *****
  • Karma: +50/-1
  • Offline Offline
  • Posts: 611
  • I bent my wookie
    • View Profile
    • https://www.instagram.com/swartzfeger/


Running v4. Anyone want to try this?

I'm on IRC - where are you?

Had to run wedding errands. Home in 5.


Sent from my iPhone using Tapatalk
Logged

swartzfeger

  • Hero Member
  • *****
  • Karma: +50/-1
  • Offline Offline
  • Posts: 611
  • I bent my wookie
    • View Profile
    • https://www.instagram.com/swartzfeger/

Running v4. Anyone want to try this?

I'm on IRC - where are you?
You will need to use http://209.126.71.170/NXTsubatomic_v05.zip
v04 will get confused by the NXTatomic AM's I am testing with

James


Downloaded, and chanc3r and I are coordinating. Only hold up now is updating DOGE wallet, another 600 blocks or so.
Logged

swartzfeger

  • Hero Member
  • *****
  • Karma: +50/-1
  • Offline Offline
  • Posts: 611
  • I bent my wookie
    • View Profile
    • https://www.instagram.com/swartzfeger/


got trade! flipped.0 | initflag.3
Logged

jl777

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

What does the status button show?
Are you seeing stuff in the text window?
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

swartzfeger

  • Hero Member
  • *****
  • Karma: +50/-1
  • Offline Offline
  • Posts: 611
  • I bent my wookie
    • View Profile
    • https://www.instagram.com/swartzfeger/

What does the status button show?
Are you seeing stuff in the text window?



subatomic_send_pubkeys cantsend.0
send pubkeys DBc9VPgvBNovCB7stPkv4jUp3RaZg2Mpq5 (*censored* and ) Lay5W86ofFKzakoxT8A5mBWkcneczAHRA3 to
got packet.(P) len.12304 from (::1)
got pubkeys  and
cant gen multisig 68 48 68 0
Logged

jl777

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

What does the status button show?
Are you seeing stuff in the text window?



subatomic_send_pubkeys cantsend.0
send pubkeys DBc9VPgvBNovCB7stPkv4jUp3RaZg2Mpq5 (*censored* and ) Lay5W86ofFKzakoxT8A5mBWkcneczAHRA3 to
got packet.(P) len.12304 from (::1)
got pubkeys  and
cant gen multisig 68 48 68 0

(::1) is not the right type of IP address...
it needs to be the normal IP address of the other party
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

What does the status button show?
Are you seeing stuff in the text window?

sent you an entire paste bin james :)

its looping on multi-sig so we got something wrong somewhere, status button shows nothing and can't seem to cancel it :/

*EDIT: if this works judging by how my testNXT is going down there will be lots more TX Fees to be forged. :)
« Last Edit: April 23, 2014, 11:39:36 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

What does the status button show?
Are you seeing stuff in the text window?

sent you an entire paste bin james :)

its looping on multi-sig so we got something wrong somewhere, status button shows nothing and can't seem to cancel it :/

*EDIT: if this works judging by how my testNXT is going down there will be lots more TX Fees to be forged. :)
control-C to kill the program :)
why is your testNXT going down??
Only one AM should be sent, any other NXT commands would be a bug
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

swartzfeger

  • Hero Member
  • *****
  • Karma: +50/-1
  • Offline Offline
  • Posts: 611
  • I bent my wookie
    • View Profile
    • https://www.instagram.com/swartzfeger/

What does the status button show?
Are you seeing stuff in the text window?

sent you an entire paste bin james :)

its looping on multi-sig so we got something wrong somewhere, status button shows nothing and can't seem to cancel it :/

*EDIT: if this works judging by how my testNXT is going down there will be lots more TX Fees to be forged. :)
control-C to kill the program :)
why is your testNXT going down??
Only one AM should be sent, any other NXT commands would be a bug


Ok... but what about the ip address/address auto-detect? Is it broken?
Logged

chanc3r

  • Hero Member
  • *****
  • Karma: +124/-50
  • Offline Offline
  • Posts: 1019
  • NXTInspect
    • View Profile

control-C to kill the program :)
why is your testNXT going down??
Only one AM should be sent, any other NXT commands would be a bug

well you submit...
you cancel maybe
you submit a new one
you update your account info...

and I know many ways to kill a programme  :D
Logged
NXT: 29996814460165 (NXT-JTA7-B2QR-8BFC-2V222)
@imrimr @NXTinspect

jl777

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

What does the status button show?
Are you seeing stuff in the text window?

sent you an entire paste bin james :)

its looping on multi-sig so we got something wrong somewhere, status button shows nothing and can't seem to cancel it :/

*EDIT: if this works judging by how my testNXT is going down there will be lots more TX Fees to be forged. :)
control-C to kill the program :)
why is your testNXT going down??
Only one AM should be sent, any other NXT commands would be a bug


Ok... but what about the ip address/address auto-detect? Is it broken?
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
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

control-C to kill the program :)
why is your testNXT going down??
Only one AM should be sent, any other NXT commands would be a bug

well you submit...
you cancel maybe
you submit a new one
you update your account info...

and I know many ways to kill a programme  :D
Oh, ok, I thought you meant it was just draining it in a loop!
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

swartzfeger

  • Hero Member
  • *****
  • Karma: +50/-1
  • Offline Offline
  • Posts: 611
  • I bent my wookie
    • View Profile
    • https://www.instagram.com/swartzfeger/


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


Should we wait for _v06?
Logged

chanc3r

  • Hero Member
  • *****
  • Karma: +124/-50
  • Offline Offline
  • Posts: 1019
  • NXTInspect
    • View Profile


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
Logged
NXT: 29996814460165 (NXT-JTA7-B2QR-8BFC-2V222)
@imrimr @NXTinspect
Pages: 1 2 3 [4] 5 6 7  All
 

elective-stereophonic
elective-stereophonic
assembly
assembly