ethereum-optimism / ethereum-optimism/specs

Make altda server api more RESTful

Open
#433 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
178
Forks
206
Avg merge
5d 2h
Merged PRs (30d)
6

Description

**Is your feature request related to a problem? Please describe.**

The altda [server spec](https://specs.optimism.io/experimental/alt-da.html#da-server)

![image](https://github.com/user-attachments/assets/70c0aace-1bfd-49b4-975e-0c8e1b169a2f)

has redundant (and confusing) path prefixes. Specifically, the /put/ and /get/ prefixes are redundant with the HTTP method, and in the case of /put/ is actually confusing because the POST method is used instead of PUT.

The Richardson Maturity Model https://martinfowler.com/articles/richardsonMaturityModel.html gives a theoretical framework for why having verbs in the route is bad practice (http verbs are for verbs, paths are supposed to be nouns). In practice, when implementing the routing for the da server, it means I need duplicate routes for /put/commitments and /get/commitment, whereas this should have the same route (just commitment) and router will allow both GET and POST methods against it.

**Describe the solution you'd like**

Would like to clean up the routes to look like
```
POST /
POST /
GET /
```
or perhaps to be more clear and self-documenting
```
POST /keccak/
POST /generic
GET /
```

Can make this change and keep the old routes if we want to maintain backward compatibility.

**Describe alternatives you've considered**

**Additional context**

Contributor guide

Open the contributing guide

Research direction

Start with the altda server spec's DA server section and compare the current /put/ and /get/ routes with the proposed route shapes in the issue. Determine the intended compatibility policy, then update the specification consistently so the route methods, paths, and commitment formats are unambiguous.

Written by the indexing model from the issue text.

Assessment

Domain
api, backend-api-design, documentation
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.