Bitcoin Forum
June 21, 2024, 04:17:25 AM *
News: Voting for pizza day contest
 
  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 »
381  Alternate cryptocurrencies / Announcements (Altcoins) / Re: NXT :: descendant of Bitcoin - Updated Information on: February 24, 2014, 07:36:28 PM
JeanLuc

Could you please add nxt.util.Logger.removeMessageListener and nxt.util.Logger.removeExceptionListener?

Thanks!
382  Alternate cryptocurrencies / Announcements (Altcoins) / Re: NXT :: descendant of Bitcoin - Updated Information on: February 24, 2014, 07:10:51 PM
Once it will exist portal NXT -> EUR, would it be possible to get some kind of invoice (in EU)? Or will it be my problem to explain it before government will ask me.

This will be important question for all potential eshops too.

That depends on the gateway company. Reading your post there clearly is demand for a gateway that offers that.
383  Alternate cryptocurrencies / Announcements (Altcoins) / Re: NXT :: descendant of Bitcoin - Updated Information on: February 24, 2014, 06:57:34 PM
Can someone please send some (test) Nxt my way?

12790521293207104739

Thank you!
384  Alternate cryptocurrencies / Announcements (Altcoins) / Re: NXT :: descendant of Bitcoin - Updated Information on: February 24, 2014, 04:28:44 PM
Improved handling of init and shutdown.
..
Delayed starting the blockchain scan
..
Load it from the file defined in the system property

Beers for you!  Grin
385  Alternate cryptocurrencies / Announcements (Altcoins) / Re: NXT :: descendant of Bitcoin - Updated Information on: February 24, 2014, 11:06:10 AM
What I can do is make Nxt.shutdown() public and not add any shutdown hooks myself, when started using init(), only when started using main(). Then whoever calls init() has the responsibility to add a shutdown hook or call shutdown().
I don't know how your restart works, but unless the jvm is really shutdown and started again, init() is unlikely to work as expected after a shutdown(), because of all the static initializers and final variables I rely on.

Perfect! Our client is built as an Eclipse RCP app, those come with a native launcher that controls the jvm. Thats how Eclipse can be *restarted* when you installed a new plugin. It's just that jvm shutdown seems to not go so gentle.

The nxt-default.properties has to be there. I don't throw exceptions if nxt.properties is missing. Why do you not want to use nxt-default.properties? It only needs to be in the classpath, it can be hidden from the user.
...
This cannot be done in init, because properties must be loaded before any other classes attempt to get them using Nxt.getStringProperty() etc., such as the Logger initializing its debug and enableStackTraces as static final. Allowing additional properties overrides in the init() was not such a good idea. If you want to add listeners to BlockchainProcessor for example, before init() has been called, it still needs to see the correct values of all properties - so it is too late to set them in init().

In an RCP application everything gets bundled as an OSGI bundle/plugin, we also do this for nxt. It's so we can deploy updates to nxt as only one updated plugin. This however leads to troubles since an OSGI bundle is usually a jar and it's kinda hidden away in the plugins folder (not easily reachable for end users). Currently we already have a properties file in the install folder root (which is recognizably named after the client) it would be most ideal if we can use that properties file to allow for user overwrites, this is also the case since we are planning to support multiple crypto currencies in the client and all user settings could go there.

I'm not sure if `ClassLoader.getSystemResourceAsStream("nxt.properties");` will include the install directory in it's search path since nxt is *in* it's own plugin which is loaded by the OSGI classloader (maybe it will).

Ideal would be if somehow you could make the location of nxt.properties dynamic. Easiest in our case would probably be a simple property (System.getProperty('nxt.Nxt.config')) so we can pass the location as jvm argument or set it ourselves in code that loads before the nxt plugin is activated.


386  Alternate cryptocurrencies / Announcements (Altcoins) / Re: NXT :: descendant of Bitcoin - Updated Information on: February 23, 2014, 07:04:14 PM
JeanLuc

Couple of points.. (hope your not getting sick of me).

Could you possibly move all static initialization code in nxt.Nxt to nxt.Nxt.Init.init method. You probably planned that already, it could be my decompiler f%$'ing stuff up but it shows now that init method is empty (private static void nxt.Nxt.Init.init() {})  and that all code that should go there is in the static class initializer beneath it (again, that's what my decompiler thinks).

Because of the code in the static initializers it's impossible to register event listener before we kick off the init process, the event listeners are there off course to display init progress.

Also. You read in both "nxt-default.properties" and "nxt.properties" in the static class initializer in nxt.Nxt. The runtime exceptions thrown when those files are missing (our case) cannot be caught. I believe this code belongs in nxt.Nxt.Init.init to. But the exceptions thrown on missing property files remain a problem. I really like how you can pass a Properties object to Nxt.init. Maybe you can read the property files in nxt.Nxt.Init.init() and then in nxt.Nxt.Init.init(Properties properties) do the rest, that way we can simply call nxt.Nxt.Init.init(Properties properties).

I'm stuck at the moment and the only way out I see is to delete Nxt.class and create my own fork of Nxt.java (sucks really because of the decompiler mangling all the names). Where are you on your refactorings? Any chance you can release a version more geared towards java client developers?

If that's not the case if you could give me a copy of only Nxt.java I can at least share my changes with you.

As always thanks!

You cant register a listener with BlockchainProcessorImpl to listen for BLOCK_SCANNED events because to register the listener there need to be a new BlockchainProcessorImpl that in it's constructor calls BlockchainProcessorImpl.scan (which is the method that is firing the BLOCK_SCANNED events).








387  Alternate cryptocurrencies / Announcements (Altcoins) / Re: NXT :: descendant of Bitcoin - Updated Information on: February 23, 2014, 04:37:28 PM
JeanLuc

Couple of points.. (hope your not getting sick of me).

Could you possibly move all static initialization code in nxt.Nxt to nxt.Nxt.Init.init method. You probably planned that already, it could be my decompiler f%$'ing stuff up but it shows now that init method is empty (private static void nxt.Nxt.Init.init() {})  and that all code that should go there is in the static class initializer beneath it (again, that's what my decompiler thinks).

Because of the code in the static initializers it's impossible to register event listener before we kick off the init process, the event listeners are there off course to display init progress.

Also. You read in both "nxt-default.properties" and "nxt.properties" in the static class initializer in nxt.Nxt. The runtime exceptions thrown when those files are missing (our case) cannot be caught. I believe this code belongs in nxt.Nxt.Init.init to. But the exceptions thrown on missing property files remain a problem. I really like how you can pass a Properties object to Nxt.init. Maybe you can read the property files in nxt.Nxt.Init.init() and then in nxt.Nxt.Init.init(Properties properties) do the rest, that way we can simply call nxt.Nxt.Init.init(Properties properties).

I'm stuck at the moment and the only way out I see is to delete Nxt.class and create my own fork of Nxt.java (sucks really because of the decompiler mangling all the names). Where are you on your refactorings? Any chance you can release a version more geared towards java client developers?

If that's not the case if you could give me a copy of only Nxt.java I can at least share my changes with you.

As always thanks!
388  Alternate cryptocurrencies / Announcements (Altcoins) / Re: NXT :: descendant of Bitcoin - Updated Information on: February 23, 2014, 02:14:05 PM
JeanLuc

Hi. I ran into a use case where we have to gracefully shutdown Nxt and can't rely on your shutdown handler. At the end of the application update process we need to restart the client for all updates to take effect. The restart code is embedded in the framework we use and on top of that the restart code is not written in java.

It seems when doing a restart the shutdown handlers do not run properly (probably since the restart code does a forced shutdown) this would all be solved if you'd make nxt.Nxt.shutdown public, then we can make sure Nxt has been shutdown properly before we do an application restart.

Thanks!

389  Alternate cryptocurrencies / Announcements (Altcoins) / Re: NXT :: descendant of Bitcoin - Updated Information on: February 22, 2014, 07:54:37 PM
JeanLuc

Could you possibly expose the org.eclipse.jetty.server.Server instance in nxt.Peers (make it a public static). Use case is to register a LifeCycle.Listener with it.

Thanks.
390  Alternate cryptocurrencies / Announcements (Altcoins) / Re: NXT :: descendant of Bitcoin - Updated Information on: February 22, 2014, 06:42:06 PM
JeanLuc,

In order to visualize the shutdown process in the client i can either listen for log messages (kinda hackish) to determine that some component has shutdown, or mimic what you do in Nxt.shutdown (call XXX.shutdown myself) but that might lead to undesired effects once the vm shutdownHandler kicks in. Or ... maybe you could add some more events, i think the most time consuming actions are Peers.shutdown and Db.shutdown.
Ideal would be if clients could determine how long the task is and be notified of the amount of work done, the shutdown progress could then be shown in a deterministic progressbar.

Looking at Db.shutdown this would require a listener registered with H2 (with which i'm not familiar) to listen to the COMPACT progress, so not sure if that could be done (for the future if the blockchain grows, i believe you do want to show detailed shutdown progress).

The Peers.shutdown and ThreadPool.shutdown would however be perfect for some kind of fine grained notification that tells you the number of threads that are awaiting shutdown and notifies you each time one has shutdown.

BTW. I can now perfectly display startup progress with the events you added!

-Edit- Looks like it might be possible http://www.h2database.com/javadoc/org/h2/api/DatabaseEventListener.html it supports progress for scanning the database on startup for sure, but that is also handled by sending block added events.

I'd like to come back at this. The H2 listener is something a client developer can implement and register with H2. The shutdown of peer threads however could really use an event at START thread shutdown and at shutdown COMPLETE. Preferably send for each thread being shutdown.
I currently don't have the code from 0.8.0 fully integrated so i don't know if peer/thread shutdown does in fact take noticeable time. maybe i'm worrying about nothing.
391  Alternate cryptocurrencies / Announcements (Altcoins) / Re: NXT :: descendant of Bitcoin - Updated Information on: February 22, 2014, 04:46:11 PM
JeanLuc,

Could you maybe put the Thread instance you pass to Runtime.getRuntime().addShutdownHook in a public property, this way a client has to ability to remove the Thread instance by calling Runtime.getRuntime.removeShutdownHook.
Use case refers to my previous topic where i want to control the shutdown process my self.
392  Alternate cryptocurrencies / Announcements (Altcoins) / Re: NXT :: descendant of Bitcoin - Updated Information on: February 22, 2014, 04:30:20 PM
JeanLuc,

In order to visualize the shutdown process in the client i can either listen for log messages (kinda hackish) to determine that some component has shutdown, or mimic what you do in Nxt.shutdown (call XXX.shutdown myself) but that might lead to undesired effects once the vm shutdownHandler kicks in. Or ... maybe you could add some more events, i think the most time consuming actions are Peers.shutdown and Db.shutdown.
Ideal would be if clients could determine how long the task is and be notified of the amount of work done, the shutdown progress could then be shown in a deterministic progressbar.

Looking at Db.shutdown this would require a listener registered with H2 (with which i'm not familiar) to listen to the COMPACT progress, so not sure if that could be done (for the future if the blockchain grows, i believe you do want to show detailed shutdown progress).

The Peers.shutdown and ThreadPool.shutdown would however be perfect for some kind of fine grained notification that tells you the number of threads that are awaiting shutdown and notifies you each time one has shutdown.

BTW. I can now perfectly display startup progress with the events you added!

-Edit- Looks like it might be possible http://www.h2database.com/javadoc/org/h2/api/DatabaseEventListener.html it supports progress for scanning the database on startup for sure, but that is also handled by sending block added events.
393  Alternate cryptocurrencies / Announcements (Altcoins) / Re: NXT :: descendant of Bitcoin - Updated Information on: February 22, 2014, 02:01:22 PM
agreed, is there pressure to release this source? Or are you asking for the release to gain a bit of help jean luc if its the latter then heck go for it. But if its just to please the like of fc etc then leave it until april as planned.
There is no pressure, I was just putting it up for discussion.

I don't feel I need help, yet, because many of my changes are still so fundamental that I am changing code all over the place and this type of work will be difficult to coordinate when there are many developers. CfB has to re-read the code and figure it out again every time I make some drastic refactoring like the last one. But eventually the code will stabilize and it will be possible to have several developers contributing at the same time. I also don't want to slow down the developers of clients and installers who want to peek into the source.

Should we create a poll and vote for it... Smiley


Code is perfectly readable in the decompiler.

-Edit- I use this one http://jd.benow.ca/
394  Alternate cryptocurrencies / Announcements (Altcoins) / Re: NXT :: descendant of Bitcoin - Updated Information on: February 22, 2014, 01:30:57 PM
JeanLuc

You probably already know this but still, the addListener and removeListener are on BlockchainProcessorImpl and TransactionProcessorImpl only and not on their interfaces.

Code is looking good! Thank you for implementing the features i asked for.

-Edit-

Sorry, just seen the Observable interface, never mind
395  Alternate cryptocurrencies / Announcements (Altcoins) / Re: NXT :: descendant of Bitcoin - Updated Information on: February 22, 2014, 12:53:56 PM

nxt/run.sh
This script is the simplest way to start Nxt, under Linux:
java -Xmx1024M -cp nxt.jar:lib/*:conf nxt.Nxt
As you can see, the classpath needs to include nxt.jar, all the jars under
lib, and the conf directory.


Thanks! I'm an ubuntu user with still a lot to learn, until now I followed the wiki how-to to start and stop:

Quote
java -jar start.jar STOP.PORT=PortYouChoose STOP.KEY=PasswordYouChoose
    to start the client, where PortYouChoose is a port between 10000 and 65535 not used by any other of your software, and PasswordYouChoose is a password that is to be given to stop the client.
java -jar start.jar STOP.PORT=PortYouChoose STOP.KEY=PasswordYouChoose --stop
    to stop the client.

now what command can I use to gently stop the program? Could killing the process still corrupt the db?



Use CTRL-C on the command line. That will gracefully shutdown NXT
396  Alternate cryptocurrencies / Announcements (Altcoins) / Re: NXT :: descendant of Bitcoin - Updated Information on: February 22, 2014, 12:28:26 PM
JeanLuc

Does the dev team (mostly you i guess) use an irc channel?
No, I use jabber, when I don't forget to turn it on, but CfB doesn't use it... we communicate by email only.


Ahhh. You, your emails and a desk. Sounds very familiar.
397  Alternate cryptocurrencies / Announcements (Altcoins) / Re: NXT :: descendant of Bitcoin - Updated Information on: February 22, 2014, 12:15:28 PM
JeanLuc

Does the dev team (mostly you i guess) use an irc channel?
398  Alternate cryptocurrencies / Announcements (Altcoins) / Re: NXT :: descendant of Bitcoin - Updated Information on: February 22, 2014, 12:12:34 PM
"Account Control" was mentioned. Could someone give a brief explanation of this feature.
Ask CfB, I know nothing about it.
Quote
Could you possibly add a way to determine if an account is forging. You can turn on forging on the Generator class but you cant determine if an account is forging since the hasmaps are private on that class. Something like Generator.isForging(Account account)
There is Generator.getGenerator(secretPhrase) in 0.8.0, and a corresponding getForging http api request. The secretPhrase is required for privacy reasons, you shouldn't be able to find out which accounts are forging on a node unless you own that account.
Quote
Also. Could you please add a way to set the database and config file locations, since now the java current directory is used desktop client users must navigate to the actual folder that contains the jar (or executable launcher in my case) in order for NXT to reference the correct (relative) database location.
The full jdbc url is configurable now, and the nxt.properties file just needs to be in the classpath. Or you can completely substitute it with your own Properties object in Nxt.init() (this is not tested at all).

Yes, and I added the fullReset feature. It however increases the size of the database temporarily, until a compact is run at shutdown.

Excellent ;-)

Btw. Am i still on the correct test net http://holms.cloudapp.net:6874/ it could be on my side (just did a major refactoring) but peers seem to be blacklisted constantly (at least the two peers available) so no blocks are downloaded. I will be integrating 0.8.0e immediately so lets see if troubles remain.
399  Alternate cryptocurrencies / Announcements (Altcoins) / Re: NXT :: descendant of Bitcoin - Updated Information on: February 22, 2014, 11:53:18 AM
@CfB, @JeanLuc anyone on dev team

"Account Control" was mentioned. Could someone give a brief explanation of this feature.

Thanks

bump.

JeanLuc

Could you possibly add a way to determine if an account is forging. You can turn on forging on the Generator class but you cant determine if an account is forging since the hasmaps are private on that class. Something like Generator.isForging(Account account)

Also. Could you please add a way to set the database and config file locations, since now the java current directory is used desktop client users must navigate to the actual folder that contains the jar (or executable launcher in my case) in order for NXT to reference the correct (relative) database location.
400  Alternate cryptocurrencies / Announcements (Altcoins) / Re: NXT :: descendant of Bitcoin - Updated Information on: February 22, 2014, 10:43:04 AM
@CfB, @JeanLuc anyone on dev team

"Account Control" was mentioned. Could someone give a brief explanation of this feature.

Thanks
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 [20] 21 22 »
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!