GithubHelp home page GithubHelp logo

subgraph's Introduction

Subgraph Monorepo

//@TODO

subgraph's People

Contributors

tuler avatar brunomenezes avatar gbarros avatar dandheedge avatar nevendyulgerov avatar dependabot[bot] avatar majdeddinea avatar

Stargazers

Eray avatar  avatar Jonny Dubowsky avatar

Watchers

 avatar James Cloos avatar Erick de Moura avatar  avatar  avatar  avatar

subgraph's Issues

Add Unit Test on Pool Performance calculation

๐Ÿ“„ Context

The Pool Performance should have the unit test to check whether the calculation is accurate. The unit test should also check for the handler behind it.

๐ŸŽฏ Definition of Done

  • Unit test should cover the logic behind the calculation
  • Test Coverage should be at least 60%

Update to latest rollups 0.9.0

๐Ÿ“„ Context

The cartesi/rollups library v0.9.0 was released, so we need to upgrade the rollups-subgraph package to start using the new stable version.

๐Ÿ“ˆ Subtasks

  • Update the package.json to the new fixed version.
  • Make sure dependencies are updated in the lock file (yarn.lock).
  • Verify whether everything is working as expected.

๐ŸŽฏ Definition of Done

  • All CI checks are passing.
  • Subgraph can index on the Goerli network.
  • Subgraph can index on the Goerli Arbitrum network.

Remove new Gas-Based pool event handling

๐Ÿ“„ Context

We are streamlining the creation of a staking pool in our front end, offering only the flat-rate option. Today, only 1 gas-based pool is deployed on Mainnet and is "inactive". Hence, also removes the handling of new Gas-based staking pools, stopping the indexing.

โœ”๏ธ Solution

Remove the handling of NewGasTaxCommissionStakingPool in the code.

Extra info: Gas-based pool on mainnet 0x8fa412526a1a2506a03c1d3b23cdf1f6dcc8bbb1

๐Ÿ“ˆ Subtasks

  • Remove logic to handle NewGasTaxCommissionStakingPool
  • Remove any subgraph template declarations
  • Remove any test related to that event handling

๐ŸŽฏ Definition of Done

  • API is not returning any gas-based pool after indexing.
  • CI is passing.

Remove eligibility package

๐Ÿ“„ Context

That is a feature we were pursuing in 2021, but it was put on hold, and never came back to the priority list. So it is arguably a candidate to be removed.

โœ”๏ธ Solution

Remove the package and also the github-action related to that.

๐Ÿ“ˆ Subtasks

  • Remove the eligibility package
  • Remove the github-action eligibility
  • Remove Eligibility entity type
  • Remove references of Eligibility from the template yaml files

Upgrade environments with latest subgraph changes

๐Ÿ“„ Context

Code updates were done to provide the performance calculation from the subgraph. So we need to deploy through the environments.

๐Ÿ“ˆ Subtasks

  • Generate a new Tag v3.4.1
  • Deploy subgraph on AWS production environment (Goerli | Mainnet)
  • Deploy subgraph to the graph hosted services (Goerli | Mainnet)

๐ŸŽฏ Definition of Done

  • All the environments (i.e. AWS and Hosted services) have the last subgraph version running.

Update Matchstick-AS

๐Ÿ“„ Context

We use the matchstick-as library for unit testing the logic of the handler. It is good to keep up with evolution and not fall behind. Currently, the pos-subgraph and rollups-subgraph packages are using version 0.5.0.

๐Ÿ“ˆ Subtasks

  • Update the package.json to the new fixed version ( i.e. no ^ or ~ )
  • Check the release changelog for new features that could benefit the current base code.
  • Create the corresponding issue if an update requires major work.
  • Make sure dependencies are updated in the lock file (yarn.lock).
  • Verify whether everything is working as expected. i.e. run the tests using the new version.

refactor: Task list definition on issue-templates

๐Ÿ“„ Context

Fix the issue template task list. There is too much space applied when using on github UI after pressing enter it thinks it is a bullet point and not a task list item.

โœ”๏ธ Solution

Remove the extra spaces in all the templates.

๐Ÿ“ˆ Subtasks

  • Remove the extra spaces in all the templates. i.e. [feature, technical debt, update-dependencies, documentation]

๐ŸŽฏ Definition of Done

  • When creating an issue based on one of the templates mentioned above adding a new task list item works as expected.

Upgrade rollups library to its latest version

๐Ÿ“„ Context

Upgrade the rollups library to its latest version, i.e. v0.9.1.

๐Ÿ“ˆ Subtasks

  • Update the package.json to the new fixed version ( i.e. no ^ or ~ )
  • Create the corresponding issue if an update requires major work.
  • Make sure dependencies are updated in the lock file (yarn.lock).
  • Verify whether everything is working as expected.

Update graph-ts and graph-cli

๐Ÿ“„ Context

We use @graphprotocol/graph-cli and @graphprotocol/graph-ts. The CLI for reading the manifest, compiling the mappings to AssemblyScript and other actions and the graph-ts provides APIs to access the graph node store, data on IPFS, etc. We need to upgrade the libraries to their latest version, currently [email protected] and [email protected]

๐Ÿ“ˆ Subtasks

  • Check the changelog for new features or any changes.
  • Update the package.json to the new fixed version ( i.e. no ^ or ~ )
  • Create the corresponding issue if an update requires major work.
  • Make sure dependencies are updated in the lock file (yarn.lock).
  • Verify whether everything is working as expected. i.e. Running the tests and indexing a subgraph using the new versions.

Add deployment automation for PoS [Preview Environment]

๐Ÿ“„ Context

Currently, we do the Subgraph deployment manually. Since we moved to Chainstack and already have Subgraph Hosted Services, it would be good to automate the deployment of our Subgraph solution.

โœ”๏ธ Solution

Create a GitHub action to build and publish the subgraph changes once merged into the main branch (target is preview environment).

๐Ÿ“ˆ Subtasks

  • Add required secrets for GitHub Actions:
    • Secrets to interface with Subgraph Hosted Services API.
    • Secrets to interface with Chainstack API
  • Create the GitHub action to automate deployment for the main branch changes.
    • Deploy subgraph on Hosted Services. [Preview]
    • Deploy subgraph on Chainstack service. [Preview]
  • Add any extra task in case of oversight [Optional]

๐ŸŽฏ Definition of Done

  • Subgraph changes are reflected with success in the Hosted service.
  • Subgraph changes are reflected with success in the Chainstack service.

Feat: Support ahead of time input-added event

๐Ÿ“„ Context

For the rollups v0.9.0, An InputAdded event could be submitted to a DApp that has not been created yet, by the usual pipeline; i.e. through the CartesiDAppFactory contract. It is necessary to handle such cases, distinguish the DApp origin, and deal with the aggregations done in factories and dashboard levels.

โœ”๏ธ Solution

Include a state to the DApp data structure to help distinguish it and also below a list of things to be handled;

  • Add a new property to the DApp entity in the graphQL schema called status that is of type enum with the following values [CREATED_BY_FACTORY, CREATED_BY_INPUT_ADDED_EVT]
  • DApp creation should now signal through the status property the origin.
  • If the DApp does not exist when handling the InputAddedevent
    • A new DApp should be created with an input count of 1
    • It should set the status signalling that it was created via input-added,
    • factory property should be a placeholder, i.e. virtual_factory.
    • It should not increment the dashboard aggregations like, e.g. dappCount | inputCount
    • Otherwise, it follows the currently implemented behaviour.
  • When handling an ApplicationCreated and the DApp already exist;
    • it should update the status signalling creation by the factory.
    • It should add the DApp's input count to the Factory and Dashboard input-count fields, respectively.
    • it should update the factory property to the factory address.

๐Ÿ“ˆ Subtasks

  • Add the new enum definition to the graphQL schema.
  • Add a new required field to the DApp entity called status typed as the enum defined above.
  • Increment the application-created events for v0.6 and v0.8 to include the status (these versions are not affected by the problem)
  • Augment handler code for the application-created event for v0.9 covering the abovementioned situation.
  • Augment handler code for the input-events from InputBox contract covering the abovementioned situation.
  • Include unit tests.

๐ŸŽฏ Definition of Done

  • InputAdded events to non-existing DApps do not cause the indexing to fail.

Add information in the main README

๐Ÿ“„ Context

  • Reporting a typo.
  • Reporting a documentation bug.
  • Documentation improvement.
  • Documentation feedback.

Is there a specific documentation page you are reporting?

Main README documentation

Additional context or description

It is important to provide information about the repository for whoever lands on the repository page.

As a starter:

  • How the repository is structured.
  • Links to the other packages that may or may not have their own README's.
  • How we release new versions of the subgraph packages.

Assess Chainstack as a Subgraph Hosting provider

๐Ÿ“„ Context

As we will sunset the AWS infrastructure for the subgraph, we are looking for a new subgraph host provider where we don't need to take care of the infra.

โœ”๏ธ Solution

We will assess the Chainstack to be that provider.

๐Ÿ“ˆ Subtasks

  • Check on what protocol and networks are supported. e.g. Ethereum mainnet and testnets (Goerli / Sepolia)
  • Check on what monitoring tools are available.
  • Verify how the included requests in a Plan work. e.g. is just the request between subgraph <---> archive node, or it also includes the request to the graphQL API. We're moving with the growth plan for now.
  • Deploy PoS for the Goerli and Mainnet network. Considering preview and production environments.

Remove Goerli related content

๐Ÿ“„ Context

The Goerli testnet decommission is overdue, and mainly, the technologies supporting it, e.g. Metamask, are starting to remove it as an option, so there is no point in keeping its definitions and code supported here.

sidenote: Staking web application is not using it anymore.

โœ”๏ธ Solution

Remove all code, scripts, and template definitions related to Goerli. Below are a few subtasks for obvious places to check, but don't be limited to that maybe there are other unused networks that could also be removed.

๐Ÿ“ˆ Subtasks

  • Update npm-scripts if any.
  • Update subgraph templates, if any.
  • Update graphql schema if necessary.
  • Update hardhat files.

๐ŸŽฏ Definition of Done

  • All Goerli related code is removed.

Add deployment automation for Rollups [Preview Environment]

๐Ÿ“„ Context

Currently, we do the Subgraph deployment manually. Since we moved to Chainstack and already have Subgraph Hosted Services, it would be good to automate the deployment of our Subgraph solution.

โœ”๏ธ Solution

Create a GitHub action to build and publish the subgraph changes once merged into the main branch (target is preview environment).

๐Ÿ“ˆ Subtasks

  • Add required secrets for GitHub Actions:
    • Secrets to interface with Subgraph Hosted Services API.
    • Secrets to interface with Chainstack API
  • Create the GitHub action to automate deployment for the main branch changes.
    • Deploy subgraph on Hosted Services. [Preview]
    • Deploy subgraph on Chainstack service. [Preview]
  • Add any extra task in case of oversight [Optional]

๐ŸŽฏ Definition of Done

  • Subgraph changes are reflected with success in the Hosted service.
  • Subgraph changes are reflected with success in the Chainstack service.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.