Skip to content

Remove account registration/deregistration and ingestion filtering#510

Merged
aditya1702 merged 688 commits intomainfrom
remove-filtering
Mar 6, 2026
Merged

Remove account registration/deregistration and ingestion filtering#510
aditya1702 merged 688 commits intomainfrom
remove-filtering

Conversation

@aditya1702
Copy link
Copy Markdown
Contributor

@aditya1702 aditya1702 commented Feb 22, 2026

What

Remove all code related to account registration/deregistration.

Why

We have decided to keep wallet backend simple and store everything like a normal indexer would. If the need for a register/deregister workflow arises in the future, we will re-evaluate and add the logic then.

Known limitations

N/A

Issue that this PR addresses

Closes #520

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Removes the “registered accounts” concept end-to-end (API, services, ingestion filtering, persistence), aligning the wallet backend with an “index everything” indexer-style model.

Changes:

  • Removed account registration/deregistration from GraphQL schema/resolvers, the wbclient, and related services/tests.
  • Removed participant-based ingestion filtering and simplified ingestion persistence to always insert full buffer contents.
  • Dropped the accounts table + “active accounts” metrics and updated fee-bump eligibility/tests to rely on channel_accounts.

Reviewed changes

Copilot reviewed 43 out of 45 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
pkg/wbclient/types/types.go Removes register/deregister request/response types from the client types package.
pkg/wbclient/queries.go Removes GraphQL mutation builders for register/deregister.
pkg/wbclient/client.go Removes Client.RegisterAccount / Client.DeregisterAccount methods and payload wrappers.
openapi/main.yaml Deletes the OpenAPI spec (previously included account registration + tx endpoints).
internal/services/ingest_test.go Removes participant-filtering-related tests/fixtures and DB setup for accounts.
internal/services/ingest_live.go Stops filtering ingestion data; inserts full buffer into DB and returns inserted tx/op counts directly.
internal/services/ingest_backfill.go Removes participant filtering step in backfill flush; inserts full buffer.
internal/services/ingest.go Deletes filtering helpers/types and refactors insertIntoDB to read directly from buffer.
internal/services/fee_bump_service_test.go Updates fee-bump tests to make eligibility depend on channel_accounts instead of accounts.
internal/services/account_service_test.go Removes tests for the deleted account service.
internal/services/account_service.go Removes the account registration/deregistration service implementation.
internal/serve/serve.go Removes AccountService wiring and the filtering config flag from server deps/config.
internal/serve/graphql/schema/mutations.graphqls Removes registerAccount / deregisterAccount mutations and related input/payload types.
internal/serve/graphql/resolvers/transaction_resolvers_test.go Updates metrics expectations to use transactions_accounts instead of accounts.
internal/serve/graphql/resolvers/test_utils.go Removes accounts table setup/teardown from resolver test DB utilities.
internal/serve/graphql/resolvers/statechange_resolvers_test.go Updates metrics expectations to use state_changes (via state-change-based account lookup) instead of accounts.
internal/serve/graphql/resolvers/resolver.go Removes AccountService dependency and filtering flag from resolver constructor/config.
internal/serve/graphql/resolvers/queries_resolvers_test.go Updates account query test to reflect “always return account object” semantics.
internal/serve/graphql/resolvers/queries.resolvers.go Simplifies AccountByAddress to return an account object without DB lookup.
internal/serve/graphql/resolvers/operation_resolvers_test.go Updates metrics expectations to use operations_accounts instead of accounts.
internal/serve/graphql/resolvers/mutations_resolvers_test.go Removes register/deregister mutation tests and the mocked account service.
internal/serve/graphql/resolvers/mutations.resolvers.go Removes register/deregister resolver implementations and associated imports.
internal/serve/graphql/resolvers/errors.go Removes account registration/deregistration error message constants.
internal/serve/graphql/generated/models_gen.go Removes generated models for register/deregister inputs/payloads.
internal/serve/graphql/generated/generated.go Removes generated schema/runtime code for register/deregister mutations and payload types.
internal/metrics/mocks.go Removes mock methods for active-account metrics.
internal/metrics/metrics_test.go Removes tests for the active-accounts metric.
internal/metrics/metrics.go Removes active-accounts metric and interface methods.
internal/loadtest/runner.go Removes participant-filtering config from loadtest ingest service wiring.
internal/integrationtests/main_test.go Removes registration-related integration test suite invocation.
internal/integrationtests/accounts_register_test.go Removes integration test suite that validated registration + participant filtering.
internal/ingest/ingest.go Removes EnableParticipantFiltering config and wiring into the ingest service.
internal/indexer/indexer_buffer_test.go Removes GetAllParticipants tests and merge behavior tests tied to filtering support.
internal/indexer/indexer_buffer.go Removes global participant tracking (allParticipants) and related methods/merge/clear logic.
internal/indexer/indexer.go Removes GetAllParticipants from the IndexerBufferInterface.
internal/db/migrations/2024-04-29.1-accounts.sql Removes the migration that created/dropped the accounts table.
internal/db/migrate_test.go Updates migration ordering expectations after removing the accounts migration.
internal/data/transactions_test.go Removes test setup inserts into the deleted accounts table.
internal/data/statechanges_test.go Removes test setup inserts into the deleted accounts table.
internal/data/operations_test.go Removes test setup inserts into the deleted accounts table.
internal/data/accounts_test.go Removes tests for deleted CRUD/lookup APIs; updates remaining tests/metrics labels for join-table-based account lookups and channel-account fee-bump eligibility.
internal/data/accounts.go Removes accounts-table CRUD and registered-account eligibility; updates fee-bump eligibility + metrics labels and keeps join-table batch lookups.
cmd/utils/global_options.go Removes CLI option for participant filtering.
cmd/serve.go Removes participant-filtering flag wiring from the serve command.
cmd/ingest.go Removes participant-filtering flag wiring from the ingest command.
Comments suppressed due to low confidence (1)

openapi/main.yaml:1

  • This PR deletes the entire OpenAPI spec (openapi/main.yaml). If the intent is only to remove registration/deregistration endpoints, consider updating the spec to reflect the remaining REST surface (e.g., fee-bump / transaction build) rather than removing it, since other repo docs/tools may rely on this file for API documentation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread internal/serve/graphql/resolvers/queries.resolvers.go Outdated
@aristidesstaffieri
Copy link
Copy Markdown
Contributor

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

🤖 Generated with Claude Code

- If this code review was useful, please react with 👍. Otherwise, react with 👎.

Base automatically changed from timescale to main March 6, 2026 18:27
aditya1702 and others added 2 commits March 6, 2026 13:28
@aditya1702 aditya1702 merged commit 74963e5 into main Mar 6, 2026
9 checks passed
@aditya1702 aditya1702 deleted the remove-filtering branch March 6, 2026 18:35
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.

Remove account registration/deregistration logic

3 participants