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

Node: Initial implementation and responses #66

Merged
merged 4 commits into from
Oct 31, 2023
Merged

Conversation

johnyob
Copy link
Collaborator

@johnyob johnyob commented Oct 24, 2023

Context

Related Tasks: Create a RPC node, Response Getter

The jstz_node will be a side-car service to the jstz rollup node. It's purpose will be communicating with the rollup using external messages, the kernel.log file (which we will eventually refactor into a one-way channel), and reading storage from the rollup node.

Description

Dependencies: #64, #77

This PR implements:

  • The initial jstz_node binary: a HTTP server (using actix-web) with logging.
  • The GET /operations/<hash>/receipt endpoint (using Rollup) to read the receipt from the rollup node's durable storage

Manually testing the PR

# terminal 1
cargo run --bin jstz -- sandbox start
# terminal 2
cargo run --bin jstz-node 
# terminal 3
cargo run --bin jstz -- run "tezos://tz4.../"
Signed operation: ...

Using the hash h from the signed operation, curl http://localhost:8933/operations/<h>/receipt

@johnyob johnyob force-pushed the ajob410@node/responses branch 2 times, most recently from 9c5b0d1 to f3f4c28 Compare October 27, 2023 11:29
@johnyob johnyob changed the base branch from main to ajob410@kernel/signed-operations October 27, 2023 11:29
@johnyob johnyob mentioned this pull request Oct 27, 2023
@johnyob johnyob changed the title Node: Initial implementation Node: Initial implementation and responses Oct 27, 2023
Copy link
Collaborator

@alanmarkoTrilitech alanmarkoTrilitech left a comment

Choose a reason for hiding this comment

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

It looks good except some minor issues. I think it would be great to have a design doc or atleast an overview comment in main or elsewhere describing what jstz_node module does.

jstz_node/src/main.rs Outdated Show resolved Hide resolved
jstz_node/src/main.rs Outdated Show resolved Hide resolved
jstz_node/src/services/operations.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@sam-finch-tezos sam-finch-tezos left a comment

Choose a reason for hiding this comment

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

Approved, but will trust you to address @alanmarkoTrilitech's comments

@johnyob johnyob force-pushed the ajob410@kernel/signed-operations branch from cc786d4 to d151db5 Compare October 30, 2023 16:28
@johnyob johnyob force-pushed the ajob410@node/responses branch 2 times, most recently from 2e375c7 to 67ad895 Compare October 30, 2023 16:41
Base automatically changed from ajob410@kernel/signed-operations to main October 30, 2023 16:41
…point

This commit creates the `jstz_node` binary: a HTTP server (using actix-web)
with logging. Additionally it implements the GET /operations/<hash>/receipt
endpoint (using `Rollup`) to read the receipt from the rollup node's durable
storage.
@johnyob
Copy link
Collaborator Author

johnyob commented Oct 30, 2023

@alanmarkoTrilitech ping for reapproval

@alanmarkoTrilitech
Copy link
Collaborator

I can't run cargo run --bin jstz-node due to this error:

...
223393c14" "-Wl,-dead_strip" "-nodefaultlibs"
  = note: ld: framework not found SystemConfiguration
          clang-11: error: linker command failed with exit code 1 (use -v to see invocation)
          

error: could not compile `jstz_node` (bin "jstz-node") due to previous error

Copy link
Collaborator

@alanmarkoTrilitech alanmarkoTrilitech left a comment

Choose a reason for hiding this comment

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

LGTM! I would still prefer though if there was an overview comment or design doc atleast for top level modules.

@johnyob
Copy link
Collaborator Author

johnyob commented Oct 31, 2023

I'll add an asana task for a design doc of the jstz-node

@johnyob johnyob merged commit 458e091 into main Oct 31, 2023
5 checks passed
@johnyob johnyob deleted the ajob410@node/responses branch October 31, 2023 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants