public inbox for bitcoindev@googlegroups.com
 help / color / mirror / Atom feed
From: "Jorge Timón" <jtimon@jtimon•cc>
To: Tamas Blummer <tamas@bitsofproof•com>
Cc: Bitcoin Dev <bitcoin-dev@lists•linuxfoundation.org>,
	Libbitcoin <libbitcoin@lists•dyne.org>
Subject: Re: [bitcoin-dev] Libconsensus separated repository (was Bitcoin Core and hard forks)
Date: Sun, 30 Aug 2015 00:08:24 +0200	[thread overview]
Message-ID: <CABm2gDoPdysXRrcrrgH6mizDMpwN7JPr5EOzfrgoXWcgb9fVYA@mail.gmail.com> (raw)
In-Reply-To: <C486E9D9-D799-48B9-B80F-1A165DFD6536@bitsofproof.com>

On Sat, Aug 22, 2015 at 1:04 PM, Tamas Blummer <tamas@bitsofproof•com> wrote:
> On Aug 21, 2015, at 21:46, Jorge Timón <jtimon@jtimon•cc> wrote:
>
> On Thu, Aug 20, 2015 at 10:35 AM, Tamas Blummer <tamas@bitsofproof•com>
> wrote:
>
> Every re-implementation, re-factoring even copy-paste introduces a risk of
> disagreement,
> but also open the chance of doing the work better, in the sense of software
> engineering.
>
>
> But you don't want something better, you want something functionally
> identical.
> You may want to watch sipa's explanation on why "the implementation is
> the specification" and the reasons to separate libconsensus:
> https://youtu.be/l3O4nh79CUU?t=764
>
>
> I do want something better, but not for the focus you have.
>
> Not because what you produce was not high quality, but because quality is
> achieved at a very
> high cost and is hard to uphold over generations of developer. You focus on
> a single use case
> while there are many out there for distributed ledgers.
>
> I think in an infrastructure for enterprise applications, building consensus
> on the ledger is a
> cornerstone there, but is only a piece of the solution. I built several
> commercially successful
> deployments where I delegated the consensus building to a border router, a
> Bitcoin Core,
> then interfaced that trusted peer with my  implementation that accepted
> Core’s decisions
> in an SPV manner. One might think of this setup as wasteful and unsuitable
> for “small devices”
> therefore an example of centralization people here try to avoid.
>
> Enterprises have sufficient resources. Solving the business problem is
> valuable to them even at
> magnitudes higher cost than a hobbyist would bear.
>
> For mainstream adoption you need to get enterprises on board too, and  that
> is what I care of.
> Enterprises want code that is not only high quality, but is easy to maintain
> with a development
> team with high attrition. One has to take whatever help is offered for that,
> and one is modern
> languages and runtimes.
>
> Bits of Proof’s own implementation of the scripts was not practically
> relevant in my commercially
> successful deployments, because of the use of a border router, but it helped
> development,
> enabling easier debug and precise error feedback esp. end even after Core
> had a reject message.

In fact I have been accused in the past (by at least Peter Todd) of
having "too many cases in mind" or "doing refactors that are good for
altchains".
That's why I'm very cautious about proposing changes that are not
strict improvments in maintainability to bitcoin itself.
But I actually have freicoin, sidechains and private chains (defined
in freimarkets, used in elements alpha as "block signing") in mind.
Some of the consensus changes I have in mind are support for multiple
assets or interest-bearing assets, for example.
But if you need to change the consensus rules you need to change the
code, there's no way around that.
It will be much simpler to only adapt libconsensus to other chains
than it is to adapt the whole Bitcoin Core code base.
Libconsensus can free you from the need of running "border routers"
(which you need to adapt if you depend on them and are supporting
chains with different rules).
When libconsensus has it's own independent repository, will I fork the
project to have a multi-consensus library supporting multiple
different chains (apart from bitcoin and its testchains)? Maybe, I'm
not sure it makes sense, maybe it's just simpler to maintain a
different project for each different chain (ie libfreicoinconsensus,
libbetaconsensus, etc).

> I integrated libconsensus only for the hope that is significantly fastens
> application side tx verification,
>  which it has turned out it does not, until secp265k1 is integrated.

That is very sad to hear. The main reason to integrate libconsensus is
to avoid consensus fork bugs (or to not depend on the "border routers"
to avoid those bugs).

> I would likely use an other extended libconsensus too, but do not think
> there was a dependency on
> that for enterprise development.
>
> It would help there more to have a slim protocol server, no wallet, no rpc,
> no qt but a high
> performance remoting API.

That's out of scope for libconsensus which will be stateless and whose
only API would be in C.
But the refactors in Bitcoin Core will hopefully make it easier to
support such a minimal node in it (you know you can "./configure
--disable-wallet --without-gui" already, right?, about RPC, that's the
remaining API!).

> Since you already depend on libconsensus for VerifyScript, wouldn't it
> be nice that it also offered VerifyTx, VerifyHeader and VerifyBlock?
> You would still have complete control over storage, concurrency,
> networking, policy...
> My plan is for the C API to interface with the external storage by
> passing a function pointer to it.
>
>
> Storage and validation is non-trivially interconnected, but I now the
> separation can be done,
> since I did it.
>
> Excuse me, but function pointers is a pattern I used in the 80’s. I know
> that they are behind
> the curtain of modern abstractions with similar use, I still prefer not to
> see them again.

Yes, and the wheel it's an invention used in pre-historic times: that
doesn't make it less useful.
Do you have any other suggestion for interfacing with external storage
using a C API?


  parent reply	other threads:[~2015-08-29 22:08 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-23 14:30 Jorge Timón
2015-07-23 14:57 ` Milly Bitcoin
2015-07-23 21:02   ` Jorge Timón
2015-07-23 21:30     ` Milly Bitcoin
2015-07-28  6:40 ` Eric Voskuil
2015-07-28  8:47   ` Wladimir J. van der Laan
2015-07-28  9:58   ` Jorge Timón
2015-07-29 20:38     ` Eric Voskuil
2015-07-29 21:46       ` Jorge Timón
2015-08-20  0:53         ` Jorge Timón
2015-08-20  7:14           ` Tamas Blummer
2015-08-20  8:06             ` Jorge Timón
2015-08-20  8:35               ` Tamas Blummer
2015-08-20 17:44                 ` Matt Corallo
2015-08-20 21:26                   ` Tamas Blummer
2015-08-20 21:35                     ` Matt Corallo
2015-08-21  6:46                       ` Tamas Blummer
2015-08-21 19:46                 ` Jorge Timón
2015-08-21 20:07                   ` Eric Lombrozo
2015-08-22 11:04                   ` Tamas Blummer
2015-08-23  1:23                     ` Eric Lombrozo
2015-08-23  2:19                       ` Eric Lombrozo
2015-08-23  6:42                       ` Tamas Blummer
2015-08-29 23:30                         ` Jorge Timón
2015-08-29 23:25                       ` Jorge Timón
2015-08-29 22:08                     ` Jorge Timón [this message]
2015-07-28  8:43 ` Wladimir J. van der Laan
2015-07-28 10:09   ` Jorge Timón

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CABm2gDoPdysXRrcrrgH6mizDMpwN7JPr5EOzfrgoXWcgb9fVYA@mail.gmail.com \
    --to=jtimon@jtimon$(echo .)cc \
    --cc=bitcoin-dev@lists$(echo .)linuxfoundation.org \
    --cc=libbitcoin@lists$(echo .)dyne.org \
    --cc=tamas@bitsofproof$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox