Bitcoin Forum
April 28, 2024, 01:31:25 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 ... 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 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 ... 2557 »
  Print  
Author Topic: NXT :: descendant of Bitcoin - Updated Information  (Read 2761529 times)
Jean-Luc
Sr. Member
****
Offline Offline

Activity: 392
Merit: 250



View Profile WWW
February 18, 2014, 04:43:16 PM
 #35041

Question about the java API.
Are there any plans to extract the functionality of the handlers in in nxt.http into java interfaces.
My use case is to create a payment transaction but i dont want to go through the HTTP layer. Currently to send money from the java api you would have to duplicate all the steps taken in for instance nxt.http.SendMoney.
The Java API is still a work in progress, in fact I am just in the middle of another refactoring for 0.8.0. I am switching to embedded jetty, so Nxt will no longer be a servlet. I will also improve the API while at it.

For the SendMoney example, what kind of an API would you find useful? Right now the steps you would need to duplicate are not that many, basically you need to do:

Code:
        Transaction transaction = Transaction.newTransaction(Convert.getEpochTime(), deadline, publicKey,
                recipient, amount, fee, referencedTransaction);
        transaction.sign(secretPhrase);

        Blockchain.broadcast(transaction);
The rest is validating the user input and returning error messages, which is application specific. If you submit an invalid transaction, it will not be accepted, and a lot of validation is done immediately when the Transaction object is constructed (such as for non-negative amount and fee, deadline, timestamp). Other validations, such as the account having enough funds are only done when the Transaction is about to be included in a block (because the account balance may have changed in the meantime).


lead Nxt developer, gpg key id: 0x811D6940E1E4240C
Nxt blockchain platform | Ardor blockchain platform | Ignis ICO
1714311085
Hero Member
*
Offline Offline

Posts: 1714311085

View Profile Personal Message (Offline)

Ignore
1714311085
Reply with quote  #2

1714311085
Report to moderator
1714311085
Hero Member
*
Offline Offline

Posts: 1714311085

View Profile Personal Message (Offline)

Ignore
1714311085
Reply with quote  #2

1714311085
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714311085
Hero Member
*
Offline Offline

Posts: 1714311085

View Profile Personal Message (Offline)

Ignore
1714311085
Reply with quote  #2

1714311085
Report to moderator
1714311085
Hero Member
*
Offline Offline

Posts: 1714311085

View Profile Personal Message (Offline)

Ignore
1714311085
Reply with quote  #2

1714311085
Report to moderator
Damelon
Legendary
*
Offline Offline

Activity: 1092
Merit: 1010



View Profile
February 18, 2014, 04:43:24 PM
 #35042


Does it for me Smiley
Doing an article on Offspring today Smiley

Member of the Nxt Foundation | Donations: NXT-D6K7-MLY6-98FM-FLL5T
Join Nxt Slack! https://nxtchat.herokuapp.com/
Founder of Blockchain Workspace | Personal Site & Blog
Jean-Luc
Sr. Member
****
Offline Offline

Activity: 392
Merit: 250



View Profile WWW
February 18, 2014, 04:47:57 PM
 #35043

Cool to see another web client, however it seems to be using api calls that will be removed soon (getInitialData / processNewData)
I will not remove those if other clients are relying on them. But those are not API calls, those are user interface calls. In 0.8.0 you would be able to selectively enable/disable the http API and the UI, so don't bundle them together. And they will be on different ports.

lead Nxt developer, gpg key id: 0x811D6940E1E4240C
Nxt blockchain platform | Ardor blockchain platform | Ignis ICO
Anon136
Legendary
*
Offline Offline

Activity: 1722
Merit: 1217



View Profile
February 18, 2014, 04:50:27 PM
 #35044

NOTE: Voting System ... works only on testnet for now.

whats the voting algo like? 1 nxt 1 vote + tx fee?

Rep Thread: https://bitcointalk.org/index.php?topic=381041
If one can not confer upon another a right which he does not himself first possess, by what means does the state derive the right to engage in behaviors from which the public is prohibited?
wesleyh
Sr. Member
****
Offline Offline

Activity: 308
Merit: 250


View Profile
February 18, 2014, 04:52:35 PM
 #35045

Cool to see another web client, however it seems to be using api calls that will be removed soon (getInitialData / processNewData)
I will not remove those if other clients are relying on them. But those are not API calls, those are user interface calls. In 0.8.0 you would be able to selectively enable/disable the http API and the UI, so don't bundle them together. And they will be on different ports.


Hmm, I had this in my client first, but cfb told me it would be removed because it takes too much resources. Which is why I switched to the official API.
CommanderVenus
Sr. Member
****
Offline Offline

Activity: 258
Merit: 250


Zoinks! Its the Miner Miner Forty-Niner!


View Profile
February 18, 2014, 05:22:55 PM
 #35046

Are we stuck on block 69524 or is my server just not working correctly?

BTC: 1VenusEubcLC9W7ykckHbdEzo5MVhPmCb
NXT: 15182624396855992605
BTQ: 14b2QFPwFtBC3tcRW9F61aaRXP2ns3fh1m
Anon136
Legendary
*
Offline Offline

Activity: 1722
Merit: 1217



View Profile
February 18, 2014, 05:26:12 PM
 #35047

Are we stuck on block 69524 or is my server just not working correctly?

im on 69526

Rep Thread: https://bitcointalk.org/index.php?topic=381041
If one can not confer upon another a right which he does not himself first possess, by what means does the state derive the right to engage in behaviors from which the public is prohibited?
CommanderVenus
Sr. Member
****
Offline Offline

Activity: 258
Merit: 250


Zoinks! Its the Miner Miner Forty-Niner!


View Profile
February 18, 2014, 05:27:38 PM
 #35048

Are we stuck on block 69524 or is my server just not working correctly?

im on 69526
There we go, the block just took 18 minutes.
Oops.

BTC: 1VenusEubcLC9W7ykckHbdEzo5MVhPmCb
NXT: 15182624396855992605
BTQ: 14b2QFPwFtBC3tcRW9F61aaRXP2ns3fh1m
ChuckOne
Sr. Member
****
Offline Offline

Activity: 364
Merit: 250

☕ NXT-4BTE-8Y4K-CDS2-6TB82


View Profile
February 18, 2014, 05:36:28 PM
 #35049

NOTE: Voting System ... works only on testnet for now.

whats the voting algo like? 1 nxt 1 vote + tx fee?

It is fully depend on the one interpreting the results.

It the most beautiful solution they could have come up with.
ChuckOne
Sr. Member
****
Offline Offline

Activity: 364
Merit: 250

☕ NXT-4BTE-8Y4K-CDS2-6TB82


View Profile
February 18, 2014, 05:39:07 PM
 #35050

Anon136's video described it as the chain that had the most stake involved in forging the blocks was the 'correct' one, even though there may be a longer chain.   Huh

It's slang. "Longer chain" == "chain with the most stake involved".

@Anon136
If so, could we stick to the 'longer chain' theme? It's just because it makes more sense to most people (even those that are familiar with graph theory).
martismartis
Legendary
*
Offline Offline

Activity: 1162
Merit: 1005


View Profile
February 18, 2014, 05:39:18 PM
 #35051

Crimi666

While I'm not registered in nextcoing.org and read you had problems with www.peerexplorer.com and looking for person, who took 4100 NXT, maybe this will help you :

http://nextcoins.ru/share/

Look for "Aлeкcaндp Кopoлeв   13117504042955556224   3 NXT   28 янвapя в 12:05"

Maybe some russians could help you.

Good luck
wesh
Newbie
*
Offline Offline

Activity: 34
Merit: 0


View Profile
February 18, 2014, 05:40:03 PM
 #35052

Hello, I have been running my VPS for more than 3 weeks now without earning any nxt !.  Undecided
I do have some nxt in my account and have aroud 600 unconfirmed transaction!!

what do I have to do ?

thank for your help in advance
Anon136
Legendary
*
Offline Offline

Activity: 1722
Merit: 1217



View Profile
February 18, 2014, 05:40:48 PM
 #35053

NOTE: Voting System ... works only on testnet for now.

whats the voting algo like? 1 nxt 1 vote + tx fee?

It is fully depend on the one interpreting the results.

It the most beautiful solution they could have come up with.

sounds good to me!

Rep Thread: https://bitcointalk.org/index.php?topic=381041
If one can not confer upon another a right which he does not himself first possess, by what means does the state derive the right to engage in behaviors from which the public is prohibited?
Anon136
Legendary
*
Offline Offline

Activity: 1722
Merit: 1217



View Profile
February 18, 2014, 05:42:02 PM
 #35054

Anon136's video described it as the chain that had the most stake involved in forging the blocks was the 'correct' one, even though there may be a longer chain.   Huh

It's slang. "Longer chain" == "chain with the most stake involved".

@Anon136
If so, could we stick to the 'longer chain' theme? It's just because it makes more sense to most people (even those that are familiar with graph theory).

i mean it works as slang but it is technically incorrect since its trivially easy to make a chain as long as you want. you could make a 1 million block long chain on my desktop computer in minutes if you wanted.

Rep Thread: https://bitcointalk.org/index.php?topic=381041
If one can not confer upon another a right which he does not himself first possess, by what means does the state derive the right to engage in behaviors from which the public is prohibited?
ChuckOne
Sr. Member
****
Offline Offline

Activity: 364
Merit: 250

☕ NXT-4BTE-8Y4K-CDS2-6TB82


View Profile
February 18, 2014, 05:42:05 PM
 #35055

Technical question:

When a node gets somebody's private key, it starts forging. That's for sure.

What happens if somebody else sends his private key to that very node? Will it start forging for that account, too? Will is stop forging for the first account? And last but not least, how many accounts can a node forge for?
ChuckOne
Sr. Member
****
Offline Offline

Activity: 364
Merit: 250

☕ NXT-4BTE-8Y4K-CDS2-6TB82


View Profile
February 18, 2014, 05:43:33 PM
 #35056

Anon136's video described it as the chain that had the most stake involved in forging the blocks was the 'correct' one, even though there may be a longer chain.   Huh

It's slang. "Longer chain" == "chain with the most stake involved".

@Anon136
If so, could we stick to the 'longer chain' theme? It's just because it makes more sense to most people (even those that are familiar with graph theory).

i mean it works as slang but it is technically incorrect since its trivially easy to make a chain as long as you want. you could make a 1 million block long chain on my desktop computer in minutes if i wanted.

Err, so, what? Cheesy Sorry, but it's a bit confusing if you don't know what's right and what's wrong.

In plain english: what's the right way of finding consensus in NXT?
Anon136
Legendary
*
Offline Offline

Activity: 1722
Merit: 1217



View Profile
February 18, 2014, 05:47:34 PM
 #35057

Anon136's video described it as the chain that had the most stake involved in forging the blocks was the 'correct' one, even though there may be a longer chain.   Huh

It's slang. "Longer chain" == "chain with the most stake involved".

@Anon136
If so, could we stick to the 'longer chain' theme? It's just because it makes more sense to most people (even those that are familiar with graph theory).

i mean it works as slang but it is technically incorrect since its trivially easy to make a chain as long as you want. you could make a 1 million block long chain on my desktop computer in minutes if i wanted.

Err, so, what? Cheesy Sorry, but it's a bit confusing if you don't know what's right and what's wrong.

In plain english: what's the right way of finding consensus in NXT?

sorry idk how to explain it any better than i did in the video Undecided

Rep Thread: https://bitcointalk.org/index.php?topic=381041
If one can not confer upon another a right which he does not himself first possess, by what means does the state derive the right to engage in behaviors from which the public is prohibited?
Anon136
Legendary
*
Offline Offline

Activity: 1722
Merit: 1217



View Profile
February 18, 2014, 05:48:54 PM
 #35058

Anon136's video described it as the chain that had the most stake involved in forging the blocks was the 'correct' one, even though there may be a longer chain.   Huh

It's slang. "Longer chain" == "chain with the most stake involved".

@Anon136
If so, could we stick to the 'longer chain' theme? It's just because it makes more sense to most people (even those that are familiar with graph theory).

i mean it works as slang but it is technically incorrect since its trivially easy to make a chain as long as you want. you could make a 1 million block long chain on my desktop computer in minutes if i wanted.
In plain english: what's the right way of finding consensus in NXT?

by looking for the chain that demonstrates the greatest stake participation without claiming to be from the future.

Rep Thread: https://bitcointalk.org/index.php?topic=381041
If one can not confer upon another a right which he does not himself first possess, by what means does the state derive the right to engage in behaviors from which the public is prohibited?
MarvellousMutant
Newbie
*
Offline Offline

Activity: 39
Merit: 0


View Profile
February 18, 2014, 05:49:11 PM
 #35059

Just seen, that Nxt is finally on Bitcoinwisdom.com.

Thanks to all that helped make it happen Smiley
verymuchso
Sr. Member
****
Offline Offline

Activity: 421
Merit: 250


HEAT Ledger


View Profile
February 18, 2014, 05:51:39 PM
 #35060

Question about the java API.
Are there any plans to extract the functionality of the handlers in in nxt.http into java interfaces.
My use case is to create a payment transaction but i dont want to go through the HTTP layer. Currently to send money from the java api you would have to duplicate all the steps taken in for instance nxt.http.SendMoney.
The Java API is still a work in progress, in fact I am just in the middle of another refactoring for 0.8.0. I am switching to embedded jetty, so Nxt will no longer be a servlet. I will also improve the API while at it.

For the SendMoney example, what kind of an API would you find useful? Right now the steps you would need to duplicate are not that many, basically you need to do:

Code:
        Transaction transaction = Transaction.newTransaction(Convert.getEpochTime(), deadline, publicKey,
                recipient, amount, fee, referencedTransaction);
        transaction.sign(secretPhrase);

        Blockchain.broadcast(transaction);
The rest is validating the user input and returning error messages, which is application specific. If you submit an invalid transaction, it will not be accepted, and a lot of validation is done immediately when the Transaction object is constructed (such as for non-negative amount and fee, deadline, timestamp). Other validations, such as the account having enough funds are only done when the Transaction is about to be included in a block (because the account balance may have changed in the meantime).



Hi! You are right the steps to send money are very limited indeed, i already went ahead and did things that way. Looking at it now i no longer think there should be a higher level api apart from what is provided.

While i have your attention might i point you to the following..
Currently there is no way for java clients to get notified of progress during startup (nxt.Nxt.init())

Ideally there would be a listener you could register or some sort of progress monitor. In eclipse you have the IProgressMonitor interface, such an interface would be perfect, i included a simplified example.

public interface IProgressMonitor {
  public void beginTask(String name, int totalWork);
  public void done();
  public void worked(int work);
}

The monitor would be provided by the user and is passed to the various startup methods. When reading the blockchain (for instance) you would call monitor.beginTask("Read blockchain", totalNumberOfBlocks) and then on each (or each 5th, 10th etc.) block read you call monitor.worked(numberOfBlocksRead). At the end you would call monitor.done().

>  I am switching to embedded jetty

That's how we have done it from the start. But what is wrong with the servlet, should you not stay far from jetty and focus solely on nxt core?

Nice to meet you btw.. You did a nice job on the refactorings.

Pages: « 1 ... 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 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 ... 2557 »
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!