[Bitcoin-development] Please trim excessive quoting

2012-03-22 Thread Gavin Andresen
Messages over 40Kbytes big require moderator approval on this list; if
you want your messages to appear promptly, please trim excessive
quoting before hitting send.

Thanks!

-- 
--
Gavin Andresen

--
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
___
Bitcoin-development mailing list
Bitcoin-development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bitcoin-development


Re: [Bitcoin-development] Announcement: libcoin

2012-03-22 Thread Martinx - ジェームズ
Hi Michael,

 NOTE: Re-add bitcoin-dev to this thread on Cc...

 I'll test this ASAP! I REALLY need this feature (blockchain server <->
wallet client).

 I just want ask you some things...

 1- How close is Libcoin with original Bitcoin? I mean, the output is a
little different, the bitcoind help output was disabled and, I'm afraid
that Libcoin can possibly being distant from Bitcoin in the future... That
can happen?!

 2- Do you have plans to update Libcoin on every new upstream Bitcoin
release? How fast will be this updates? Do you need more resources/people
working on it?


 Another questions not involved directly with Libcoin/Bitcoin but, I'll
need it for my future Bitcoin projects, and Libcoin is on my radar:

 1- Do you know about Diaspora* Project?

 2- Do you have skills in Ruby on Rails development?


Thank you!
Thiago

2012/3/3 Michael Grønager 

> Hi Martin,
>
> There are a couple of options of doing similarly...
>
> In the libcoin repository you will find some code for btc and btcd, it is
> some code I wrote a while ago and it needs to be updated. It functions as a
> bitcoind master and slave. The btcd keeps the blockchain, but no wallet.
> btc keeps the wallet and contact the btcd to get transaction info (like
> send an address and get its transactions or send a transaction id and get
> its details). It works (or worked when I wrote them) with the wallet.dat,
> but needs a little update.
>
> You could e.g. run one btcd on the machine and several btc instances to
> get the functionality you asked for.
>
> Further, btcd also enables a web wallet, where the private keys are stored
> in your browsers local-store.
>
> I will get the application updated, but most likely in a bit other setup
> as it is something I intend to marketize in the near future.
>
> Hope this answers your question.
>
> Cheers,
>
> Michael
>
> On 03/03/2012, at 02:04, Martinx - ジェームズ wrote:
>
> > Michael,
> >
> > libcoin is AWESOME! Thanks!!!
> >
> > Can I do the following scenario with libcoin ? :
> >
> > 1- Create a regular Linux user called "blockchain", with home dir
> pointed to /var/lib/libcoin/ (more or like Ubuntu/Debian mysql does);
> >
> > 2- Start "bitcoind" under user "blockchain" (the Bitcoin blockchain)
> will be downloaded to /var/lib/libcoin/bitcoin/ directory);
> >
> > 3- As another regular user, called "michael", I would like to run
> "bitcoind" too but, I do not want to re-download the blockchain to its own
> subdir, I want instead, to consult it (blockchain) through libcoin itself
> (not by socket of JSON)...
> >
> > So, the /home/michael/.bitcoin/ directory will have only wallet.dat and
> related files, not the blockchain.
> >
> > This is more or less what we can do with Bitcoin Electrum alternate
> client but, with Electrum, it copy the whole blockchain to mysql... This is
> terrible from my point of view, I think that there is no need to duplicate
> the blockchain within MySQL in anyway.
> >
> > I just imagine a bitcoin splited in two, blockchain in one side and
> wallet in the other side.
> >
> > This is possible with libcoin?!
> >
> > Thank you again!
> >
> > Best,
> > Thiago
> >
> > 2012/2/28 Michael Grønager 
> > Hi again - and thanks for testing and finding this!
> >
> > I have fixed the bug you reported:
> >
> > The culprit was an implicit string constructor for the ChainAddress that
> caused creation of a not fully initialized ChainAddress. The right way to
> do it is using chain::getAddress(string) as the ChainAddress is chain
> specific.
> >
> > A git pull will fix it ;)
> >
> > Cheers,
> >
> > Michael
> >
> >
> > On 27/02/2012, at 20:03, Martinx - ジェームズ wrote:
> >
> >> AWESOME!! Thank you!!
> >>
> >> Anyway, I found a new problem... lol
> >>
> >> /usr/local/bin/bitcoind getinfo #okay
> >> {
> >>   "version" : 40001,
> >>   "blocks" : 168753,
> >>   "connections" : 8,
> >>   "difficulty" : 1376302.26788638,
> >>   "testnet" : false
> >> }
> >>
> >> /usr/local/bin/bitcoind getaccountaddress ""  # okay...
> >> 1J4vNcvEdeCuLH4yvyoC2gxFEF4zquoJ87
> >>
> >> /usr/local/bin/bitcoind listaccounts # NOT okay...
> >> {
> >> }
> >>
> >> /usr/local/bin/bitcoind getaccountaddress "teste" # okay
> >> 1E6pGh6AAtuJdFXheZMp1zdYmvdqAQn9QT
> >>
> >> /usr/local/bin/bitcoind listaccounts # NOT okay...
> >> {
> >>   "teste" : 0.
> >> }
> >>
> >> Where is my default account listed at "listaccounts" output?!
> >>
> >> Best,
> >> Thiago
> >>
> >> 2012/2/26 Michael Grønager 
> >> And if you do an update now "help" is there too ;)
> >>
> >> /M
> >>
> >> On 25/02/2012, at 03:11, Martinx - ジェームズ wrote:
> >>
> >>> Thank you!!!
> >>>
> >>> It is all working now! Except "help"...
> >>>
> >>> Nice work Michael!!
> >>>
> >>> Best,
> >>> Thiago
> >>>
> >>> 2012/2/24 Michael Grønager 
> >>> OK - didn't took the weekend:
> >>>
> >>> support for "port" is on github now :)
> >>>
> >>> Only took two lines:
> >>>
> >>> ("port", value(&port)->default_value(8333),
> "Listen on specified port for the p2p protocol")
> >>>
>

Re: [Bitcoin-development] Announcement: libcoin

2012-03-22 Thread Martinx - ジェームズ
Michael,

 Since libcoin is "chain agnostic", I was wondering if the project can be
used like this:

 When I install it with "make install", I would like to have something like
this:

 Regular file: /usr/local/bin/libcoincore # or whatever you like

 Symlink -> Regular file

 /usr/local/bit/bitcoind ->  /usr/local/bin/libcoincore  # bitcoind is a
symlink to libcoincore

 /usr/local/bit/litecoind ->  /usr/local/bin/libcoincore  # litecoind is a
symlink to libcoincore

 /usr/local/bit/devcoind ->  /usr/local/bin/libcoincore  # devcoind is a
symlink to libcoincore

 /usr/local/bit/namecoind ->  /usr/local/bin/libcoincore  # devcoind is a
symlink to libcoincore

 ...and so on...

 So, libcoincore will interpret the ARGV[0] and, for each string, it will
initiate the appropriate internal functions...

 I don't know if Libcoin already does something like that... I'm not a
developer/code reader... Just a small nerd with big ideas...  ^_^

Thanks!
Thiago

2012/2/28 Michael Grønager 

> Hi again - and thanks for testing and finding this!
>
> I have fixed the bug you reported:
>
> The culprit was an implicit string constructor for the ChainAddress that
> caused creation of a not fully initialized ChainAddress. The right way to
> do it is using chain::getAddress(string) as the ChainAddress is chain
> specific.
>
> A git pull will fix it ;)
>
> Cheers,
>
> Michael
>
>
> On 27/02/2012, at 20:03, Martinx - ジェームズ wrote:
>
> > AWESOME!! Thank you!!
> >
> > Anyway, I found a new problem... lol
> >
> > /usr/local/bin/bitcoind getinfo #okay
> > {
> >"version" : 40001,
> >"blocks" : 168753,
> >"connections" : 8,
> >"difficulty" : 1376302.26788638,
> >"testnet" : false
> > }
> >
> > /usr/local/bin/bitcoind getaccountaddress ""  # okay...
> > 1J4vNcvEdeCuLH4yvyoC2gxFEF4zquoJ87
> >
> > /usr/local/bin/bitcoind listaccounts # NOT okay...
> > {
> > }
> >
> > /usr/local/bin/bitcoind getaccountaddress "teste" # okay
> > 1E6pGh6AAtuJdFXheZMp1zdYmvdqAQn9QT
> >
> > /usr/local/bin/bitcoind listaccounts # NOT okay...
> > {
> >"teste" : 0.
> > }
> >
> > Where is my default account listed at "listaccounts" output?!
> >
> > Best,
> > Thiago
> >
> > 2012/2/26 Michael Grønager 
> > And if you do an update now "help" is there too ;)
> >
> > /M
> >
> > On 25/02/2012, at 03:11, Martinx - ジェームズ wrote:
> >
> >> Thank you!!!
> >>
> >> It is all working now! Except "help"...
> >>
> >> Nice work Michael!!
> >>
> >> Best,
> >> Thiago
> >>
> >> 2012/2/24 Michael Grønager 
> >> OK - didn't took the weekend:
> >>
> >> support for "port" is on github now :)
> >>
> >> Only took two lines:
> >>
> >>  ("port", value(&port)->default_value(8333),
> "Listen on specified port for the p2p protocol")
> >>
> >> and using the port option in the Node constructor (was there already):
> >>
> >>  Node node(chain, data_dir, args.count("nolisten") ? "" :
> "0.0.0.0", lexical_cast(port)); // it is also here we specify the
> use of a proxy!
> >>
> >> /M
> >>
> >>
> >>
> >> On 24/02/2012, at 19:49, Martinx - ジェームズ wrote:
> >>
> >>> Hi Michael,
> >>>
> >>> Thank you for your attention!
> >>>
> >>> Now, I'm trying to start libcoin's bitcoind using high ports but, it
> always try to listen at 8332, no matter what I "say"...
> >>>
> >>> Look:
> >>>
> >>> $ cat .bitcoin/bitcoin.conf
> >>> server=1
> >>> daemon=1
> >>> rpcuser=libcoin
> >>> rpcpassword=LibCoin13
> >>> rpcport=10332
> >>> port=10333
> >>>
> >>> But:
> >>>
> >>> /usr/local/bin/bitcoind
> >>> Error: Address already in use
> >>>
> >>> terminate called after throwing an instance of 'DbException'
> >>> what():  DbEnv::close: Invalid argument
> >>> Aborted
> >>>
> >>> When I "strace it", I can see:
> >>>
> >>> ...
> >>> bind(12, {sa_family=AF_INET, sin_port=htons(8333),
> sin_addr=inet_addr("0.0.0.0")}, 16) = -1 EADDRINUSE (Address already in use)
> >>> ...
> >>>
> >>> I already tried:
> >>>
> >>> /usr/local/bin/bitcoind --rpcport 10332
> >>> /usr/local/bin/bitcoind --rpcport=10332
> >>>
> >>> Without success...
> >>>
> >>> Thanks again!
> >>> Thiago
> >>>
> >>> 2012/2/24 Michael Grønager 
> >>> Hi Thiago,
> >>>
> >>> Forgot to comment on the two latter:
> >>>
>  $ bitcoind getaccountaddress ""
>  HTTP error code: 401
>  Error: couldn't parse reply from server
> 
>  $ bitcoind listaccounts
>  HTTP error code: 401
>  Error: couldn't parse reply from server
> 
> >>>
> >>> 401 = permission denied - you need to setup username / password either
> on the commandline or in the bicoin.conf file to access those commands...
> >>>
> >>> See in the bitcoind.cpp file for commands that you can use with and
> without auth...
> >>>
> >>> Those that contains an "auth" requires auth:
> >>>
> >>> server.registerMethod(method_ptr(new GetBalance(wallet)), auth);
> >>>
> >>> As opposed to:
> >>>
> >>> server.registerMethod(method_ptr(new GetInfo(node)));
> >>>
> >>> auth is defined by:
> >>>
> >>> Auth auth(rpc_user, rpc_pass); // if rpc_user and rpc_pass ar

Re: [Bitcoin-development] Announcement: libcoin

2012-03-22 Thread Peter Vessenes
This conversation reminds me that I'd like to see a comprehensive list of
tests that alt processors / generators can run against.

I haven't looked in the client code for some time, but does that exist now?
That would be a nice 'I want to help' early project, getting together
inputs and expected outputs / stack states for implementers to check
against.

As it is right now, we've split our codebase a bit; we rely on the client
to check the validity of a transaction, the balance of a given address, and
converse with the network, but we have written most of our own code for
stuff like block gen; I expect we will also do that for transaction
creation.

Peter



2012/3/22 Michael Grønager 

> What you list below was actually the plan - just havn't gotten there yet,
> but it will be dead easy.
>
> /M
>
>
> On 22/03/2012, at 11:50, Martinx - ジェームズ wrote:
>
> > Michael,
> >
> >  Since libcoin is "chain agnostic", I was wondering if the project can
> be used like this:
> >
> >  When I install it with "make install", I would like to have something
> like this:
> >
> >  Regular file: /usr/local/bin/libcoincore # or whatever you like
> >
> >  Symlink -> Regular file
> >
> >  /usr/local/bit/bitcoind ->  /usr/local/bin/libcoincore  # bitcoind is a
> symlink to libcoincore
> >
> >  /usr/local/bit/litecoind ->  /usr/local/bin/libcoincore  # litecoind is
> a symlink to libcoincore
> >
> >  /usr/local/bit/devcoind ->  /usr/local/bin/libcoincore  # devcoind is a
> symlink to libcoincore
> >
> >  /usr/local/bit/namecoind ->  /usr/local/bin/libcoincore  # devcoind is
> a symlink to libcoincore
> >
> >  ...and so on...
> >
> >  So, libcoincore will interpret the ARGV[0] and, for each string, it
> will initiate the appropriate internal functions...
> >
> >  I don't know if Libcoin already does something like that... I'm not a
> developer/code reader... Just a small nerd with big ideas...  ^_^
> >
> > Thanks!
> > Thiago
> >
> > 2012/2/28 Michael Grønager 
> > Hi again - and thanks for testing and finding this!
> >
> > I have fixed the bug you reported:
> >
> > The culprit was an implicit string constructor for the ChainAddress that
> caused creation of a not fully initialized ChainAddress. The right way to
> do it is using chain::getAddress(string) as the ChainAddress is chain
> specific.
> >
> > A git pull will fix it ;)
> >
> > Cheers,
> >
> > Michael
> >
> >
> > On 27/02/2012, at 20:03, Martinx - ジェームズ wrote:
> >
> > > AWESOME!! Thank you!!
> > >
> > > Anyway, I found a new problem... lol
> > >
> > > /usr/local/bin/bitcoind getinfo #okay
> > > {
> > >"version" : 40001,
> > >"blocks" : 168753,
> > >"connections" : 8,
> > >"difficulty" : 1376302.26788638,
> > >"testnet" : false
> > > }
> > >
> > > /usr/local/bin/bitcoind getaccountaddress ""  # okay...
> > > 1J4vNcvEdeCuLH4yvyoC2gxFEF4zquoJ87
> > >
> > > /usr/local/bin/bitcoind listaccounts # NOT okay...
> > > {
> > > }
> > >
> > > /usr/local/bin/bitcoind getaccountaddress "teste" # okay
> > > 1E6pGh6AAtuJdFXheZMp1zdYmvdqAQn9QT
> > >
> > > /usr/local/bin/bitcoind listaccounts # NOT okay...
> > > {
> > >"teste" : 0.
> > > }
> > >
> > > Where is my default account listed at "listaccounts" output?!
> > >
> > > Best,
> > > Thiago
> > >
> > > 2012/2/26 Michael Grønager 
> > > And if you do an update now "help" is there too ;)
> > >
> > > /M
> > >
> > > On 25/02/2012, at 03:11, Martinx - ジェームズ wrote:
> > >
> > >> Thank you!!!
> > >>
> > >> It is all working now! Except "help"...
> > >>
> > >> Nice work Michael!!
> > >>
> > >> Best,
> > >> Thiago
> > >>
> > >> 2012/2/24 Michael Grønager 
> > >> OK - didn't took the weekend:
> > >>
> > >> support for "port" is on github now :)
> > >>
> > >> Only took two lines:
> > >>
> > >>  ("port", value(&port)->default_value(8333),
> "Listen on specified port for the p2p protocol")
> > >>
> > >> and using the port option in the Node constructor (was there already):
> > >>
> > >>  Node node(chain, data_dir, args.count("nolisten") ? "" :
> "0.0.0.0", lexical_cast(port)); // it is also here we specify the
> use of a proxy!
> > >>
> > >> /M
> > >>
> > >>
> > >>
> > >> On 24/02/2012, at 19:49, Martinx - ジェームズ wrote:
> > >>
> > >>> Hi Michael,
> > >>>
> > >>> Thank you for your attention!
> > >>>
> > >>> Now, I'm trying to start libcoin's bitcoind using high ports but, it
> always try to listen at 8332, no matter what I "say"...
> > >>>
> > >>> Look:
> > >>>
> > >>> $ cat .bitcoin/bitcoin.conf
> > >>> server=1
> > >>> daemon=1
> > >>> rpcuser=libcoin
> > >>> rpcpassword=LibCoin13
> > >>> rpcport=10332
> > >>> port=10333
> > >>>
> > >>> But:
> > >>>
> > >>> /usr/local/bin/bitcoind
> > >>> Error: Address already in use
> > >>>
> > >>> terminate called after throwing an instance of 'DbException'
> > >>> what():  DbEnv::close: Invalid argument
> > >>> Aborted
> > >>>
> > >>> When I "strace it", I can see:
> > >>>
> > >>> ...
> > >>> bind(12, {sa_family=AF_INET, sin_port=htons(8333),
> sin_addr=inet_addr("0.0.0.0")},

Re: [Bitcoin-development] Adding callback hooks to the satoshi client

2012-03-22 Thread Eric Lombrozo
The callback architecture could be such that other code would never
need to enter into the wallet-handling process/memory space. For
instance, client applications could subscribe a particular URL to get
sent an HTTP POST.

For the apps I've been working on, there really isn't any need to
access the wallet space. I was talking more about events like "A new
transaction was just seen" or "A new block was just seen", like what
libcoin seems to support (sorry, Michael, I haven't really had a
chance to look at it in depth but I will). Then there are other types
of events for other bitcoin messages could also be useful: new addr,
new node connected, node disconnected, bitcoin alert, etc...

Then there are events for dealing with potential attacks: DoS attempt,
double-spend attempts (two transactions seen with valid signatures
claiming the same output), node sending malformed messages, etc...

And then there are alerts pertaining to the status of the bitcoind
process itself: bitcoind started, bitcoind ready to accept
connections, bitcoind stopping, etc...

None of these events require the callback subscriber to have any
access to the bitcoind process/memory space and all the I/O could be
done via IPC or over network sockets.

--
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
___
Bitcoin-development mailing list
Bitcoin-development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bitcoin-development


Re: [Bitcoin-development] Adding callback hooks to the satoshi client

2012-03-22 Thread Luke-Jr
On Thursday, March 22, 2012 1:13:13 AM Eric Lombrozo wrote:
> I would like to propose adding these callback hooks to the main
> branch. I am willing to help locate these key points, reorganize the
> code to place these methods in separate source files, define a callback
> mechanism, and contribute source code.

I'm not sure it's a good idea to let other code into the main wallet-handling 
process/memory space. I'd suggest looking into designing a workable Wallet 
Protocol for general use between the wallet and GUIs/applications.

https://en.bitcoin.it/wiki/Wallet_protocol has a draft I made a long time ago, 
but really seems a bit overcomplicated.

--
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
___
Bitcoin-development mailing list
Bitcoin-development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bitcoin-development


Re: [Bitcoin-development] Announcement: libcoin

2012-03-22 Thread Michael Grønager
What you list below was actually the plan - just havn't gotten there yet, but 
it will be dead easy.

/M


On 22/03/2012, at 11:50, Martinx - ジェームズ wrote:

> Michael,
> 
>  Since libcoin is "chain agnostic", I was wondering if the project can be 
> used like this:
> 
>  When I install it with "make install", I would like to have something like 
> this:
> 
>  Regular file: /usr/local/bin/libcoincore # or whatever you like
> 
>  Symlink -> Regular file
> 
>  /usr/local/bit/bitcoind ->  /usr/local/bin/libcoincore  # bitcoind is a 
> symlink to libcoincore
> 
>  /usr/local/bit/litecoind ->  /usr/local/bin/libcoincore  # litecoind is a 
> symlink to libcoincore
> 
>  /usr/local/bit/devcoind ->  /usr/local/bin/libcoincore  # devcoind is a 
> symlink to libcoincore
> 
>  /usr/local/bit/namecoind ->  /usr/local/bin/libcoincore  # devcoind is a 
> symlink to libcoincore
> 
>  ...and so on...
> 
>  So, libcoincore will interpret the ARGV[0] and, for each string, it will 
> initiate the appropriate internal functions...
> 
>  I don't know if Libcoin already does something like that... I'm not a 
> developer/code reader... Just a small nerd with big ideas...  ^_^
> 
> Thanks!
> Thiago
> 
> 2012/2/28 Michael Grønager 
> Hi again - and thanks for testing and finding this!
> 
> I have fixed the bug you reported:
> 
> The culprit was an implicit string constructor for the ChainAddress that 
> caused creation of a not fully initialized ChainAddress. The right way to do 
> it is using chain::getAddress(string) as the ChainAddress is chain specific.
> 
> A git pull will fix it ;)
> 
> Cheers,
> 
> Michael
> 
> 
> On 27/02/2012, at 20:03, Martinx - ジェームズ wrote:
> 
> > AWESOME!! Thank you!!
> >
> > Anyway, I found a new problem... lol
> >
> > /usr/local/bin/bitcoind getinfo #okay
> > {
> >"version" : 40001,
> >"blocks" : 168753,
> >"connections" : 8,
> >"difficulty" : 1376302.26788638,
> >"testnet" : false
> > }
> >
> > /usr/local/bin/bitcoind getaccountaddress ""  # okay...
> > 1J4vNcvEdeCuLH4yvyoC2gxFEF4zquoJ87
> >
> > /usr/local/bin/bitcoind listaccounts # NOT okay...
> > {
> > }
> >
> > /usr/local/bin/bitcoind getaccountaddress "teste" # okay
> > 1E6pGh6AAtuJdFXheZMp1zdYmvdqAQn9QT
> >
> > /usr/local/bin/bitcoind listaccounts # NOT okay...
> > {
> >"teste" : 0.
> > }
> >
> > Where is my default account listed at "listaccounts" output?!
> >
> > Best,
> > Thiago
> >
> > 2012/2/26 Michael Grønager 
> > And if you do an update now "help" is there too ;)
> >
> > /M
> >
> > On 25/02/2012, at 03:11, Martinx - ジェームズ wrote:
> >
> >> Thank you!!!
> >>
> >> It is all working now! Except "help"...
> >>
> >> Nice work Michael!!
> >>
> >> Best,
> >> Thiago
> >>
> >> 2012/2/24 Michael Grønager 
> >> OK - didn't took the weekend:
> >>
> >> support for "port" is on github now :)
> >>
> >> Only took two lines:
> >>
> >>  ("port", value(&port)->default_value(8333), 
> >> "Listen on specified port for the p2p protocol")
> >>
> >> and using the port option in the Node constructor (was there already):
> >>
> >>  Node node(chain, data_dir, args.count("nolisten") ? "" : "0.0.0.0", 
> >> lexical_cast(port)); // it is also here we specify the use of a 
> >> proxy!
> >>
> >> /M
> >>
> >>
> >>
> >> On 24/02/2012, at 19:49, Martinx - ジェームズ wrote:
> >>
> >>> Hi Michael,
> >>>
> >>> Thank you for your attention!
> >>>
> >>> Now, I'm trying to start libcoin's bitcoind using high ports but, it 
> >>> always try to listen at 8332, no matter what I "say"...
> >>>
> >>> Look:
> >>>
> >>> $ cat .bitcoin/bitcoin.conf
> >>> server=1
> >>> daemon=1
> >>> rpcuser=libcoin
> >>> rpcpassword=LibCoin13
> >>> rpcport=10332
> >>> port=10333
> >>>
> >>> But:
> >>>
> >>> /usr/local/bin/bitcoind
> >>> Error: Address already in use
> >>>
> >>> terminate called after throwing an instance of 'DbException'
> >>> what():  DbEnv::close: Invalid argument
> >>> Aborted
> >>>
> >>> When I "strace it", I can see:
> >>>
> >>> ...
> >>> bind(12, {sa_family=AF_INET, sin_port=htons(8333), 
> >>> sin_addr=inet_addr("0.0.0.0")}, 16) = -1 EADDRINUSE (Address already in 
> >>> use)
> >>> ...
> >>>
> >>> I already tried:
> >>>
> >>> /usr/local/bin/bitcoind --rpcport 10332
> >>> /usr/local/bin/bitcoind --rpcport=10332
> >>>
> >>> Without success...
> >>>
> >>> Thanks again!
> >>> Thiago
> >>>
> >>> 2012/2/24 Michael Grønager 
> >>> Hi Thiago,
> >>>
> >>> Forgot to comment on the two latter:
> >>>
>  $ bitcoind getaccountaddress ""
>  HTTP error code: 401
>  Error: couldn't parse reply from server
> 
>  $ bitcoind listaccounts
>  HTTP error code: 401
>  Error: couldn't parse reply from server
> 
> >>>
> >>> 401 = permission denied - you need to setup username / password either on 
> >>> the commandline or in the bicoin.conf file to access those commands...
> >>>
> >>> See in the bitcoind.cpp file for commands that you can use with and 
> >>> without auth...
> >>>
> >>> Those that contains an "auth" requires auth:
> >>>

Re: [Bitcoin-development] Announcement: libcoin

2012-03-22 Thread Michael Grønager
> 
>  1- How close is Libcoin with original Bitcoin? I mean, the output is a 
> little different, the bitcoind help output was disabled and, I'm afraid that 
> Libcoin can possibly being distant from Bitcoin in the future... That can 
> happen?!

Well, I hope at some point to push libcoin to bitcoin, but that is not for me 
to decide ;)

Anyway, I will strive at keeping the two synced - currently, they are almost in 
sync - even bip 16 is part of libcoin, but I have postponed generation of P2SH 
till after we were certain of 16 vs 17. So that is high on the list. 

I did a presentation of libcoin at BitCon12 in San Antonio - I will trow the 
slides at the web-side asap.

> 
>  2- Do you have plans to update Libcoin on every new upstream Bitcoin 
> release? How fast will be this updates? Do you need more resources/people 
> working on it?

More people is always nice! I am using libcoin for my own bitcoin project, so 
that should guarantee that it will be kept up to date.

>  Another questions not involved directly with Libcoin/Bitcoin but, I'll need 
> it for my future Bitcoin projects, and Libcoin is on my radar:
> 
>  1- Do you know about Diaspora* Project?

Yes, I even have an account :)

>  2- Do you have skills in Ruby on Rails development?

Nope...

/M

> 
> 
> Thank you!
> Thiago
> 
> 2012/3/3 Michael Grønager 
> Hi Martin,
> 
> There are a couple of options of doing similarly...
> 
> In the libcoin repository you will find some code for btc and btcd, it is 
> some code I wrote a while ago and it needs to be updated. It functions as a 
> bitcoind master and slave. The btcd keeps the blockchain, but no wallet. btc 
> keeps the wallet and contact the btcd to get transaction info (like send an 
> address and get its transactions or send a transaction id and get its 
> details). It works (or worked when I wrote them) with the wallet.dat, but 
> needs a little update.
> 
> You could e.g. run one btcd on the machine and several btc instances to get 
> the functionality you asked for.
> 
> Further, btcd also enables a web wallet, where the private keys are stored in 
> your browsers local-store.
> 
> I will get the application updated, but most likely in a bit other setup as 
> it is something I intend to marketize in the near future.
> 
> Hope this answers your question.
> 
> Cheers,
> 
> Michael
> 
> On 03/03/2012, at 02:04, Martinx - ジェームズ wrote:
> 
> > Michael,
> >
> > libcoin is AWESOME! Thanks!!!
> >
> > Can I do the following scenario with libcoin ? :
> >
> > 1- Create a regular Linux user called "blockchain", with home dir pointed 
> > to /var/lib/libcoin/ (more or like Ubuntu/Debian mysql does);
> >
> > 2- Start "bitcoind" under user "blockchain" (the Bitcoin blockchain) will 
> > be downloaded to /var/lib/libcoin/bitcoin/ directory);
> >
> > 3- As another regular user, called "michael", I would like to run 
> > "bitcoind" too but, I do not want to re-download the blockchain to its own 
> > subdir, I want instead, to consult it (blockchain) through libcoin itself 
> > (not by socket of JSON)...
> >
> > So, the /home/michael/.bitcoin/ directory will have only wallet.dat and 
> > related files, not the blockchain.
> >
> > This is more or less what we can do with Bitcoin Electrum alternate client 
> > but, with Electrum, it copy the whole blockchain to mysql... This is 
> > terrible from my point of view, I think that there is no need to duplicate 
> > the blockchain within MySQL in anyway.
> >
> > I just imagine a bitcoin splited in two, blockchain in one side and wallet 
> > in the other side.
> >
> > This is possible with libcoin?!
> >
> > Thank you again!
> >
> > Best,
> > Thiago
> >
> > 2012/2/28 Michael Grønager 
> > Hi again - and thanks for testing and finding this!
> >
> > I have fixed the bug you reported:
> >
> > The culprit was an implicit string constructor for the ChainAddress that 
> > caused creation of a not fully initialized ChainAddress. The right way to 
> > do it is using chain::getAddress(string) as the ChainAddress is chain 
> > specific.
> >
> > A git pull will fix it ;)
> >
> > Cheers,
> >
> > Michael
> >
> >
> > On 27/02/2012, at 20:03, Martinx - ジェームズ wrote:
> >
> >> AWESOME!! Thank you!!
> >>
> >> Anyway, I found a new problem... lol
> >>
> >> /usr/local/bin/bitcoind getinfo #okay
> >> {
> >>   "version" : 40001,
> >>   "blocks" : 168753,
> >>   "connections" : 8,
> >>   "difficulty" : 1376302.26788638,
> >>   "testnet" : false
> >> }
> >>
> >> /usr/local/bin/bitcoind getaccountaddress ""  # okay...
> >> 1J4vNcvEdeCuLH4yvyoC2gxFEF4zquoJ87
> >>
> >> /usr/local/bin/bitcoind listaccounts # NOT okay...
> >> {
> >> }
> >>
> >> /usr/local/bin/bitcoind getaccountaddress "teste" # okay
> >> 1E6pGh6AAtuJdFXheZMp1zdYmvdqAQn9QT
> >>
> >> /usr/local/bin/bitcoind listaccounts # NOT okay...
> >> {
> >>   "teste" : 0.
> >> }
> >>
> >> Where is my default account listed at "listaccounts" output?!
> >>
> >> Best,
> >> Thiago
> >>
> >> 2012/2/26 Michael Grønager 
> >> And if you do a

Re: [Bitcoin-development] Adding callback hooks to the satoshi client

2012-03-22 Thread Michael Grønager
Hi Eric,

What hooks are you looking for in particular ?

libcoin supports registration of listeners for new blocks and new transactions. 
These are e.g. used for connecting the Wallet to the Node.

Cheers,

M


On 22/03/2012, at 06:39, bitcoin-l...@bluematt.me wrote:

> You might also want to check out libcoin. Its a fork of the satoshi client: 
> https://github.com/ceptacle/libcoin
> 
> Matt
> 
> Eric Lombrozo  wrote:
> Hey, guys.
> 
> I've been writing a number of apps that require realtime event
> notifications, where the JSON-RPC API clearly doesn't suffice.
> 
> There are two approaches I've been taking to this end:
> 
> 1) Writing my own library for dealing with raw bitcoin structures and
> connecting to bitcoin nodes via the bitcoin protocol.
> 2) Making custom builds of the satoshi client putting callback hooks
> in key points.
> 
> Neither of these two approaches is ideal. (1) involves a lot of code
> duplication, (2) involves patching the satoshi client source
> each time I grab a later version, with the everpresent risk of
> something breaking and the need to continue maintaining these patches.
> Moreover, unfortunately many of these key points happen to be in files
> like main.cpp which see frequent changes.
> 
> I would like to propose adding these
> callback hooks to the main
> 
> branch. I am willing to help locate these key points, reorganize the
> code
> to place these methods in separate source files, define a callback
> mechanism, and contribute source code.
> 
> -Eric Lombrozo
> 
> 
> This SF email is sponsosred by:
> Try Windows Azure free for 90 days Click Here 
> http://p.sf.net/sfu/sfd2d-msazure
> 
> Bitcoin-development mailing list
> Bitcoin-development@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bitcoin-development
> --
> This SF email is sponsosred by:
> Try Windows Azure free for 90 days Click Here 
> http://p.sf.net/sfu/sfd2d-msazure___
> Bitcoin-development mailing list
> Bitcoin-development@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bitcoin-development

Michael Gronager, PhD
Director, Ceptacle
Jens Juels Gade 33
2100 Copenhagen E
Mobile: +45 31 45 14 01
E-mail: grona...@ceptacle.com
Web: http://www.ceptacle.com/


--
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
___
Bitcoin-development mailing list
Bitcoin-development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bitcoin-development