Skip to content

[Enhancements] Performance optimizations and best practices#7

Open
Ciaran-Lundy wants to merge 17 commits intoagent0lab:mainfrom
Ciaran-Lundy:code_cleaning
Open

[Enhancements] Performance optimizations and best practices#7
Ciaran-Lundy wants to merge 17 commits intoagent0lab:mainfrom
Ciaran-Lundy:code_cleaning

Conversation

@Ciaran-Lundy
Copy link

@Ciaran-Lundy Ciaran-Lundy commented Feb 20, 2026

This PR contains performance optimizations for the Agent0 subgraph that introduce minor schema changes. These changes implement best practices for subgraph development, and can offer increased indexing speed, while having minimal impact on subgraph data.

This PR contains the following changes:

  • Updating manifest specVersion
  • Updating graph-cli and graph-ts npm packages
  • Specifying auto pruning rule
  • Making entities immutable
  • Specifying grafting and hotfixing rules
  • Removing unused code
  • Completing network validation
  • Replacing duplicated code with helper functions
  • completing missing network mappings
  • updating contract-addresses
  • adding verbosity to the script build-all.js.
  • Changing unbounded lists of agents to derived fields
  • Setting Id types to Bytes
  • Changing ambiguous GlobalStats entity to ProtocolStats

Please note:

  • Enabling the pruning feature will result in the inability to perform time-travel queries.
  • Entity IDs are no longer good query targets, avoid querying by id directly. Instead use where clauses with explicit fields such as where: { protocol_id: "11155111", agentId: "374" }

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.

2 participants