Skip to content
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

Events parsing v2 milestone 2 #338

Merged
merged 18 commits into from
Jun 20, 2023

Conversation

cdamian
Copy link
Contributor

@cdamian cdamian commented Mar 15, 2023

Changes related to the second milestone of the GSRPC V2 grant, related links:

1st milestone PR

w3f/Grant-Milestone-Delivery#753

w3f/Grant-Milestone-Delivery#762

@codecov
Copy link

codecov bot commented Mar 15, 2023

Codecov Report

Merging #338 (297c606) into event-parsing-v2 (772451a) will not change coverage.
The diff coverage is n/a.

❗ Current head 297c606 differs from pull request most recent head b9da36e. Consider uploading reports for the commit b9da36e to get more accurate results

@@                Coverage Diff                @@
##           event-parsing-v2     #338   +/-   ##
=================================================
  Coverage             63.63%   63.63%           
=================================================
  Files                     1        1           
  Lines                    11       11           
=================================================
  Hits                      7        7           
  Misses                    2        2           
  Partials                  2        2           

@cdamian cdamian force-pushed the events-parsing-v2-milestone-2 branch 4 times, most recently from 412d4bf to 15ad7d4 Compare March 22, 2023 03:23
Copy link
Contributor

@mikiquantum mikiquantum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great already.
I believe we would need to add a Call/Extrinsic parser that uses the CallRegistry to parse the extrinsics of a block. Aside of that I think there is not much left to do on this one, except the milestone artifacts.

registry/parser/parser.go Outdated Show resolved Hide resolved
@cdamian cdamian force-pushed the events-parsing-v2-milestone-2 branch from 15ad7d4 to d4a18a6 Compare March 26, 2023 16:41
Copy link
Contributor

@mikiquantum mikiquantum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cdamian this is great! Just a few comments but this is almost ready to go.

rpc/chain/generic/chain.go Show resolved Hide resolved
registry/registry.go Outdated Show resolved Hide resolved
rpc/chain/generic/block.go Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
Copy link
Contributor

@mikiquantum mikiquantum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Feel free to change the PR for final review 🙏

registry/retriever/extrinsic_retriever_live_test.go Outdated Show resolved Hide resolved
@cdamian cdamian marked this pull request as ready for review June 16, 2023 19:19
@mikiquantum mikiquantum merged commit 35c4b61 into event-parsing-v2 Jun 20, 2023
@cdamian cdamian deleted the events-parsing-v2-milestone-2 branch June 20, 2023 13:27
@mikiquantum mikiquantum restored the events-parsing-v2-milestone-2 branch June 20, 2023 21:08
cdamian added a commit that referenced this pull request Jul 4, 2023
* milestone: Add type registry and test

* milestone1: Add metadatas from multiple chains and docker file for tests

* events: Add decoders for each event field type

* registry: Add decoders

* registry: Add retryable executor and use it in parser

* registry: Add mocks and more tests

* registry: Use BitVec when parsing bit sequences

* test: Add more mocks and tests

* registry: Update field name retrieval

* registry-test: Get headers instead of blocks

* Add generic chain RPC, more tests, and Dockerfiles for the 2nd milestone

* make: Add container name

* chain: Add constructor for default chain

* registry: Change field separator to

* parser: Add DefaultExtrinsicParser and DefaultExtrinsic

* retriever: Add DefaultExtrinsicRetriever and adjust tests

* rpc: Add more comments to default entities

* retriever: Enable all live tests
cdamian added a commit that referenced this pull request Jul 5, 2023
* events: Add initial metadata parsing logic

* events: Add override decoding funcs, add support for primitive arrays

* events: Extract decode type def

* events: Add event parsing test script, provide more details in error messages

* events: Add variant support for vectors

* milestone 1: Add type registry and test (#327)

* milestone: Add type registry and test

* milestone1: Add metadatas from multiple chains and docker file for tests

* registry: Add methods to create call and error registries

* dockerfile: Fix test Dockerfile

* registry: Add more tests

* Events parsing v2 milestone 2 (#338)

* milestone: Add type registry and test

* milestone1: Add metadatas from multiple chains and docker file for tests

* events: Add decoders for each event field type

* registry: Add decoders

* registry: Add retryable executor and use it in parser

* registry: Add mocks and more tests

* registry: Use BitVec when parsing bit sequences

* test: Add more mocks and tests

* registry: Update field name retrieval

* registry-test: Get headers instead of blocks

* Add generic chain RPC, more tests, and Dockerfiles for the 2nd milestone

* make: Add container name

* chain: Add constructor for default chain

* registry: Change field separator to

* parser: Add DefaultExtrinsicParser and DefaultExtrinsic

* retriever: Add DefaultExtrinsicRetriever and adjust tests

* rpc: Add more comments to default entities

* retriever: Enable all live tests

* Add registry readme (#351)

* Fix docker run for w3f milestone 2 tests (#353)

* Address review milestone 2 (#355)

* add configurable event threshold

* Add natural language desc on event parsing

* make: Remove grant related targets

---------

Co-authored-by: Miguel Hervas <[email protected]>
Co-authored-by: Nikhil Ranjan <[email protected]>
kroos47 pushed a commit to availproject/go-substrate-rpc-client that referenced this pull request Sep 26, 2023
…#326)

* events: Add initial metadata parsing logic

* events: Add override decoding funcs, add support for primitive arrays

* events: Extract decode type def

* events: Add event parsing test script, provide more details in error messages

* events: Add variant support for vectors

* milestone 1: Add type registry and test (centrifuge#327)

* milestone: Add type registry and test

* milestone1: Add metadatas from multiple chains and docker file for tests

* registry: Add methods to create call and error registries

* dockerfile: Fix test Dockerfile

* registry: Add more tests

* Events parsing v2 milestone 2 (centrifuge#338)

* milestone: Add type registry and test

* milestone1: Add metadatas from multiple chains and docker file for tests

* events: Add decoders for each event field type

* registry: Add decoders

* registry: Add retryable executor and use it in parser

* registry: Add mocks and more tests

* registry: Use BitVec when parsing bit sequences

* test: Add more mocks and tests

* registry: Update field name retrieval

* registry-test: Get headers instead of blocks

* Add generic chain RPC, more tests, and Dockerfiles for the 2nd milestone

* make: Add container name

* chain: Add constructor for default chain

* registry: Change field separator to

* parser: Add DefaultExtrinsicParser and DefaultExtrinsic

* retriever: Add DefaultExtrinsicRetriever and adjust tests

* rpc: Add more comments to default entities

* retriever: Enable all live tests

* Add registry readme (centrifuge#351)

* Fix docker run for w3f milestone 2 tests (centrifuge#353)

* Address review milestone 2 (centrifuge#355)

* add configurable event threshold

* Add natural language desc on event parsing

* make: Remove grant related targets

---------

Co-authored-by: Miguel Hervas <[email protected]>
Co-authored-by: Nikhil Ranjan <[email protected]>
MRamanenkau added a commit to Cerebellum-Network/go-substrate-rpc-client that referenced this pull request Feb 7, 2024
* client: Expose close function (centrifuge#311)

* fix of account-info structure (centrifuge#309)

Co-authored-by: Andriy <[email protected]>

* types: Update the dispatch info weight (centrifuge#323)

* types: Update anonymous proxy created event (centrifuge#324)

* change retarded uint8 to uint16 for networkid (centrifuge#339)

* fix: typos in `README` (centrifuge#348)

* fix: typos in `README`

* doc: add missing section

* Update event types (centrifuge#349)

* event: Update treasury events

* types: Add Orml Asset Registry events

* types: Update CurrencyID

* events: Adjust CustomMetadata for Orml events (centrifuge#354)

* Add events and extrinsics parsing logic based on metadata (centrifuge#326)

* events: Add initial metadata parsing logic

* events: Add override decoding funcs, add support for primitive arrays

* events: Extract decode type def

* events: Add event parsing test script, provide more details in error messages

* events: Add variant support for vectors

* milestone 1: Add type registry and test (centrifuge#327)

* milestone: Add type registry and test

* milestone1: Add metadatas from multiple chains and docker file for tests

* registry: Add methods to create call and error registries

* dockerfile: Fix test Dockerfile

* registry: Add more tests

* Events parsing v2 milestone 2 (centrifuge#338)

* milestone: Add type registry and test

* milestone1: Add metadatas from multiple chains and docker file for tests

* events: Add decoders for each event field type

* registry: Add decoders

* registry: Add retryable executor and use it in parser

* registry: Add mocks and more tests

* registry: Use BitVec when parsing bit sequences

* test: Add more mocks and tests

* registry: Update field name retrieval

* registry-test: Get headers instead of blocks

* Add generic chain RPC, more tests, and Dockerfiles for the 2nd milestone

* make: Add container name

* chain: Add constructor for default chain

* registry: Change field separator to

* parser: Add DefaultExtrinsicParser and DefaultExtrinsic

* retriever: Add DefaultExtrinsicRetriever and adjust tests

* rpc: Add more comments to default entities

* retriever: Enable all live tests

* Add registry readme (centrifuge#351)

* Fix docker run for w3f milestone 2 tests (centrifuge#353)

* Address review milestone 2 (centrifuge#355)

* add configurable event threshold

* Add natural language desc on event parsing

* make: Remove grant related targets

---------

Co-authored-by: Miguel Hervas <[email protected]>
Co-authored-by: Nikhil Ranjan <[email protected]>

* events: Add ORML tokens events (centrifuge#358)

* registry: Add overrides for field decoders (centrifuge#359)

* Change fields format to slice (centrifuge#360)

* registry: Add decoded fields as slice, add helper methods for retrieving values

* types: Remove unnecessary tests

* registry: Update return type of composite decoder to DecodedFields

* registry: Add ErrorID for ErrorRegistry, remove encode/decode for DecodedField

* registry: Add more tests for overrides

* registry: Reset storages when creating registries

* docs: Update godoc link (centrifuge#364)

* Polkadot update v0.9.43 (centrifuge#366)

* types: Update AccountInfo

* tests: Update tests

* client: Add CallContext to Client interface

* deps: Update go version, polkadot docker image

* lint: Obey

* deps: Update subkey to v2

* address: Return account ID creation error

* Remove extraneous output (centrifuge#343)

* Fix compilation errors

* Update to v8

---------

Co-authored-by: Cosmin Damian <[email protected]>
Co-authored-by: 1llusion1st <[email protected]>
Co-authored-by: Andriy <[email protected]>
Co-authored-by: Pierre <[email protected]>
Co-authored-by: Léo Vincent <[email protected]>
Co-authored-by: Miguel Hervas <[email protected]>
Co-authored-by: Nikhil Ranjan <[email protected]>
Co-authored-by: Felipe <[email protected]>
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.

3 participants