Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a document for espresso-dev-node #1722

Merged
merged 14 commits into from
Jul 31, 2024
Merged

Add a document for espresso-dev-node #1722

merged 14 commits into from
Jul 31, 2024

Conversation

ImJeremyHe
Copy link
Member

@ImJeremyHe ImJeremyHe commented Jul 17, 2024

#1682

This PR:

  • Add a markdown file for espresso-dev-node
  • Ensure the container exits on Ctrl+C

This PR does not:

Publish this document

Key places to review:

  • To see if any other thing we need to mention in this document
  • The changes on the script

How to test this PR:

Run the container and then Ctrl+C

docker run ghcr.io/espressosystems/espresso-sequencer/espresso-dev-node:jh-dev-node-docmusl

It will exit successfully.

doc/espresso-dev-node.md Outdated Show resolved Hide resolved
doc/espresso-dev-node.md Outdated Show resolved Hide resolved
doc/espresso-dev-node.md Outdated Show resolved Hide resolved

## Parameters

| Name | Type | Environment Variable | Description |
Copy link
Collaborator

Choose a reason for hiding this comment

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

We should also specify what the default behavior is if arguments are not provided.

doc/espresso-dev-node.md Outdated Show resolved Hide resolved
doc/espresso-dev-node.md Outdated Show resolved Hide resolved
| ------ | ------- | ---------------------------------------- |
| height | integer | The L1 height from which hotshot is down |

### POST /api/set-hotshot-up
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm curious if we really need both endpoints. could we just have post /api/hotshot or similar which which reacted on the basis of current state of hotshot (like a toggle). Also since these are POSTs, it might be reasonable to move the command to the POST body. just a thought

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes that makes sense. I don't have any though about which is better. But the parameters of these 2 endpoints are totally different. I think we don't have to combine these into only 1.

Copy link
Contributor

Choose a reason for hiding this comment

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

Humm yea but it is POST, so if we do something like RPC we could just have a command input, and the request bodies would all differ based on the command. But anyway it not really import

By calling this, the L1 height in the light contract will be frozen, and rollups will detect the HotShot failure. This
is intended for testing rollups' functionalities when HotShot is down.

Parameters
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm assuming these parameters are set in the POST body, but I don't see this stipulated anywhere. I think it could be helpful to show an example request with curl which shows exactly what the request looks like.

Copy link
Member Author

Choose a reason for hiding this comment

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

[`builder`](https://docs.espressosys.com/sequencer/api-reference/builder-api),
[`sequencer`](https://docs.espressosys.com/sequencer/api-reference/sequencer-api), and `prover`.

In addition, you can access the `dev_node_port` to retrieve debugging information. Here are the details of the dev node
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider linking to the toml specification or generated docs (if we generate documentation from the specification).

Copy link
Member Author

@ImJeremyHe ImJeremyHe Jul 24, 2024

Choose a reason for hiding this comment

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

The toml specification is used to generate an HTML doc for users accessing to a wrong route/endpoint. Of course we can also link the toml file here, but just a bit weird. And builder api page doesn't link anything, so I just followed the conventions.

Copy link
Contributor

Choose a reason for hiding this comment

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

builder api documentation should also link to spec 😃 (IMO) .

@ImJeremyHe ImJeremyHe requested a review from imabdulbasit as a code owner July 30, 2024 04:29
@ImJeremyHe ImJeremyHe requested a review from tbro July 31, 2024 00:36
Copy link
Contributor

@tbro tbro left a comment

Choose a reason for hiding this comment

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

I'm approving since my comments where mostly suggestions anyway. Hopefully we can keep some of them in mind for future improvements.

@ImJeremyHe ImJeremyHe merged commit 09dc76a into main Jul 31, 2024
14 checks passed
@ImJeremyHe ImJeremyHe deleted the jh/dev-node-doc branch July 31, 2024 05:12
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.

3 participants