-
Notifications
You must be signed in to change notification settings - Fork 391
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add address_getAppearances
#453
base: main
Are you sure you want to change the base?
Conversation
Why are you forcing the user to use hex numbers? It makes the endpoint harder to use for no good reason. I think we should explicitly say that both integers and hex are accepted. I understand that some of the |
Good suggestion Edit: The acceptance of a block number as a JSON |
As raised by @sslivkoff, the
In this PR I have a section for the rationale for the namespace being a new one. Which is that it makes explicit that a client must create a new index/indices to serve methods in that namespace.
One thought is that whatever namespace is chosen, it should not be used for methods that do not require the index that the namespace implies. So for a trite example |
Here is a classification scheme that might be useful: derivative vs non-derivative Non-derivativeNote that the following methods can be delivered by a node that doesn't implement an additional
Another example is
To include any of the above methods under the same namespace would prevent their use in a node configured to not create the additional Potential appropriate namespaces:
DerivativeSome examples of possible derivative methods that would require the
For methods that are derivatives, like the last three above, the Potential appropriate namespaces:
|
not sure if this is what youre suggesting but I believe a 1:1 mapping of namespaces to indexes would be too restrictive. for example there will be different indexes to support the reason why I suggested a more general namespace like |
As these methods apply to different clients, the new namespace seemed like the clearest system to introduce the standard. If introducing new namespaces is really more of a burden for clients, that is good to know.
Would be interested to hear more about this. What mechanism do you think is best for node operators to enact this through? Perhaps leave it to client implementations to sort out (e.g. CLI or Perhaps the following could be part of the spec in this PR?: ## New `query` namespace
- Namespace: `query`
- Ethereum protocol requirements: Not required for participation in the Ethereum protocol
- Definition: A collection of methods for retrieving chain data for a variety of applications.
- Method requirements:
- Specification: method name, method paramaters, response format
- Dependencies: A list of methods that the method depends upon, if any.
- Implicit data requirements: A description of any indexes or data structures the method requires.
Do not include indexes implied by the `eth` namespace or already covered by a dependency. Users can read client docs and see that the available methods, their requirements and dependencies. There could be a few groups that tend to be turned on or off together.
Once support for If the database claim above is true, the specs for the following methods would be as follows: - `query_getCreator`
- Dependencies: `query_getAppearances`
- `query_getTransactionsSent`
- Dependences: `query_getAppearances` A user that starts some client with |
yes as a node operator I would want to either use a json config file or a cli arg to specify a list of optional index names, e.g. maybe I missed it, why is it that |
There's something I think that is SUPER important that you'all should not ignore. That's the issue of what I call (a-complete) is important because the solution that's needed is reconcilable state re-creation. All other use cases are subsets of this (other than indexes related to other data types -- I'm not commenting on that here). (For example, we have a (b-compact) the use case I think that's most important is the small entity/person on a smaller machine. Size of hard drive storage on disc is very important. The smaller the better because that increases the number of people who can afford to have permissionless access. (c-simple) there's a very low probability that this will ever make it into the node software. To the extent it gets more and more complicated, that probability decreases. It will be hard enough to convince people to do the weird things you have to do to make it complete. Overcomplicating it will make it that much harder. Plus--two things: (1) sub-options can be accomplished (like (4-sharable) this, to me, is the most important thing. If you build a complicated, heavy, hard to implement, hard to maintain index, only a few super-technical people will "have it." We want every human to have it (in the best world) or every human to have undeniable, permissionless access to it (in an okay-but-not-great world). This is what Unchained Index is all about. With the complete index, if it's chunked, one can place a Bloom filter in front of each chunk and share only the Bloom filters with the entire world -- through, for example, a smart contract. Then, each user can download and pin only those chunks of the index they need. Small guy 1 gets small portion 1. Small guy 2 gets small portion 2. Giant Uniswap user gets the entire index. All of them pin the Bloom filters and the index portions they hold. In this way, over time the entire world has permissionless, uncensorable (and thereby zero-cost) access to the entire index. This should be built in from the start. |
👍
Suppose an address has appeared in 100 transactions.
One cannot have
❤️ |
You make a good case for The real win here is two different clients being able to come to this repo and see a spec clearly layed out and implement it using this standard. Which is then very handy for users and devs who may use and swap between multiple clients. A unified |
ok I see now. so an appearances index supports multiple methods by performing some extra steps and leveraging other indices that already exist on the node
another possible name besides
💪 has anyone temperature checked this with the erigon devs? |
Good idea. I have posted a link to this PR in the Erigon discord |
I sort of tempature-checked these ideas with Eriogn about three years ago. (If fact, I used to work with that team.) Back then, they were talking about adding the ability to do optional "modules," and I was exploring that idea, but they sort of abandoned that. If you mention the work we've done on TrueBlocks, the entire Erigon team will be familiar with the idea of an "appearance." I've spoken to all of them about it numerous times. @ledgerwatch definitely knows what I mean by an |
I found this PR while looking for previous efforts to add a method fetching all transaction hashes of an address. It's surprising that we have a method returning the nonce but no method giving the nth tx hash. What would be needed to take this a step further ? Would love to see it included |
I'm not being flippant, but I really think the first thing that's needed is a champion. The feature is very clearly needed, and (at least to me), it's very clearly needed inside the node software. But the lift is pretty heavy. A champion would be the first thing required, I think. |
Description
Introduction of a method that returns all historical transactions associated with an address on Ethereum.
Motivation
Upon installation of an archive node, a user is unable to get a basic history of their own wallet history. This history might
include a number of kinds of interactions including receiving ether by CALL-style opcodes (so called "internal transactions"). These are not accessible to an archive node user without re-executing the entire chain or using external sources of data.
This PR introduces a method that fixes that.
Nodes that opt in to implement
address_getAppearances
enable dapp developers to create local user interfaces that contain historical information as well as current state.Background
The UnchainedIndex consists of "address appearances". It is a distributed index constructed by calling an Ethereum node using the trueblocks-core software (https://github.com/TrueBlocks/trueblocks-core). It finds addresses as they appear in each block and publishes the index.
Users may then find and obtain a part of that index and then query their node to get more information.
This system has proven that there is real demand for a user to be able start with an address, and discover specific transactions. By introducing this method into an archive node, users would gain this ability out of the box.
Changes made
address_
namespaceaddress_getAppearances
method for fetching every "address appearance" of a single address.address_
namespaceTest case generator
A test case generator has been written (https://github.com/perama-v/unchained-reader). It uses data from the trueblocks-core (
chifra list <address>
) to create test cases for individual addresses (across all blocks).Dependencies
The concept of "address appearances" is introduced and specified in the following PR:
Future considerations
The data supporting the
address_
namespace allows other methods to be proposed. For exampleaddress_getInteractions(wallet_address, dapp_address)
which could return the intersection of transactions that contain a user wallet and a dapp contract. Such an endpoint would not create much additional work on top of the baseaddress_getAppearances
.