Skip to content

Abci proof (formerly tmsp proof)#372

Closed
ethanfrey wants to merge 3 commits intodevelopfrom
abci_proof
Closed

Abci proof (formerly tmsp proof)#372
ethanfrey wants to merge 3 commits intodevelopfrom
abci_proof

Conversation

@ethanfrey
Copy link
Contributor

This is an update of PR #356 please take a look there for the conversation and some interesting discussion on tmsp in general.

Anyway, this exposed the proof command from an abci app through the tendermint rpc layer, in a similar way as how query is handled. We can discuss best practices for now, but this branch is good to use for building demos with proofs for now.

@ethanfrey ethanfrey mentioned this pull request Jan 17, 2017
@codecov-io
Copy link

Current coverage is 50.05% (diff: 33.33%)

Merging #372 into develop will increase coverage by 0.25%

@@            develop       #372   diff @@
==========================================
  Files            37         37          
  Lines          4450       4453     +3   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits           2216       2229    +13   
+ Misses         2022       2013     -9   
+ Partials        212        211     -1   

Powered by Codecov. Last update a073b1d...00d4157

@ebuchman
Copy link
Contributor

Wanted to go back to comment you made in previous PR about removing query/proof and letting apps expose it however they want. That sounds good in theory, but what about chained tmsp apps? Ie. if you want to get a proof from basecoin, but basecoin uses merkleeyes .... basecoin can expose a custom proof rpc for the user, but what should merkleeyes expose to basecoin? should basecoin not be using merkleeyes over abci ? or should it expose the query/proof stuff separately, and make basecoin connect to both endpoints (one for driving txs, one for getting info) ?

It already feels silly to use merkleeyes in basecoin. Shouldn't be just use go-merkle directly? Why bother with the extra serialization steps to pack a (get, key) or a (set, key, value) into a tx ?

@jaekwon
Copy link
Contributor

jaekwon commented Jan 21, 2017

It already feels silly to use merkleeyes in basecoin. Shouldn't be just use go-merkle directly? Why bother with the extra serialization steps to pack a (get, key) or a (set, key, value) into a tx ?

We can eventually but we're putting these cuffs on so we can grow our non-golang ecosystem. So the question may be, how serious are we about supporting non-golang apps?

It would make a lot more sense if we're using a container orchestration tool. Then we can focus on supporting the orchestration tool and all app programmers can benefit from it.

@ethanfrey
Copy link
Contributor Author

I agree with the point of exposing proofs for a non-go application. However, I think the approach from merkleeyes is a bit problematic for two reasons:

  1. The proof returned can currently only be decoded and verified with go code. It is not too hard to port that logic, but without it, it is hard to truly say proofs (and thus the main purpose of the merkle-tree) are cross-language

  2. A deeper problem is the semantics of the abci interface do not align with the semantics one expects from a database query. To truly make merkleeyes some language-agnostic, merkle-proofing, key-value store (which seems to be the goal), we need another interface than abci. Here is why:

When I make a query to tendermint core (and thus an abci app), I expect the value to correspond with some block that was committed, ideally along with the block height corresponding to that answer, so I can request a proof later. I do not expect to read intermediate values from an in-progress block. Or is this a false understanding?

When I make a query on my data store from within an app, I expect to have a choice of which version I see, last committed block, or current working state, like an uncommitted transaction in a database. I did this relatively simply in merkleeyes using Tree.Copy to maintain a few states, but nothing before the last saved/commited state. This allows abci queries to be routed to the last committed state, while the application code can read/write on the current working state.

I believe this is a more "correct" approach to querying the data. But maybe I am wrong? If so, ocrrect me and ignore the rest of this post.

If we want to keep these different views for different users, we discover that there is no clean way to do this over abci. So basically, we have to embed this logic in-process (as I did in merkleeyes), or provide a proper network interface to go-merkle that models what we want to use a data store for, not how we use abci apps.

I never did understand this concept of chaining abci apps, as if abci is some sort of universal protocol. It seems a very good interface between business logic and consensus in building a blockchain, but not the best formulation for interfacing with a database. I really suggest building out its own protocol if that is what merkleeyes should be (at which point, it is basically a re-write).

There may have been some longer discussions on these points long ago, which bring up some issues which I am totally ignorant of, and if so, please correct me here.

@jaekwon
Copy link
Contributor

jaekwon commented Jan 28, 2017

Committed an alternative solution w/ the more general Query interface. Closing.

@jaekwon jaekwon closed this Jan 28, 2017
@ebuchman ebuchman deleted the abci_proof branch April 19, 2017 02:38
adrianbrink pushed a commit to heliaxdev/tendermint that referenced this pull request May 23, 2023
* Docs fixes (tendermint#368)

* fixing broken link quick-start (tendermint#319)

* fix link to point to relative page (tendermint#319)

* fix link to point to rpc page (tendermint#319)

* fix link that works for rpc (tendermint#319)

* adding front matter to trigger hooks (tendermint#319)

* add frontmatter to adr page (tendermint#319)

* make link to configuration page relative (tendermint#319)

* remove irrelevant text (tendermint#319)

* updating relative link and removing irrelevant text (tendermint#319)

* remove front matter from ADR (tendermint#319)

* fixing broken links unders docs/tools (tendermint#319)

* fixing broken links under spec/core (tendermint#319)

* fixing broken links in spec/abci home (tendermint#319)

* fix uparrows rendering and broken links (tendermint#319)

* fixing links, comments on abci methods (tendermint#319)

* fixing links in tutorials (tendermint#319)

* adding a landing page for Apps (tendermint#319)

* renaming qa v0.34 page to show in navigation (tendermint#319)

* rename title of page for navigation (tendermint#319)

* fixing links on abci client server (tendermint#319)

* changes to allow RPC top level navigation on docs site (tendermint#319)

* fixing some more broken references (tendermint#319)

* reverting link change as per review (tendermint#319)

* reverting link change as per review (tendermint#319)

* reverting link in app-dev as per review (tendermint#319)

(cherry picked from commit 28baba3)

# Conflicts:
#	docs/core/rpc.md
#	docs/tools/debugging.md
#	docs/tutorials/go-built-in.md
#	docs/tutorials/go.md

* Fixed conflicts

* Update docs/tools/debugging.md

* change the rpc link (tendermint#372)

* change another rpc link (tendermint#372)

* remove the inspect command information (tendermint#372)

* change one more rpc link (tendermint#372)

* update link to point to the release instead of main (tendermint#372)

* change quotes (tendermint#372)

---------

Co-authored-by: Andy Nogueira <me@andynogueira.dev>
Co-authored-by: Adi Seredinschi <a@seredinschi.net>
Co-authored-by: Adi Seredinschi <adizere@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants