Pages:
Author

Topic: MultiBit - page 74. (Read 336361 times)

legendary
Activity: 1708
Merit: 1069
April 08, 2012, 06:08:34 AM
Hi freemoney,

Functional testing/ test scripts
Yes I am putting in the CLI now (well starting on it) mainly to make scripted / functional testing easier.   There is quite a bit of internal work coming up with encrypted wallets etc so I wanted to improve my testing capability. You can only do so much with unit tests.

The code in the CLI will be exercising the same code as in the GUI (but obviously not the 'click here' stuff) so it will improve my test coverage generally too.

The test scripts could also be used by the end user as validation and diagnostic scripts too.


Medium term - market data
In the medium term the exchange data we are just starting to hook into will also be available on the MultiBit object model (and then subsequently the CLI).   This will give people shell access to:

+ all your wallet information and ability to spend
+ the market data from the exchanges you are hooked into
+ the state of the MultiBit runtime itself (i.e. are all the blocks downloaded ?).

That is *close* to being able to write whole scripted algorithms to, say, trade bitcoin across exchanges. (There is no looping or conditions in the CLI at the moment so that would have to be added.   Or it could be hooked into a rules engine).


Secure shell usage - iOS will fall to bitcoin !
Edit: oh and a CLI means that you could run a secure shell (SSH) from one machine to another if you wanted.
It would be slightly nerdy but you could have an SSH from your iPhone to a cloud VM somewhere if you wanted.

An iOS developer would then have a reasonable interface to write an iOS GUI against.
(I am not really planning to do this - not enough time - just saying what is possible).

member
Activity: 62
Merit: 10
April 08, 2012, 05:37:15 AM
Nice idea to put in a CLI for advanced users.

I guess this will make it possible to write testing scripts for automated testing.
Or kind of a validation suite that users can execute on their system to be sure that everything works as intended.
Are you planning in this direction, too?
legendary
Activity: 1708
Merit: 1069
April 07, 2012, 04:43:01 PM
It is the start of a longish road, but I have started on a command line interface for the MultiBit object model.  This will, when it is complete, be able to manipulate all the 'things' in MultiBit using a command line.

At the moment all it can do is show help, create new wallets and exit the shell as follows:
Code:
host47:Java jim$ cat multiBitShell.sh
java -classpath multibit-shell-exe.jar org.multibit.viewsystem.commandline.MultiBitCommandLine
host47:Java jim$ ./multiBitShell.sh
22:31:33.477 [main] INFO  o.m.v.c.MultiBitCommandLine - Starting MultiBitCommandLine
22:31:33.484 [main] INFO  o.m.ApplicationDataDirectoryLocator - Application data directory.1 = '/Users/jim/Library/Application Support/MultiBit'
22:31:33.514 [main] DEBUG o.m.v.c.MultiBitCommandLine - useTestNet = false
22:31:33.545 [main] DEBUG o.m.v.c.MultiBitCommandLine - userLanguageCode = en
22:31:33.564 [main] DEBUG o.m.v.c.MultiBitCommandLine - Creating model
22:31:33.569 [main] DEBUG org.multibit.model.MultiBitModel - Initial view from properties file is '1'
22:31:33.569 [main] DEBUG o.m.v.c.MultiBitCommandLine - Creating views
MB > 22:31:33.576 [main] DEBUG o.m.v.c.MultiBitCommandLine - Registering with controller
22:31:33.577 [main] DEBUG o.m.v.c.MultiBitCommandLine - Creating Bitcoin service
22:31:33.678 [main] DEBUG org.multibit.network.MultiBitService - Reading block store '/Users/jim/Library/Application Support/MultiBit/multibit.blockchain' from disk
22:31:33.683 [main] INFO  o.m.store.ReplayableBlockStore - Reading block store from /Users/jim/Library/Application Support/MultiBit/multibit.blockchain
22:31:33.691 [main] INFO  o.m.store.ReplayableBlockStore - Read chain head from disk: 0000000000000a22f6f29ba1f5ca3c95bcf13d5f2bafeb45028971a154d73026
22:31:33.693 [main] DEBUG org.multibit.network.MultiBitService - Connecting ...
22:31:33.720 [main] DEBUG o.m.v.c.MultiBitCommandLine - Locating wallets
22:31:33.721 [main] DEBUG o.m.v.c.MultiBitCommandLine - Loading wallet from '/Users/jim/real money/blockChain.wallet'
MB:Message   : Opening wallet "/Users/jim/real money/blockChain.wallet"...
22:31:36.204 [main] DEBUG org.multibit.file.FileHandler - rememberFileSizesAndLastModified: Wallet filename /Users/jim/real money/blockChain.wallet , walletFileSize 3728832 ,walletFileLastModified 1333804495000 ,walletInfoFileSize 4399 ,walletInfoFileLastModified 1333804493000
MB:Message   : Opening wallet "/Users/jim/real money/blockChain.wallet"... done.
22:31:36.219 [main] DEBUG o.m.v.c.MultiBitCommandLine - Loading wallet from '/Users/jim/real money/pettyCash.wallet'
MB:Message   : Opening wallet "/Users/jim/real money/pettyCash.wallet"...
22:31:36.547 [main] DEBUG org.multibit.file.FileHandler - rememberFileSizesAndLastModified: Wallet filename /Users/jim/real money/pettyCash.wallet , walletFileSize 452062 ,walletFileLastModified 1333804496000 ,walletInfoFileSize 1246 ,walletInfoFileLastModified 1333804496000
MB:Message   : Opening wallet "/Users/jim/real money/pettyCash.wallet"... done.
22:31:36.563 [main] DEBUG o.m.v.c.MultiBitCommandLine - Loading wallet from '/Users/jim/real money/multibitDonate/donations.wallet'
MB:Message   : Opening wallet "/Users/jim/real money/multibitDonate/donations.wallet"...
22:31:37.072 [main] DEBUG org.multibit.file.FileHandler - rememberFileSizesAndLastModified: Wallet filename /Users/jim/real money/multibitDonate/donations.wallet , walletFileSize 992392 ,walletFileLastModified 1333804841000 ,walletInfoFileSize 1189 ,walletInfoFileLastModified 1333804840000
MB:Message   : Opening wallet "/Users/jim/real money/multibitDonate/donations.wallet"... done.
22:31:37.103 [main] DEBUG o.m.v.c.MultiBitCommandLine - Loading wallet from '/users/jim/test/test1.wallet'
MB:Message   : Opening wallet "/users/jim/test/test1.wallet"...
22:31:37.109 [main] DEBUG org.multibit.file.FileHandler - rememberFileSizesAndLastModified: Wallet filename /users/jim/test/test1.wallet , walletFileSize 3082 ,walletFileLastModified 1333833631000 ,walletInfoFileSize 278 ,walletInfoFileLastModified 1333833631000
MB:Message   : Opening wallet "/users/jim/test/test1.wallet"... done.
22:31:37.110 [main] DEBUG o.m.v.c.MultiBitCommandLine - Loading wallet from '/users/jim/test/test2.wallet'
MB:Message   : Opening wallet "/users/jim/test/test2.wallet"...
22:31:37.115 [main] DEBUG org.multibit.file.FileHandler - rememberFileSizesAndLastModified: Wallet filename /users/jim/test/test2.wallet , walletFileSize 3082 ,walletFileLastModified 1333833671000 ,walletInfoFileSize 395 ,walletInfoFileLastModified 1333833671000
MB:Message   : Opening wallet "/users/jim/test/test2.wallet"... done.
22:31:37.116 [main] DEBUG o.m.v.c.MultiBitCommandLine - Loading wallet from '/users/jim/test/test3.wallet'
MB:Message   : Opening wallet "/users/jim/test/test3.wallet"...
22:31:37.121 [main] DEBUG org.multibit.file.FileHandler - rememberFileSizesAndLastModified: Wallet filename /users/jim/test/test3.wallet , walletFileSize 3082 ,walletFileLastModified 1333833719000 ,walletInfoFileSize 87 ,walletInfoFileLastModified 1333833719000
MB:Message   : Opening wallet "/users/jim/test/test3.wallet"... done.
22:31:37.127 [main] DEBUG o.m.v.c.MultiBitCommandLine - Downloading blockchain
MB:Error     : No view to display with id 1
MultiBitTool#processLine args = --action=HELP

22:31:37.128 [SwingWorker-pool-1-thread-7] DEBUG org.multibit.network.MultiBitService - Downloading blockchain
MultiBitShell: print and manipulate the MultiBit object model

Usage (Implemented):
  HELP           Show this help text.
  EXIT           Exit this MultiBitShell session.
  CREATE         --wallet --filename=<>                     Makes a new wallet in the file specified.

(Not Implemented Yet):
  CREATE         --sendingAddress --address=<> --label=<>   Makes a new sending address with the given address and label.
                 --receivingAddress --label=<>              Makes a new receiving address with the given label.

  EDIT           --preferences                              Edit the MultiBit preferences.
                 --sendingAddress --address=<> --label=<>   Edit the sending address matching the given address or label.
                 --receivingAddress --address=<> --label=<> Edit the receiving address matching the given address or label.

  LIST           --wallets                                  Lists all open wallets in a format suitable for picking.
                 --sendingAddresses                         Lists all sending addresses in a format suitable for picking.
                 --receivingAddresses                       Lists all receiving addresses in a format suitable for picking.
                 --transactions                             Lists all transactions for the active wallet for picking.

  PICK           --number=<> or --value=<>                  Pick from the last list either by list number or match by value.

  DELETE         --wallet --filename=<>                     Delete the wallet with the file specified.
                 --sendingAddress --address=<> --label=<>   Delete the sending address with the given address or label.
                 --receivingAddress --address --label=<>    Delete the receiving address with the given address or label.

  SEND           --address=<> --amount=<>                   Send the specified amount of BTC to the address specified.

  RESET          --date=<>                                  Remove all transactions on or after the date, or all if no date specified.
  REPLAY         --date=<>                                  Replay the blockchain from the date specified.

  IMPORT_KEYS    --filename=<> --password=<>                Import private keys from the filename specified, using the password.
  EXPORT_KEYS    --filename=<> --password=<>                Export private keys from the filename specified, using the password.

  WAIT_FOR       --online or --replayComplete               Wait for MultiBit to come online or for the blockchain replay to complete.

  SHOW           --activeWallet                             Show which wallet is the active wallet.
                 --online                                   Show whether MultiBit is onine or not.
                 --helpAbout                                Show the help about MultiBit details.
                 --ticker                                   Show the most recent ticker details.
                 --messages=                        Show the most recent of messages.
                 --transaction                              Show the details of the last picked transaction.

MB:Message   : Synchronised with network.
MB:Message   : Synchronised with network.. 100.0% complete.
MB:Message   : Synchronised with network.
MB:Message   : Synchronised with network.. 100.0% complete.
MB:Message   : MultiBit is now online

MB > CREATE --wallet --filename=/users/jim/test/test4.wallet
MultiBitTool#processLine args = --action=CREATE --wallet --filename=/users/jim/test/test4.wallet

22:32:07.727 [Thread-2] DEBUG org.multibit.model.WalletInfo - Could not load walletinfo file '/users/jim/test/test4.info'
22:32:07.728 [Thread-2] DEBUG org.multibit.model.WalletInfo - Cause : /users/jim/test/test4.info (No such file or directory)
22:32:07.733 [Thread-2] DEBUG org.multibit.file.FileHandler - Result of check of whether files have changed for wallet filename /users/jim/test/test4.wallet was true.
22:32:07.741 [Thread-2] DEBUG org.multibit.file.FileHandler - rememberFileSizesAndLastModified: Wallet filename /users/jim/test/test4.wallet , walletFileSize 3082 ,walletFileLastModified 1333834327000 ,walletInfoFileSize 87 ,walletInfoFileLastModified 1333834327000
22:32:07.745 [Thread-2] DEBUG org.multibit.file.FileHandler - rememberFileSizesAndLastModified: Wallet filename /users/jim/test/test4.wallet , walletFileSize 3082 ,walletFileLastModified 1333834327000 ,walletInfoFileSize 87 ,walletInfoFileLastModified 1333834327000
22:32:07.746 [Thread-2] DEBUG org.multibit.file.FileHandler - When writing wallets, there were 7
22:32:07.749 [Thread-2] DEBUG o.m.v.s.action.CreateNewWalletAction - User preferences with new wallet written successfully
MB > EXIT
MultiBitTool#processLine args = --action=EXIT

MultiBitTool#processLine - exit called.
host47:Java jim$

It will be a 'background task' whilst I work through other stuff.

Note: Primarily for security considerations none of the code for the MultiBit command line will be put in the regular MultiBit installers.   There is a separate jar file (multibit-shell-exe.jar) that people will have to download if they want to use this.  It is for advanced users so it is better not to have it in the regular installers.

P.S.  The parser (the clever bit of the code that interprets all the commands and options) is a blatant copy of Mike Hearn's wallet-tool which does a similar task for the bitcoinj code. Thanks Mike !
legendary
Activity: 1708
Merit: 1069
April 05, 2012, 05:05:36 PM
It is not quite finished yet
I have just put in quite a handy feature.

The list of addresses in the Send and Request screen is now sorted by label.
And as you type your label text in the main entry form it moves the row to its correct sort position in the addresses list.
It is a bit hard to describe in words:

Screenshot:


Here you can see I have grouped a few addresses simply by typing 'exact' as a prefix.  You create a new address, type the prefix in the label box and you can easily see the other, related addresses.

(You can also sort by bitcoin address too if you want).
legendary
Activity: 1708
Merit: 1069
April 05, 2012, 08:54:27 AM
I have added in a date picker into the 'Reset blockchain and transactions' screen as below:



The 'Reset from date of first transaction' option is the same as before. (This is the default option when the screen is opened).

With the 'Specify reset date' it:

1) Removes all transactions on or after the date specified for the active wallet.
2) Replays the blocks from midnight at the start of the day specified to pick up all the transactions.

The reset date is initially set to "two weeks ago" which I find normally does the job.
legendary
Activity: 1708
Merit: 1069
April 05, 2012, 04:00:21 AM
Great - thanks bitcoinspot.nl !

Tim and Gary have some time over the long weekend so we are going to have a push on the ticker.
I expect the next release will thus be early next week so I will include all the new localisation work then.
sr. member
Activity: 300
Merit: 250
April 05, 2012, 03:42:22 AM
Dutch is done.  Cheesy
legendary
Activity: 1708
Merit: 1069
April 04, 2012, 04:48:12 PM
freemoney and mrmx have been busy translating the Welcome page into German and Spanish respectively.
Also I have tweaked the MultiBit start up so that it now looks for the user's locale and switches to it directly (or drops to English if the user's language is not supported).

The combination of these means that German and Spanish users see the welcome screen in their native tongue as follows:






As this is the very first text a user sees after installing MultiBit it is quite "high value".   If you want to localise this text for your language, go to http://translate.multibit.org, pick your language and then search for terms with "welcome" in.   This picks up the 4 paragraphs of welcome text.
legendary
Activity: 1708
Merit: 1069
April 04, 2012, 08:33:52 AM
Hi Tittiez,

I must admit it had never occurred to me to do a little front end and then call down to Vanitygen to do the grunt work for vanity addresses.

I can see the appeal - it has gone on my list of "MultiBit ideas".

I expect the next couple of months will be tied up with encrypted wallets etc but it is certainly worth thinking about later on.

:-)
hero member
Activity: 686
Merit: 500
April 04, 2012, 05:51:53 AM
Have you ever considered having Vanitygen included in MultiBit?
legendary
Activity: 1708
Merit: 1069
April 03, 2012, 04:05:35 PM
I have been tidying up the online help tonight as follows:



There are still a couple of help pages that are "To do" and I will probably add a jargon entry for "What is a private key ?" as well.
You can only write help for so long before your brain melts so I will finish it off tomorrow.   :-)


Edit: Done
legendary
Activity: 1708
Merit: 1069
April 03, 2012, 05:25:17 AM
Yes - they are quite a timesaver.
I do not think blockexplorer or blockchain.info will mind the small increase in traffic.
sr. member
Activity: 300
Merit: 250
April 03, 2012, 01:42:50 AM
the "view in blockchain"etc buttons are great!
legendary
Activity: 1708
Merit: 1069
April 02, 2012, 04:31:46 PM
I have added in a 'Welcome" screen that the user sees when they open MultiBit for the first time:



It is also available as the "Help | Welcome" menu option.
The text is in the localisation files for anyone who wants to translate it.

Oh, and I have put a CSS on the help text so that it uses the user specified font and point size
legendary
Activity: 1708
Merit: 1069
April 02, 2012, 12:19:59 PM
I find myself looking up MultiBit transactions quite often in blockexplorer/ blockchain.info.
I have added a couple of buttons in the transaction details dialog to do the lookup automatically:



If you click the button it opens your default browser viewing the transaction details at blockexplorer.com or blockchain.info

(This behaviour is operating system dependent - the buttons only appear if Java can open your browser).
legendary
Activity: 1708
Merit: 1069
April 02, 2012, 06:51:01 AM
Hello da2ce7,

Thanks for your post.

Where is the address 1DnHd6... that you are sending to in the transaction you showed the details for ?
I cannot see it on blockchain.info

I don't suppose it is IN the wallet you are sending FROM is it ?

For 1Jojn83 I just see on blockchain.info the 2 transactions:
62632c89d922aa3d43e58d55d306a74c1ac15cbeacc53bbd42a87840254e0497
(funding of 1 BTC)

and

6ff5fd7b2f8045a5d4cbff06bfbb6671878e40d2d4580dda96d27aadad619527
funding of 0.01 BTC to
1JQDEgz9rBb8fnX7PzZgtCTVLTftYtkuTp

Could you PM me a screen shot of the request screen so that I can see what addresses are in there and the multibit_debug.log and multibit_console.log (in your /MultiBit/log directory) please and I will have a look.

Certainly does not look right.

legendary
Activity: 1222
Merit: 1016
Live and Let Live
April 02, 2012, 04:14:11 AM
Bug in Multibit:

When Sending bitcoins, my ballance is going UP!  This shoudn't be happening...
Multibit is not getting rid of the old bitcoins, and is just adding the cange to my ballance:





How can I help debug this problem? I'm running multibit 0.3.1
legendary
Activity: 1708
Merit: 1069
April 01, 2012, 09:03:23 AM
Thanks to whoever donated 10BTC to the multibit.org donation address on Mar 29th !

:-)
legendary
Activity: 1708
Merit: 1069
April 01, 2012, 08:39:08 AM
There is a new release of MultiBit at:

http://multibit.org


Version 0.3.2

This is a bugfix release.

Bug fixes:
+  Fix so that mining pool coinbase transactions appear in wallets correctly.
+  Fix in documentation 'configuration.txt' incorrect parameter name specified.
+  Tweaked point size of first-install default font (+1)

Release info
Changes included - Mar 28th 12:00 to Apr 1st 11:00 inclusive
Scan of release checklist


P.S. This release will see any new mining dues you receive but to see any previous ones MultiBit was not showing you need to force it to replay the blocks for the time period in question.  

There are various ways to do this but probably the easiest is:
1) Create a new dummy wallet.
2) Export the private keys NOT PASSWORD PROTECTED for the wallet where you are expecting your mining dues to appear to a key file, say, myWallet.key
3) Open up the myWallet.key in a text editor and change one of the 'createdAt' dates to sometime before your first mining payout.
4) Import the myWallet.key into your dummy wallet.

This will replay the blocks that include your mining dues.   The transactions will appear in both your mining wallet and the dummy wallet.

5) Once the replay is done just delete the dummy wallet (it only has its default key - empty - and duplicate keys in it so is safe to delete).   Delete the unprotected key file just to be on the safe side too.
legendary
Activity: 1708
Merit: 1069
March 31, 2012, 10:06:31 AM
I have found a fix for the problem with mining dues not being visible.

It was to do with some 'strange' scripts at the beginning of some coinbase distributions to pool participants.
Anyhow, I have a fix and testcase to check for it in the build.   I am just checking the change has not broken anything else.

It will probably be Monday when the next version will come out with the fix in.
Pages:
Jump to: