ethereum-optimism / ethereum-optimism/optimism
Standardization Request: use one of `generic`/`da-service` commitment type everywhere
- Dominant language
- Go
- Stars
- 6.5k
- Forks
- 4k
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 145
Description
Right now both of these names are used interchangeably, both in the spec
and in the code.
This leads to [redundant variables](https://github.com/ethereum-optimism/optimism/blob/5a1a18d0ceedc40aad99baf4359e06f09fc7b718/bedrock-devnet/devnet/__init__.py#L278) that literally have the same function:
```
if GENERIC_ALTDA:
docker_env['ALTDA_GENERIC_DA'] = 'true'
docker_env['ALTDA_SERVICE'] = 'true'
else:
docker_env['ALTDA_GENERIC_DA'] = 'false'
docker_env['ALTDA_SERVICE'] = 'false'
```
Both ALTDA_GENERIC_DA and ALTDA_SERVICE are used for the exact same purpose, but in different services (op-batcher/node use da-service, whereas da-server uses generic).
Would be preferable to use a single variable, as well as flag naming convention everywhere. I like `generic` better, but open to either. I can make a PR to refactor this if needed.
Contributor guide
Research direction
Start with bedrock-devnet/devnet/__init__.py around the GENERIC_ALTDA environment setup, then compare the da-service naming in op-batcher/node with the generic naming in da-server and the spec. The work is done when one agreed commitment-type and flag naming convention is used consistently without redundant variables across the referenced services.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, python
- Domain
- backend, devops
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100