Author

Topic: NXT :: descendant of Bitcoin - Updated Information - page 364. (Read 2761645 times)

sr. member
Activity: 294
Merit: 260
Unfortunatelly, most of guys know that "unit tests should be used", but they don't use sanity checks of this statement. In our project (when we don't have spare Java coders) unit tests would hurt the development. So, guys, stop talking about unit tests made in a perfect world, come back to the reality. /endOfDiscussion.

I'm not saying you should unit test, it's your baby after all. I'm saying that unit tests aren't useless per se.
sr. member
Activity: 392
Merit: 250
WIll there be a similar update for the 0.7.x train?  Or it is obsoleted?  The reason I ask is that all of a sudden, with 0.8.x train I get isolated on my own fork very frequently, causing restart of java with old blockchain.  I went to 0.7.7 and problem went away.
No more 0.7 releases. I don't have the time to maintain two branches, and asset exchange features and bugfixes are not in 0.7.

I haven't had such problems with forks on 0.8, I saw a few rescans today but now it has recovered without need for restart.
full member
Activity: 350
Merit: 100

Yup, shouldn't have updated Wink My client is not yet included it seems.

Ack! Cheesy

Do you have the url handy for the wallet.zip? I don't think it's listed on extra.org yet...
sr. member
Activity: 308
Merit: 250
Wesley, updated the mac wallet to 0.8.9 and no longer greeted with the login but with this:



(resized the window to keep the screenshot small)

After the update, it defaults back to test net, so I switched to main, restarted... same thing.

Yup, shouldn't have updated Wink My client is not yet included it seems.
sr. member
Activity: 308
Merit: 250
Would probably need an api for that, availableBalance / effectiveBalance in getAccount assets list. CFB - any comments?
You need to use Account.getUnconfirmedAssetBalance(). Of course I just noticed it is not returned in the http API, sorry. I will add it.

The whole http API needs some critical review and improvement.

critical review and improvement: can you comment on what that means?
full member
Activity: 350
Merit: 100
Wesley, updated the mac wallet to 0.8.9 and no longer greeted with the login but with this:



(resized the window to keep the screenshot small)

After the update, it defaults back to test net, so I switched to main, restarted... same thing.
sr. member
Activity: 392
Merit: 250
Would probably need an api for that, availableBalance / effectiveBalance in getAccount assets list. CFB - any comments?
You need to use Account.getUnconfirmedAssetBalance(). Of course I just noticed it is not returned in the http API, sorry. I will add it.

The whole http API needs some critical review and improvement.
legendary
Activity: 2142
Merit: 1010
Newbie
Don't get me wrong, it's one thing talking about unit tests and another thing actually writing them. I'm also not particularly fond of them, but I acknowledge their usefulness.

Unfortunatelly, most of guys know that "unit tests should be used", but they don't use sanity checks of this statement. In our project (when we don't have spare Java coders) unit tests would hurt the development. So, guys, stop talking about unit tests made in a perfect world, come back to the reality. /endOfDiscussion.
sr. member
Activity: 294
Merit: 260
Yes, you still need to implement curve, but don't need to construct whatever you need to send yourself and you can still rely on the error messages sent back from the server. I don't believe there is any other way?

That's right. Previously, you needed to construct the raw transaction bytes and sign them. As of 0.8.9 you request the raw bytes from NRS, sign them and send them back.
sr. member
Activity: 294
Merit: 260
Come on, unit tests are useful precisely when testing new features. Whether you like them or not is irrelevant.

One does not simply unit test a system with eventual consistency.

The same test ran 2 times will return different results if tested in real conditions. Testing in artificial conditions is quite useless coz require to conduct other types of tests.

I agree, but that's another story, irrelevant to whether a feature is new or not. And there are various levels where unit testing can be applied, not just the "outer network" level.

Don't get me wrong, it's one thing talking about unit tests and another thing actually writing them. I'm also not particularly fond of them, but I acknowledge their usefulness.
sr. member
Activity: 308
Merit: 250
Does anybody have a "hello world" example of using the Java API?

Gonna become a heavyweight client again?

Nah... Just brainstorming for the InfCom regarding NXT network monitoring.

And you? Gonna implement Curve finally? ;-)

With the new api it should be much easier, will start on it now Wink

Seriously, I assumed that the signing API calls would be a way around having to implement the Curve algo, but from what I understand you still need to, so I'm no longer sure what these calls are for. Just that you don't have to implement the "not enough funds" check?

Yes, you still need to implement curve, but don't need to construct whatever you need to send yourself and you can still rely on the error messages sent back from the server. I don't believe there is any other way?
legendary
Activity: 868
Merit: 1000
Cryptotalk.org - Get paid for every post!
Is anything on NXT unit tested? EVER?

Dunno. Unit tests r not a panacea, more likely a modern trend between people who used to code for outsourcing. Good thing for u is that Jean-Luc decides how to test, not me.

no comment needed.
legendary
Activity: 1470
Merit: 1004
NXT AT PROJECT HELP.  NEED JAVA PROGRAMMER.

This is a request by CIYAM for help with AT.  Need to get on this asap

Quote:
The first thing we are going to need is a Java programmer to convert my C++ prototype (and yes I want the Java code to use the console so we can easily run test cases).

Unfortunately CfB isn't interested in doing this in a way that would allow for proper testing so I'd rather he wasn't actually involved in AT other than providing assistance with the Nxt AT API side of things (i.e. how Nxt AT can send and receive transactions as well as get other information and some general functions like say testing a hash value).
legendary
Activity: 2142
Merit: 1010
Newbie
Thanks, but neither worked.

I have some simple questions...

1) Calculating the HIT with SHA256(generationSignature, publicKey)...
*) generationSignature of the block - Okey
a) publicKey the "generator" of the block or my account? - Ur account.
b) hash("sha256", hex2bin($generationSignature) . $accountPublicKey); or hash("sha256", hex2bin($generationSignature) . hex2bin($accountPublicKey)); - Binary.

2) $deadline = $hit / ($baseTarget * $totalEffectiveBalance); or $deadline = $hit / ($baseTarget * $effectiveBalance);
a) $totalEffectiveBalance of getState()
b) $effectiveBalance my account (getBalance()). - This.

Thanks!
Okay!!! Thanks!

My problem is to get the HIT!  Undecided

Finally... which is correct?  Embarrassed
a) $hit = hash("sha256", hex2bin($generationSignature) . $accountPublicKey); (¿Only signature binary?)
b) $hit = hash("sha256", hex2bin($generationSignature) . hex2bin($accountPublicKey)); (¿All binary?)

PHP hash() function is "valid" for the made the SHA256?

and then this is correct?
Code:
$hit = substr($hit, 0, 8);
$hit = hexdec($hit);

Example output:
Quote
generationSignature = ef6e7257b95ea530384db7a24bf2c0415a091f1e99a0b9b4c712c13af3d71c68
publickey = 25ae5107a806e561488394ed5b59916d61c2f0110182e67a1aae19cd6bd86d0e
*)hash f41bff20e6e49f5a6ac431f59841ff54d152c1670b99609807ad172a6636b1fb    (All binary)
*)substr f41bff20
hit = 4095475488

Thank you very much Smiley

Change endianness.
full member
Activity: 224
Merit: 100
Does anybody have a "hello world" example of using the Java API?

Gonna become a heavyweight client again?

Nah... Just brainstorming for the InfCom regarding NXT network monitoring.

And you? Gonna implement Curve finally? ;-)

With the new api it should be much easier, will start on it now Wink

Seriously, I assumed that the signing API calls would be a way around having to implement the Curve algo, but from what I understand you still need to, so I'm no longer sure what these calls are for. Just that you don't have to implement the "not enough funds" check?
hero member
Activity: 566
Merit: 500
Hey graviton, looking good on those bounties, well done!
Thanks I like it that you like it.

Anyway, about point 2, then why did you not allow redirection to forums.nxtcrypto.org back in the day? Just wondering.
Several reasons, the most important being that I'm wiser now and consider nxt.org worth it.
legendary
Activity: 1498
Merit: 1000
Then why don't you write your code in assembly? Or binary?...

I do, coz it works without an operating system, on bare metal.
You do because you are bored to learn & code OOP
sr. member
Activity: 308
Merit: 250
Does anybody have a "hello world" example of using the Java API?

Gonna become a heavyweight client again?

Nah... Just brainstorming for the InfCom regarding NXT network monitoring.

And you? Gonna implement Curve finally? ;-)

With the new api it should be much easier, will start on it now Wink
full member
Activity: 224
Merit: 100
Does anybody have a "hello world" example of using the Java API?

Gonna become a heavyweight client again?

Nah... Just brainstorming for the InfCom regarding NXT network monitoring.

And you? Gonna implement Curve finally? ;-)
legendary
Activity: 2142
Merit: 1010
Newbie
Then why don't you write your code in assembly? Or binary?...

I do, coz it works without an operating system, on bare metal.
Jump to: