ChainSafe / ChainSafe/canton-middleware

Standardize ad-hoc / management tasks into component CLIs

Open
#314 1 comment 0 reactions 0 assignees View on GitHub
Type: Feature
Dominant language
Go
Stars
1
Forks
1
Avg merge
40m
Merged PRs (30d)
1

Description

## Description

Replace the bunch of standalone scripts with management subcommands on each component binary (api-server, relayer, indexer). Adopt cobra for subcommand structure.

## Problem

Operational and maintenance tasks currently live as independent scripts under scripts/, each re-implementing its own bootstrapping:
- 43 //go:build ignore scripts in scripts/.
- 37 of them (~86%) re-dial Canton gRPC / Ethereum, re-load config, and/or re-implement OAuth themselves.
- No shared CLI framework — each is a package main with stdlib flag.

## Proposal

Fold ad-hoc/management work into the binary that owns the relevant config + clients, as an admin subcommand tree:

```
api-server serve
api-server migrate up
api-server admin token bootstrap
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by inventorying the 43 //go:build ignore scripts under scripts/ and the entry points for the api-server, relayer, and indexer binaries. Review how those scripts bootstrap Canton gRPC, Ethereum, configuration, and OAuth before planning the Cobra command trees. Done means the relevant management tasks live under the owning component CLIs instead of standalone scripts.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
backend, cli
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.