Bitcoin Forum
September 05, 2024, 01:28:36 AM *
News: Latest Bitcoin Core release: 27.1 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 [17] 18 19 20 21 22 23 »
321  Alternate cryptocurrencies / Announcements (Altcoins) / Re: Nxt :: descendant of Bitcoin - Updated Information on: January 05, 2014, 04:02:49 PM
Guys any link to 0.5? First page link doesnt work.
We didn't organize it well for this release, but from now on new releases should always appear on http://info.nxtcrypto.org in addition to my announcement here. And you should be able to use the built-in update checker, http://localhost:7874/update.html to check for new versions, and download and verify the zip package.
322  Alternate cryptocurrencies / Announcements (Altcoins) / Re: Nxt :: descendant of Bitcoin - Updated Information on: January 05, 2014, 03:56:52 PM
Bad luck, two times had a chance and both time didn't succeed. This is not bad luck, this is a my habitude Smiley
But question remains: if I don't need to restart java console, do I need only reload client side in browser? Because after this accident, recent blocks became with minus sign ant still minus quantity increases, looks like client lost the chain.
If the recent blocks became negative, it is a bug then. We haven't seen this bug recently and I thought it's gone, but apparently not. Next time this happens please report any errors from the console.
If reloading the page and restarting the browser isn't enough, then you also have to restart the java process indeed.
323  Alternate cryptocurrencies / Announcements (Altcoins) / Re: Nxt :: descendant of Bitcoin - Updated Information on: January 05, 2014, 03:03:35 PM
Why java process periodically asks to connect to hosted-by.leaseweb.com, TCP 32151?

Is this some sort of node statistics or what? Should I allow it?
This is just a node listening on a non-default port, not to worry. But you don't need to allow it if you don't want to.
324  Alternate cryptocurrencies / Announcements (Altcoins) / Re: Nxt :: descendant of Bitcoin - Updated Information on: January 05, 2014, 02:59:18 PM
Had a problem: I had two chances of forging the block, but both time it was not forged, recent blocks became with "-" sign and get the error in java console. Had to lock account and restart the process.
What error did you get? If other than the normal "Generated an incorrect block..." error, please post the full error message here.
Error was like "Generated an incorrcst block...". Just to know about my luck or there is something I need to fix.
Then it's just bad luck, but that doesn't require a restart.
325  Alternate cryptocurrencies / Announcements (Altcoins) / Re: Nxt :: descendant of Bitcoin - Updated Information on: January 05, 2014, 02:37:08 PM
Had a problem: I had two chances of forging the block, but both time it was not forged, recent blocks became with "-" sign and get the error in java console. Had to lock account and restart the process.
What error did you get? If other than the normal "Generated an incorrect block..." error, please post the full error message here.

326  Alternate cryptocurrencies / Announcements (Altcoins) / Re: Nxt :: descendant of Bitcoin - Updated Information on: January 05, 2014, 11:39:47 AM
I put 48K from our bounty pool for code review, will pay it according to CfB instruction.

Jean-Luc should instruct, he is the boss.

From the source code QA thread, the most important contributors so far are ImmortAlex, Jaguar0652, and ricot, I already suggested them in the bug reports category of the other bounty.

ImmortAlex
https://bitcointalk.org/index.php?action=profile;u=131473
https://bitcointalk.org/index.php?topic=397214.msg4287958#msg4287958

Jaguar0652
https://bitcointalk.org/index.php?action=profile;u=183319
https://bitcointalk.org/index.php?topic=397183.msg4298078#msg4298078
https://bitcointalk.org/index.php?topic=397214.msg4296420#msg4296420

ricot
https://bitcointalk.org/index.php?action=profile;u=205282
https://bitcointalk.org/index.php?topic=397183.msg4307959#msg4307959
https://bitcointalk.org/index.php?topic=397183.msg4296595#msg4296595

Minusbalancer is reporting two more critical bugs (yet undisclosed):
https://nextcoin.org/index.php/topic,2045.msg20178.html#msg20178
and if confirmed we should also find a way to give him a bounty.

Let's wait a few days because people keep contributing to the source code discussion threads (https://bitcointalk.org/index.php?topic=397183.0 , https://bitcointalk.org/index.php?topic=397214.0 ), and see if anyone else should be awarded a bounty too.
327  Alternate cryptocurrencies / Announcements (Altcoins) / Re: Nxt :: descendant of Bitcoin - Updated Information on: January 05, 2014, 12:30:59 AM
NEWS

The last chance to claim unclaimed coins is over.

We have ~13M coins left and they'll be spent for rewards, bounties and development. Now we are running a reward program. I ask the community to post here links (with short description and link to BTT profile) to projects/persons that helped to promote Nxt. Only projects launched before the 3rd of Jan can apply. There will be several categories, BCNext will choose 3 best participants from each category. I'll contact project owners via BTT personal message to get Nxt account ids for reward payments. The 1st place will receive 50'000, 2nd - 30'000 and 3rd - 20'000 NXT.

Categories:
- Exchanges
- Faucets
- Giveaways
- Utilities (blockchain explorer or http://nxtra.org/nodes/, for example)
- Videos
- Articles
- Bug reports
- Tech support
- Public nodes deployment
- Clients

Please, mark project/person names with bold blue font.

We r supposed to complete the list within 24 hours starting from now.

My nominations:

Public node deployment:
Ferment
https://bitcointalk.org/index.php?action=profile;u=181968
*.nxtbase.com nodes

laowai80
https://bitcointalk.org/index.php?action=profile;u=155505
https://bitcointalk.org/index.php?topic=345619.msg4103726#msg4103726

Utilities:
wesleyh
https://bitcointalk.org/index.php?action=profile;u=173482
http://nxtra.org

nexern
https://bitcointalk.org/index.php?action=profile;u=168386
blockchain explorer http://87.230.14.1/nxt/nxt.cgi?action=1

Clients:
wesleyh
https://bitcointalk.org/index.php?action=profile;u=173482
mac client at nxtra.org

nexern
https://bitcointalk.org/index.php?action=profile;u=168386
native client work in progress

mistafreeze
https://bitcointalk.org/index.php?action=profile;u=23095
windows installer https://nextcoin.org/index.php/topic,1902.0.html

Articles:
utopianfuture
https://bitcointalk.org/index.php?action=profile;u=182582
https://www.dropbox.com/s/xlzequz7qrggq80/First%20document%20of%20Nxt%20asset%20exchange.pdf

Alias
https://nextcoin.org/index.php?action=profile;u=64
https://nextcoin.org/index.php/topic,1890.msg18446.html#msg18446

Bug reports and code reviews:
minusbalancer
https://nextcoin.org/index.php?action=profile;u=3975
https://nextcoin.org/index.php/topic,1228.msg10291.html#msg10291
https://nextcoin.org/index.php/topic,2045.msg20178.html#msg20178

ImmortAlex
https://bitcointalk.org/index.php?action=profile;u=131473
https://bitcointalk.org/index.php?topic=397214.msg4287958#msg4287958
(and more in the same thread)

Jaguar0652
https://bitcointalk.org/index.php?action=profile;u=183319
https://bitcointalk.org/index.php?topic=397183.msg4298078#msg4298078
https://bitcointalk.org/index.php?topic=397214.msg4296420#msg4296420

ricot
https://bitcointalk.org/index.php?action=profile;u=205282
https://bitcointalk.org/index.php?topic=397183.msg4307959#msg4307959
https://bitcointalk.org/index.php?topic=397183.msg4296595#msg4296595

Videos:
Pinarello
https://bitcointalk.org/index.php?action=profile;u=104283
https://www.youtube.com/channel/UC-krT2yl3xjKM8-ZCHkgeRw/videos

Websites, News, Forums:
intel
https://bitcointalk.org/index.php?action=profile;u=102387
info.nxtcrypto.org
Hosting new client packages and announcements
Developer tech support with release uploads and communications

opticalcarrier
https://bitcointalk.org/index.php?action=profile;u=165191
*.nxtcrypto.org sites, The Nxt Foundation
https://bitcointalk.org/index.php?topic=345619.msg4242429#msg4242429

QBTC
https://nextcoin.org/index.php?action=profile;u=498
www.nxtcrypto.org
328  Alternate cryptocurrencies / Announcements (Altcoins) / Re: Nxt :: descendant of Bitcoin - Updated Information on: January 04, 2014, 10:15:56 PM
I am needing new API functions, any developer could pass through my threads?

https://nextcoin.org/index.php/topic,2226.0.html ( getAccountsTransactionIds )
https://nextcoin.org/index.php/topic,2289.0.html ( getAccountForged & getAccountGenerating )
I will investigate if I can add those in the next release.
329  Alternate cryptocurrencies / Altcoin Discussion / Re: Nxt source code analysis (QA) on: January 04, 2014, 06:21:51 PM
One more thought about memory usage.
I see a lot of getBytes().length calls on Transaction and Block. Especially in Transaction.compareTo() this can create a lot of temporaty byte arrays in short time. But length can be easily and much faster calculated without creating array. I think, even for any Attachment.
Not fixed yet, but already I have a //TODO: cache? on top of those getBytes() methods. And indeed need to do it for caching the length.
330  Alternate cryptocurrencies / Altcoin Discussion / Re: Nxt source code analysis (QA) on: January 04, 2014, 06:19:48 PM
Here are a few more thoughts:

(1) This is a minor thing, but i don't think you're checking for overflow in any of the request parameters:
Code:
			int timestamp = ((Long)transactionData.get("timestamp")).intValue();
short deadline = ((Long)transactionData.get("deadline")).shortValue();
byte[] senderPublicKey = convert((String)transactionData.get("senderPublicKey"));
long recipient = (new BigInteger((String)transactionData.get("recipient"))).longValue();
int amount = ((Long)transactionData.get("amount")).intValue();

You're casting the value to a Long and then to an integer, but not checking if truncation occurred. [I would probably move the validation to the Transaction or a transaction factory function. You can also move the validation of positive and valid amounts and fees here].
I have added a few more checks for the values of Transaction.amount and Transaction.fee in 0.5.0. I agree the validation checks are all over the place and need to be cleaned up.
Quote
(2) You're locking around every call to setBalance / setUnconfirmedBalance, which makes it easy to call the functions incorrectly if you forget to call them from within a lock. IMO, it would make sense to move some of that locking into the functions themselves so they can't be called incorrectly. [you can also change these functions to incrementXyz, since that's what you appear to be doing.
This was already on my list of things to fix, and I have fixed in in 0.5.0, but thanks for noticing.

Quote
(3) Instead of a giant doGet function, imo, it would make sense to consider a chain of responsibility where you move each potential action into a separate object
I know, just no time to do that yet.
331  Alternate cryptocurrencies / Announcements (Altcoins) / Re: Nxt :: descendant of Bitcoin - Updated Information on: January 04, 2014, 05:52:55 PM
What if there would be 2 transactions instead of 1? If I want to send 1000 nxt to John, system will send him 1 Nxt first. It will show me - you sent 1 Nxt to John. Do you want to cointinue and send him 999?
Fine, and then the bug will show up at the second transaction and still send the 999 elsewhere. Without knowing where the bug is, attempts to work around it like that will only complicate the code.
332  Alternate cryptocurrencies / Announcements (Altcoins) / Re: Nxt :: descendant of Bitcoin - Updated Information on: January 04, 2014, 05:29:05 PM
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Version 0.5.0 is now available at:

http://info.nxtcrypto.org/nxt-client-0.5.0.zip
http://www.nxtcrypto.org/nxt-client-0.5.0.zip
http://forums.nxtcrypto.org/nxt-client-0.5.0.zip

(it may take some time to get it uploaded to all the above, so try
whichever works)

sha256: c0676985f9ef08852250ba1d3fe980ee1392c3f70be6917f384f3636fa6f06e3

This is to be considered stable release. Change log:

Fixed more concurrency issues, performance optimizations and code cleanup.
I have fixed all the visible code issues that I consider to be bugs, the
remaining TODO's on my list are a matter of code cleanup and refactoring.

Added a checkpoint at block 30000 (the start of transparent forging block).

Added wesleyh's update checker:
https://bitcointalk.org/index.php?topic=345619.msg4294180#msg4294180
Use https://localhost:7875/update.html to check for updates - this feature
may still have bugs, but including it in the package is a good way to get
people to test it on multiple browsers.

I have not been able to find any possible cause yet for the most critical
in my opinion bug reported so far, transactions being sent to a recipient
different than the one selected. I have read through the relevant code
again, but don't see any obvious way how this could happen. I am not
ignoring those reports and believe it may be a real bug and not a user
error, but without a way to reproduce the problem, it is very hard to
track it down.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iQIcBAEBAgAGBQJSyB4TAAoJEFOhyXc7+e2AJ2kP+waLjbK+mhaNHxWUqruv0jrD
74xzaZ4AqZ0jseM95CEqanolrRhWqYJYrxvX5X+JVyG1ERQBj159jp6OuEjdn4G4
NWwTI5uP3QghrIZ1KCh0bG3uUYB3pSrGvjP7n10YH4er2kWtUzT+EZltSlTblUMB
SufMnr/9IbIm6d30hhTh9cUW7jzkQbP0Q1YqdOJsrmEuyWW+ZSGuOcU25naglQ2G
RV/7sIKN0JCebe0Xe3qjwI12E5yq2DccTjgTwP74o1aVOHcdonIgocu963X49kql
/j8uB6ue8rxQ+fhwXpHTwZYC4ysZP1kFP0NKxNh0S0PoPfdlH51aAO2pJhQyOQBB
06BH8NSXKvJx7SUmBP85X9Q1oYXHggTc6RPM3quvLd4B5zkZuztG03i6jIRBVAQ6
lnyq8SJTabfmHK0F1qyyLSZkGwirWZUSrOP04uA3XE6zRT1FSmv/eRx+Mio/0ryE
XOAnIraWEMz7/12hYEdDWtsZWXMstdTrWPOveTODeko4gEppx3b/xgon/EVP4q4O
1pl/pBD0KOXv50XWF9488137RUy6EHRPy6ErF0IPIs3sZQTo+o8X2PJ+yK6dmkEN
owAr7Yu9tJ0AcLhltkXBxxCcTXQj9MohCics0/CJs51wHv+rrvMFPexHqd1Z2E4V
1p/VUMYOjcG0zcCuWUnd
=VNK0
-----END PGP SIGNATURE-----
333  Alternate cryptocurrencies / Altcoin Discussion / Re: Nxt source code analysis (QA) on: January 03, 2014, 03:09:27 PM
Hire this guy. If only for his nick Smiley

yes, do it asap! Smiley
Well, he just mentioned a few posts above that he is too busy to be a full time developer. But if ImmortAlex wants to contribute part time, we seem to think similarly so this may work.

The problem right now is it will be difficult to split the work between multiple developers, as you can see everything is in one huge file which needs a lot of refactoring. Distributing who can do what without stepping on each others work, and then merging the changes, will take almost the same time as one person doing it all.
334  Alternate cryptocurrencies / Altcoin Discussion / Re: Nxt source code analysis (QA) on: January 03, 2014, 02:42:14 PM
Found
Code:
static byte[] convert(String string)
and
Code:
static String convert(byte[] bytes)
ineffictive.
Need I suggest some solutions (like Apache Commons Smiley )?
Those convert methods also bothered me at first look, but I decided to leave it for later if they need optimizing. My girlfriend promised to buy me a license for YourKit (hey, they have a sale now, personal license is only $99 instead of $500) and I will spend some time profiling. It is only worth optimizing things that really are measured to be a problem.
335  Alternate cryptocurrencies / Altcoin Discussion / Re: Nxt source code analysis (QA) on: January 03, 2014, 02:02:13 PM
There are also a lot of places where the base Exception is being caught and suppressed. It's generally best to only catch exceptions that you can handle, otherwise, you're just continuing without knowing what went wrong and your code could be in a bad state.
Absolutely agree, haven't had the time to fix in 0.4.9e.
Quote
I'm unsure what you're seeding transactions.nxt with when it's not found? Are those the genesis block transactions? Shouldn't they be getting downloaded from somewhere?
Those are the genesis block transactions, hardcoded in the code. My account number is somewhere there too... Wink
Quote
It's kind of awkward to have a private class (e.g. Blocks) populate a member of the containing type directly (e.g. Blocks.loadBlocks assigns Nxt.blocks directly). It looks like you're using classes primarily for namespacing (e.g. grouping related functions) instead of creating standalone classes. For example, the Blocks class cannot be used anywhere else because it has hard dependencies on Nxt (which is also doing server stuff). Might not be a big deal in your case, but it's usually better to minimize class dependencies by creating small, reusable classes with a single purpose (in other words, following the SOLID principle).
Agree. The code doesn't exactly follow any textbook design patterns either. Smiley Significant refactoring is needed, but no time for it now, need to fix the critical bugs first.
Quote
If read object throws here, neither stream will be closed. You should consider moving the closes to a finally block.
Rest assured, all streams are safely closed in finally blocks (or actually using java 7 try-with-resources) in 0.4.9e.
336  Alternate cryptocurrencies / Altcoin Discussion / Re: Nxt source code analysis (QA) on: January 03, 2014, 01:53:27 PM
I hope you already remove "double copy"
Code:
peers = ((HashMap<String, Peer>)Nxt.peers.clone()).values();
from thread, which is start every second Smiley
Yes. There is no invocation of clone() in 0.4.9e.
337  Alternate cryptocurrencies / Altcoin Discussion / Re: Nxt source code analysis (QA) on: January 03, 2014, 01:52:02 PM
AFAIR, HashMap.values() make a copy, while HashMap.entrySet() definitely not.
So my variant is even better. You sync in peers anyway, so it is safe.
I didn't know that, are you sure? From the java source of ConcurrentHashMap, which Nxt.peers already is in 0.4.9e:
Code:
    /**
     * Returns a {@link Collection} view of the values contained in this map.
     * The collection is backed by the map, so changes to the map are
     * reflected in the collection, and vice-versa.  The collection
     * supports element removal, which removes the corresponding
     * mapping from this map, via the <tt>Iterator.remove</tt>,
     * <tt>Collection.remove</tt>, <tt>removeAll</tt>,
     * <tt>retainAll</tt>, and <tt>clear</tt> operations.  It does not
     * support the <tt>add</tt> or <tt>addAll</tt> operations.
     *
     * <p>The view's <tt>iterator</tt> is a "weakly consistent" iterator
     * that will never throw {@link ConcurrentModificationException},
     * and guarantees to traverse elements as they existed upon
     * construction of the iterator, and may (but is not guaranteed to)
     * reflect any modifications subsequent to construction.
     */
    public Collection<V> values() {
        Collection<V> vs = values;
        return (vs != null) ? vs : (values = new Values());
    }
338  Alternate cryptocurrencies / Altcoin Discussion / Re: Nxt source code analysis (QA) on: January 03, 2014, 01:43:43 PM
Okey, let me rewrite something Smiley

For memory usage I prefer to code like this:

Code:
                List<Peer> selectedPeers = new ArrayList<>();
                for (Map.Entry<String, Peer> entry : peers.entrySet()) {
                    Peer peer = entry.getValue();
                    if (peer.blacklistingTime <= 0 && peer.state == state && peer.announcedAddress.length() != 0 && ((!applyPullThreshold || !enableHallmarkProtection || peer.getWeight() >= pullThreshold))) {
                        selectedPeers.add(peer);
                    }
                }

And even more, List selectedPeers can be reused, if used only in this method.
You are reading my mind. My tinfoil hat has been leaking!
My replacement of the same lines in getAnyPeer, already in 0.4.9e:
Code:
            List<Peer> selectedPeers = new ArrayList<Peer>();

            for (Peer peer : Nxt.peers.values()) {

                if (peer.blacklistingTime <= 0 && peer.state == state && peer.announcedAddress.length() > 0
                        && (!applyPullThreshold || !enableHallmarkProtection || peer.getWeight() >= pullThreshold)) {

                    selectedPeers.add(peer);

                }

            }

339  Alternate cryptocurrencies / Altcoin Discussion / Re: Nxt source code analysis (QA) on: January 03, 2014, 01:38:44 PM
Small suggestion on usage of Collection.toArray().
I see a lot of calls like
Code:
peers.toArray(new Peer[0])
1. It is completely useless and equal to simple toArray() call.
2. It is better in terms of speed and memory usage to code like this:
Code:
peers.toArray(new Peer[peers.size()])
A search for toArray in 0.4.9e finds only two instances in old, commented out code. Keep digging, I am still a step ahead. Smiley
340  Alternate cryptocurrencies / Altcoin Discussion / Re: Nxt source code analysis (QA) on: January 03, 2014, 01:33:49 PM
Static variables like peers, blocks, accounts, users are not final. They are initialized at start, so it is not a big flaw right now, but who knows about future.
In 0.4.9e, they are. :-)
Quote
When I look more deeply in syncronizations, I see a lot of places, where author get content of such global collection and then sync on it, but not sync on collection itself. Example:
Code:
Block.analyse() method:

Account generatorAccount = accounts.get(Account.getId(generatorPublicKey));
synchronized (generatorAccount) {
    generatorAccount.setBalance(generatorAccount.balance + totalFee * 100L);
    generatorAccount.setUnconfirmedBalance(generatorAccount.unconfirmedBalance + totalFee * 100L);
}
I have fixed, I hope, the synchronization issues related to Blocks and Transactions in 0.4.9e. The synchronization in Accounts is on my TODO list for the next version.
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 [17] 18 19 20 21 22 23 »
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!