soho01592
Newbie
Offline
Activity: 10
Merit: 0
|
|
February 21, 2014, 08:52:56 AM |
|
|
|
|
|
pinarello
Full Member
Offline
Activity: 266
Merit: 100
NXT is the future
|
|
February 21, 2014, 08:54:34 AM |
|
My NXT is dancing the Limbo again between my account and bter Has anybody had any luck with bter NXT deposits the last 24 hours? Is this crypto world? 5000 EURO lost due MTgox 87000 NXT lost due transaction to bter
|
|
|
|
jl777
Legendary
Offline
Activity: 1176
Merit: 1134
|
|
February 21, 2014, 09:08:48 AM |
|
struct gateway_info // this struct is very incomplete, still a work in progress { double balance,deposits,withdrawals,tbd __attribute__ ((packed)); ... };
struct gateway_AM { ... double amount __attribute__ ((packed)); double unspent __attribute__ ((packed)); double change __attribute__ ((packed)); ... };
Would it be possible to use int64_t from the stdint.h library to represent amounts instead of floating point? Eventually, but for single deposit and withdrawals, using double wont lose any satoshi or even dogtoshi. I would only be a cumulative drift in gateway balance totals. I just dont want to have to deal with converting everything to int math for now.
|
|
|
|
CIYAM
Legendary
Offline
Activity: 1890
Merit: 1086
Ian Knowles - CIYAM Lead Developer
|
|
February 21, 2014, 09:13:46 AM |
|
I just dont want to have to deal with converting everything to int math for now.
This is something better to be done "sooner than later" - I gave you a link to code (check back a couple of posts) that does the job (and has had years of "testing in the field") - feel free to use it.
|
|
|
|
jl777
Legendary
Offline
Activity: 1176
Merit: 1134
|
|
February 21, 2014, 09:19:28 AM |
|
Would it be possible to use int64_t from the stdint.h library to represent amounts instead of floating point?
Indeed James you should *never* use binary floating point types for *money* please use an int64_t as suggested. If you're interested take a look at https://github.com/ciyam/ciyam/blob/master/src/numeric.cpp (an example of how to do "decimal" using a 64 bit integer as a mantissa). The amounts in the gateway_AM packets are advisory and just for sanity checks. I am relying on what the bitcoind returns. With 8 digits fraction the smallest unit, a double will always map to the exact value, doesnt it? I dont understand the big issue. The only thing that seems to be a problem is that cumulative balances the gateways keep would drift due to noise over time, but I am able to resync by tallying up the unspent outputs at anytime. Do I really have stop using doubles? I am worried about all the scaling that I will have to do in order to trade the wide valuation range of all the cryptos. As it is, the low valued cryptos that are near 1 satoshi cant even trade against BTC due to the smallest increment being 50% change in price. I think there is more value to people to be able to get smaller spreads for the low value cryptos and if they lose 1 over time due to floating point noise, they are still much better off. If there is a solid reason to change to int64_t, I will, but I am not using 32 bit floats, I am using 64 bit double precision. James
|
|
|
|
jl777
Legendary
Offline
Activity: 1176
Merit: 1134
|
|
February 21, 2014, 09:23:13 AM |
|
I just dont want to have to deal with converting everything to int math for now.
This is something better to be done "sooner than later" - I gave you a link to code (check back a couple of posts) that does the job (and has had years of "testing in the field") - feel free to use it. Is there something in C? Its C++ and also a lot of code, almost doubles the size of the gateway code. Is double precision floating point really so unreliable?
|
|
|
|
CIYAM
Legendary
Offline
Activity: 1890
Merit: 1086
Ian Knowles - CIYAM Lead Developer
|
|
February 21, 2014, 09:27:58 AM |
|
Is double precision floating point really so unreliable?
This is peoples *money* you are dealing with James so I think you should not be so cavalier and actually understand how things work (or pay someone else to do the job *properly*). If you take such shortcuts then your code will just end up as "junk" down the track. I am sure there is some equivalent C code around and the code I wrote there could be reduced (as a lot of functionality it has you wouldn't need).
|
|
|
|
pinarello
Full Member
Offline
Activity: 266
Merit: 100
NXT is the future
|
|
February 21, 2014, 09:29:00 AM |
|
Why is blockchain only show 4 confirmation on an transaction made yesterday?
what if exchange only use blockchain info?
please explain
|
|
|
|
Eadeqa
|
|
February 21, 2014, 09:32:43 AM |
|
My NXT is dancing the Limbo again between my account and bter Has anybody had any luck with bter NXT deposits the last 24 hours? Is this crypto world? 5000 EURO lost due MTgox 87000 NXT lost due transaction to bter Is the transaction in the blockchain? Try contacting them. They have resolved such issues before
|
|
|
|
Eadeqa
|
|
February 21, 2014, 09:33:13 AM |
|
Why is blockchain only show 4 confirmation on an transaction made yesterday?
what if exchange only use blockchain info?
please explain
Got a link?
|
|
|
|
pinarello
Full Member
Offline
Activity: 266
Merit: 100
NXT is the future
|
|
February 21, 2014, 09:35:09 AM |
|
Why is blockchain only show 4 confirmation on an transaction made yesterday?
what if exchange only use blockchain info?
please explain
Got a link? transaction id: 17232427939066065628
|
|
|
|
xyzzyx
Sr. Member
Offline
Activity: 490
Merit: 250
I don't really come from outer space.
|
|
February 21, 2014, 09:38:52 AM |
|
Why is blockchain only show 4 confirmation on an transaction made yesterday?
what if exchange only use blockchain info?
please explain
Got a link? transaction id: 17232427939066065628 An exchange shouldn't rely on a 3rd-party for confirmations. The third-party can lie. http://localhost:7874/nxt?requestType=getTransaction&transaction=17232427939066065628
|
"An awful lot of code is being written ... in languages that aren't very good by people who don't know what they're doing." -- Barbara Liskov
|
|
|
|
Eadeqa
|
|
February 21, 2014, 09:43:26 AM |
|
Yeah, he should contact them and get it resolved. The money isn't lost. It's in 2984466092683267437
|
|
|
|
Eadeqa
|
|
February 21, 2014, 09:45:06 AM |
|
Yeah, he should contact them and get it resolved. The money isn't lost. It's in 2984466092683267437 I wonder what will happen if he sends 5 Nxt to that account? Maybe he will get all of it credited (the previous one) too
|
|
|
|
pinarello
Full Member
Offline
Activity: 266
Merit: 100
NXT is the future
|
|
February 21, 2014, 09:45:56 AM |
|
Ok I understand, but... what if bter uses info from the "official" blockchain explorer let us say manualy, cant we just fix the issue with that blockchain explorer.
|
|
|
|
xyzzyx
Sr. Member
Offline
Activity: 490
Merit: 250
I don't really come from outer space.
|
|
February 21, 2014, 09:47:24 AM |
|
Why is blockchain only show 4 confirmation on an transaction made yesterday?
what if exchange only use blockchain info?
please explain
Are you having trouble with Bter? If so, have you tried to go to http://bter.com/myaccount/myfunds and hitting the "sync" option for your NXT account?
|
"An awful lot of code is being written ... in languages that aren't very good by people who don't know what they're doing." -- Barbara Liskov
|
|
|
pinarello
Full Member
Offline
Activity: 266
Merit: 100
NXT is the future
|
|
February 21, 2014, 09:49:31 AM |
|
Why is blockchain only show 4 confirmation on an transaction made yesterday?
what if exchange only use blockchain info?
please explain
Are you having trouble with Bter? If so, have you tried to go to http://bter.com/myaccount/myfunds and hitting the "sync" option for your NXT account? yes I did with no result, as I understand bter is working manualy
|
|
|
|
|
xyzzyx
Sr. Member
Offline
Activity: 490
Merit: 250
I don't really come from outer space.
|
|
February 21, 2014, 09:52:08 AM |
|
Ok I understand, but...
what if bter uses info from the "official" blockchain explorer let us say manualy, cant we just fix the issue with that blockchain explorer.
I'm not privy to nexern's code, but I gather that parts of the block explorer database are updated by a cron job that only runs perhaps once per day or so. If that's the case then it will always lag behind real-time unless a different update scheme is devised.
|
"An awful lot of code is being written ... in languages that aren't very good by people who don't know what they're doing." -- Barbara Liskov
|
|
|
|