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

Rest: add /{network}/epochProgram/:epoch_number #3370

Open
wants to merge 3 commits into
base: mainnet-staging
Choose a base branch
from

Conversation

ghostant-1017
Copy link
Contributor

No description provided.

@@ -70,6 +70,10 @@ rev = "d170a9f"
default-features = false
optional = true

[dependencies.snarkvm-ledger-puzzle-epoch]
Copy link
Contributor

Choose a reason for hiding this comment

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

Ideally we expose this via snarkvm::prelude or some other reference to avoid having to reimport a snarkVM crate here. Especially one that will require updating the rev.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Shall I create another PR for snarkVM to reimport the crate?

node/rest/src/routes.rs Outdated Show resolved Hide resolved
@@ -209,6 +210,20 @@ impl<N: Network, C: ConsensusStorage<N>, R: Routing<N>> Rest<N, C, R> {
}
}

// GET /<network>/epoch_program/{epochNumber}
Copy link
Contributor

Choose a reason for hiding this comment

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

How does the user know what epoch number is the latest?

Copy link
Contributor Author

@ghostant-1017 ghostant-1017 Jul 31, 2024

Choose a reason for hiding this comment

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

Users can use /latest/height or /latest/block to get the latest block height and calculate the epoch_number

@raychu86 raychu86 requested a review from d0cd July 30, 2024 18:56
@raychu86
Copy link
Contributor

raychu86 commented Jul 30, 2024

What is the intention of this PR? Please provide a description.

@ghostant-1017
Copy link
Contributor Author

ghostant-1017 commented Jul 31, 2024

What is the intention of this PR? Please provide a description.

There is a scenario where EpochProgram needs to be distributed from the Server to the Provers, we actually have a fork, and it seems reasonable to provide as much information as possible in the snarkOS RPC, so I propose to merge it.

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.

2 participants