-
Notifications
You must be signed in to change notification settings - Fork 251
feat(rpc/vccv2): enhanced vcc data aggregator #740
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
base: master
Are you sure you want to change the base?
Conversation
coderofstuff
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comments from Michael:
- remove merged blocks headers from high verbosity (we can always add it with an even higher verbosity)
- support min confirmation count feature on v2 as well
- rename v_2 to v2
- evaluate performance costs of this api under TPS stretch and if required, decide how to keep it under control
Additional: Ensure that the new RPC, it's arguments and everything that goes in there is added into WASM. There must be an rpc.getVirtualChainFromBlockV2 that can be used through wasm
GetVirtualChainFromBlockV2Response now has chain_block_accepted_transactions
Vspc2 coder
All of the point but performance evaluation have been addressed. Still some cleaning tasks to be done and some change in low-level utxo inquirer (panic-safe related). Other than that, it's in a testable state. |
This PR is a follow-up to @D-Stacks initial effort here.
It is not in final state, take it as a base of discussion for future efforts.
What?
It allows gathering more data than the current vcc endpoint in a non-breaking change way, in particular
acceptance_data. It is a way for network observers to solely follow vccv2 without having to keep a parallel listener on added block (and potential sender resolver on top of it). Example, end-users can now rely on vccv2 and get: accepted DAA score, accepting block, sender address for each transaction that gets accepted.Since the endpoint can become chatty, @D-Stacks introduced a granular verbosity selector (at field level). We found it could be difficult to manipulate as an end-users so we introduced verbosity level instead.
Example usage:
To avoid user confusion about populated fields, comment documentations have been added. It is yet to be determined how to translate this for
wasmusers.Identified Flaws
response.added_acceptance_data[n].mergeset_block_acceptance_data[m].accepted_transactions[k].verbose_datawhich should instead be equal toNonein case verbosity is set toNone(none ofverbose_datafields are showed on such verbosity level)Verbosity Level
They are incremental, meaning a verbosity level of 2 (High) would include every fields defined at a verbosity level of 1 (Low).
To get a detailed view, I suggest two entry-point:
Use-case
As a network observer needing acceptance data tracking at a transaction level, I can now solely rely (see identified flaws 1.) on this endpoint given the fact i have a block hash checkpoint (last scanned/ingested block).
In such case, I'd call the new endpoint with a verbosity level fitting my requirements, in this example i'll provide "Low":
An example of usage is provided here. With its current state, consider it a playground.
Open questions
Future possibilities
NotifyVirtualChainChangedV2