Bitcoin Forum
October 21, 2019, 09:19:25 PM *
News: Latest Bitcoin Core release: 0.18.1 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 ... 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 [1802] 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 ... 2567 »
  Print  
Author Topic: NXT :: descendant of Bitcoin - Updated Information  (Read 2756221 times)
xyzzyx
Sr. Member
****
Offline Offline

Activity: 490
Merit: 250


I don't really come from outer space.


View Profile
February 21, 2014, 07:44:24 AM
 #36021

Code:

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?

"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
1571692765
Hero Member
*
Offline Offline

Posts: 1571692765

View Profile Personal Message (Offline)

Ignore
1571692765
Reply with quote  #2

1571692765
Report to moderator
1571692765
Hero Member
*
Offline Offline

Posts: 1571692765

View Profile Personal Message (Offline)

Ignore
1571692765
Reply with quote  #2

1571692765
Report to moderator
1571692765
Hero Member
*
Offline Offline

Posts: 1571692765

View Profile Personal Message (Offline)

Ignore
1571692765
Reply with quote  #2

1571692765
Report to moderator
Unlike traditional banking where clients have only a few account numbers, with Bitcoin people can create an unlimited number of accounts (addresses). This can be used to easily track payments, and it improves anonymity.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1571692765
Hero Member
*
Offline Offline

Posts: 1571692765

View Profile Personal Message (Offline)

Ignore
1571692765
Reply with quote  #2

1571692765
Report to moderator
1571692765
Hero Member
*
Offline Offline

Posts: 1571692765

View Profile Personal Message (Offline)

Ignore
1571692765
Reply with quote  #2

1571692765
Report to moderator
1571692765
Hero Member
*
Offline Offline

Posts: 1571692765

View Profile Personal Message (Offline)

Ignore
1571692765
Reply with quote  #2

1571692765
Report to moderator
markus1000
Full Member
***
Offline Offline

Activity: 153
Merit: 100


View Profile
February 21, 2014, 08:01:29 AM
 #36022

I bought a level on the bitscraper project for Nxt.
http://www.bitscraper.pw/p/blog-page.html

We are on Level 25. If you want to donate my Nxt address is in my signature.
coloredcoin
Full Member
***
Offline Offline

Activity: 198
Merit: 101


View Profile
February 21, 2014, 08:04:30 AM
 #36023

There will implement a coloredcoin on the top of Nxt.
apenzl
Sr. Member
****
Offline Offline

Activity: 396
Merit: 250


View Profile WWW
February 21, 2014, 08:16:58 AM
 #36024


Total: Fee earned 784334 NXT   :     82000 NXT more than in 11th Feb 
                                                      (is that increase possible? - otherwise some data error).


Cumulative % of
fee earned, starting from TOP1
        20.8
        34.3
        44.6
        53.4
        57.8
        61.9



TOP's share is smaller than earlier.
In mining/forging the distribution is now:
4 accounts have mined 53.4% (less than before),
28 accounts have mined 88% (less),
and 98 accounts 97.9% (less) and
590 (more) accounts has forged 100%   i.e. 590 accounts has got some fees.


Something has made the distribution "better" ...   Smiley




don't forget small accounts possibly don't bother to forge.

And my forging competition is promoting small accounts to forge! We have 3 successful forges with roughly 10k nxt  Grin

We got 4, but I didn't enter because someone else forged with 3 Nxt less than me. I earned myself a whole 2 Nxt forging that block though!  Grin

CIYAM
Legendary
*
Offline Offline

Activity: 1890
Merit: 1003


Ian Knowles - CIYAM Lead Developer


View Profile WWW
February 21, 2014, 08:25:55 AM
Last edit: February 21, 2014, 08:57:55 AM by CIYAM Open
 #36025

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

With CIYAM anyone can create 100% generated C++ web applications in literally minutes.

GPG Public Key | 1ciyam3htJit1feGa26p2wQ4aw6KFTejU
soho01592
Newbie
*
Offline Offline

Activity: 10
Merit: 0


View Profile
February 21, 2014, 08:52:56 AM
 #36026

 Smiley
pinarello
Full Member
***
Offline Offline

Activity: 266
Merit: 100


NXT is the future


View Profile
February 21, 2014, 08:54:34 AM
 #36027



My NXT is dancing the Limbo again between my account and bter Grin




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 Offline

Activity: 1176
Merit: 1090


View Profile WWW
February 21, 2014, 09:08:48 AM
 #36028

Code:

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.

http://www.digitalcatallaxy.com/report2015.html
100+ page annual report for SuperNET
CIYAM
Legendary
*
Offline Offline

Activity: 1890
Merit: 1003


Ian Knowles - CIYAM Lead Developer


View Profile WWW
February 21, 2014, 09:13:46 AM
 #36029

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.

With CIYAM anyone can create 100% generated C++ web applications in literally minutes.

GPG Public Key | 1ciyam3htJit1feGa26p2wQ4aw6KFTejU
jl777
Legendary
*
Offline Offline

Activity: 1176
Merit: 1090


View Profile WWW
February 21, 2014, 09:19:28 AM
 #36030

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

http://www.digitalcatallaxy.com/report2015.html
100+ page annual report for SuperNET
jl777
Legendary
*
Offline Offline

Activity: 1176
Merit: 1090


View Profile WWW
February 21, 2014, 09:23:13 AM
 #36031

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?

http://www.digitalcatallaxy.com/report2015.html
100+ page annual report for SuperNET
CIYAM
Legendary
*
Offline Offline

Activity: 1890
Merit: 1003


Ian Knowles - CIYAM Lead Developer


View Profile WWW
February 21, 2014, 09:27:58 AM
 #36032

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

With CIYAM anyone can create 100% generated C++ web applications in literally minutes.

GPG Public Key | 1ciyam3htJit1feGa26p2wQ4aw6KFTejU
pinarello
Full Member
***
Offline Offline

Activity: 266
Merit: 100


NXT is the future


View Profile
February 21, 2014, 09:29:00 AM
 #36033

Why is blockchain only show 4 confirmation on an transaction made yesterday?

what if exchange only use blockchain info?

please explain

Eadeqa
Hero Member
*****
Offline Offline

Activity: 644
Merit: 500


View Profile
February 21, 2014, 09:32:43 AM
 #36034



My NXT is dancing the Limbo again between my account and bter Grin




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

NXT-GZYP-FMRT-FQ9K-3YQGS
https://nxtforum.org
Eadeqa
Hero Member
*****
Offline Offline

Activity: 644
Merit: 500


View Profile
February 21, 2014, 09:33:13 AM
 #36035

Why is blockchain only show 4 confirmation on an transaction made yesterday?

what if exchange only use blockchain info?

please explain

Got a link?

NXT-GZYP-FMRT-FQ9K-3YQGS
https://nxtforum.org
pinarello
Full Member
***
Offline Offline

Activity: 266
Merit: 100


NXT is the future


View Profile
February 21, 2014, 09:35:09 AM
 #36036

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 Offline

Activity: 490
Merit: 250


I don't really come from outer space.


View Profile
February 21, 2014, 09:38:52 AM
 #36037

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
cc001
Full Member
***
Offline Offline

Activity: 164
Merit: 100



View Profile
February 21, 2014, 09:40:29 AM
 #36038

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

I think the blockchain explorer doesn't show the correct number of confirmations. see here, looks more accurate:
http://www.mynxt.info/blockexplorer/details.php?action=tx&tx=17232427939066065628

▀▀▀▀▀▀     BRIDGEX NETWORK  │ LEND · BORROW · CONVERT · SEND    ▀▀▀▀▀▀
▄▄▄▄         Whitepaper       Telegram       Twitter       Medium       Facebook       LinkedIn          ▄▄▄▄
Eadeqa
Hero Member
*****
Offline Offline

Activity: 644
Merit: 500


View Profile
February 21, 2014, 09:43:26 AM
 #36039

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

I think the blockchain explorer doesn't show the correct number of confirmations. see here, looks more accurate:
http://www.mynxt.info/blockexplorer/details.php?action=tx&tx=17232427939066065628

Yeah, he should contact them and get it resolved.  The money isn't lost. It's in 2984466092683267437


NXT-GZYP-FMRT-FQ9K-3YQGS
https://nxtforum.org
Eadeqa
Hero Member
*****
Offline Offline

Activity: 644
Merit: 500


View Profile
February 21, 2014, 09:45:06 AM
 #36040

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

I think the blockchain explorer doesn't show the correct number of confirmations. see here, looks more accurate:
http://www.mynxt.info/blockexplorer/details.php?action=tx&tx=17232427939066065628

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

NXT-GZYP-FMRT-FQ9K-3YQGS
https://nxtforum.org
Pages: « 1 ... 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 [1802] 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 ... 2567 »
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!