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

Generate IPLD blocks table and related GQL API #260

Merged
merged 21 commits into from
Oct 12, 2021

Conversation

prathamesh0
Copy link
Collaborator

@prathamesh0 prathamesh0 commented Oct 4, 2021

Part of cerc-io/watcher-ts#23

Implemented:

  • IPLDBlock entity generation.
  • Post-block hook to populate IPLDBlock table (Done in a separate queue).
  • Fetching last derived state (IPLDBlock) for a contract + GQL API.
  • GQL API to fetch an IPLDBlock by CID.
  • Addition of CID field in blocks of existing watchers.
  • Genesis state hook.
  • Derived state checkpointing (Done in a separate queue).
  • Corresponding changes in existing watchers.

@prathamesh0 prathamesh0 self-assigned this Oct 4, 2021
prathamesh0 and others added 3 commits October 7, 2021 13:42
* GQL API for getting last derived state

* Rename query to getState

* Change query names to getState and getStateByCid

* Save BigInt as string
@ashwinphatak ashwinphatak changed the title WIP: Generate IPLD blocks table WIP: Generate IPLD blocks table and related GQL API Oct 7, 2021
@prathamesh0 prathamesh0 force-pushed the pm-codegen-ipld branch 2 times, most recently from 3ae7674 to f374e93 Compare October 11, 2021 10:29
@prathamesh0 prathamesh0 force-pushed the pm-codegen-ipld branch 2 times, most recently from 3dfad85 to 2364312 Compare October 11, 2021 13:40
@prathamesh0 prathamesh0 changed the base branch from main to codegen October 12, 2021 09:15
@ashwinphatak ashwinphatak changed the title WIP: Generate IPLD blocks table and related GQL API Generate IPLD blocks table and related GQL API Oct 12, 2021
@ashwinphatak ashwinphatak merged commit e3ae36f into vulcanize:codegen Oct 12, 2021
@ashwinphatak ashwinphatak deleted the pm-codegen-ipld branch October 12, 2021 10:32
prathamesh0 added a commit that referenced this pull request Oct 21, 2021
* Add ipld-blocks entity generation

* Populate ipld-blocks table

* Rename ipld-block entity and update after each event

* Move ipld-hook to hooks.ts

* Change IPLD block structure

* Add cid field in blocks

* Fetch prev. IPLDBlock for a contract

* GQL API to query IPLDBlock by CID

* Save cid in blocks in existing watchers

* Update codegen docs

* GQL API for getting last derived state (#3)

* GQL API for getting last derived state

* Rename query to getState

* Change query names to getState and getStateByCid

* Save BigInt as string

* Move function to prepare IPLDBlock to indexer

* Refactor IPLDBlock hook

* Add genesis hook

* Call post-block hook after a block is marked as complete

* Add IPLDBlock checkpointing

* Use queryRunner instead of a new repo for queries

* Add a query to get block in ipld-eth-client

* Get latest checkpoints for all contracts for checkpointing.

* Call post-block hook in a queue

* Pass server config to Indexer in watch-contract cli

Co-authored-by: nikugogoi <[email protected]>
prathamesh0 added a commit that referenced this pull request Dec 6, 2021
* Add ipld-blocks entity generation

* Populate ipld-blocks table

* Rename ipld-block entity and update after each event

* Move ipld-hook to hooks.ts

* Change IPLD block structure

* Add cid field in blocks

* Fetch prev. IPLDBlock for a contract

* GQL API to query IPLDBlock by CID

* Save cid in blocks in existing watchers

* Update codegen docs

* GQL API for getting last derived state (#3)

* GQL API for getting last derived state

* Rename query to getState

* Change query names to getState and getStateByCid

* Save BigInt as string

* Move function to prepare IPLDBlock to indexer

* Refactor IPLDBlock hook

* Add genesis hook

* Call post-block hook after a block is marked as complete

* Add IPLDBlock checkpointing

* Use queryRunner instead of a new repo for queries

* Add a query to get block in ipld-eth-client

* Get latest checkpoints for all contracts for checkpointing.

* Call post-block hook in a queue

* Pass server config to Indexer in watch-contract cli

Co-authored-by: nikugogoi <[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