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

feat(rpc): introduce getblocktemplate rpc call with stub fields #5462

Merged
merged 4 commits into from
Oct 26, 2022

Conversation

oxarbitrage
Copy link
Contributor

@oxarbitrage oxarbitrage commented Oct 22, 2022

Motivation

This is pretty much what i have in mind for #5451

It introduces the rpc call and all the fields using mostly strings as placeholders. All data will be filled in the other tickets, this is kind of the skeleton.

This is a draft, feel free to suggest changes.

Solution

Introduce getblocktemplate rpc methjod, return empty GetblockTemplate struct on call.

Review

Reviewer Checklist

  • Will the PR name make sense to users?
    • Does it need extra CHANGELOG info? (new features, breaking changes, large changes)
  • Are the PR labels correct?
  • Does the code do what the ticket and PR says?
  • How do you know it works? Does it have tests?

Follow Up Work

@github-actions github-actions bot added the C-feature Category: New features label Oct 22, 2022
@codecov
Copy link

codecov bot commented Oct 22, 2022

Codecov Report

Merging #5462 (575e89d) into main (95517bd) will increase coverage by 0.11%.
The diff coverage is n/a.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5462      +/-   ##
==========================================
+ Coverage   79.10%   79.21%   +0.11%     
==========================================
  Files         308      309       +1     
  Lines       39324    39351      +27     
==========================================
+ Hits        31107    31172      +65     
+ Misses       8217     8179      -38     

Copy link
Contributor

@teor2345 teor2345 left a comment

Choose a reason for hiding this comment

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

Looks good, but I think longpollid is out of scope for now.

zebra-rpc/src/methods/get_block_template.rs Outdated Show resolved Hide resolved
@mpguerra mpguerra linked an issue Oct 24, 2022 that may be closed by this pull request
5 tasks
Copy link
Contributor

@teor2345 teor2345 left a comment

Choose a reason for hiding this comment

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

I wonder if we want to use underscores to match the rest of the RPC implementations.

zebra-rpc/src/methods/get_block_template.rs Outdated Show resolved Hide resolved
zebra-rpc/src/methods/get_block_template.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@teor2345 teor2345 left a comment

Choose a reason for hiding this comment

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

Looks good!

I think this is a high priority, because it renames the module that all the other RPCs are in. If we don't get it merged soon, it will cause code conflicts.

@teor2345 teor2345 marked this pull request as ready for review October 26, 2022 01:04
@teor2345 teor2345 requested a review from a team as a code owner October 26, 2022 01:04
@teor2345 teor2345 requested review from upbqdn and removed request for a team October 26, 2022 01:04
@teor2345 teor2345 added A-rust Area: Updates to Rust code P-High 🔥 A-rpc Area: Remote Procedure Call interfaces labels Oct 26, 2022
@teor2345 teor2345 changed the title feat(rpc): introduce getblocktemplate rpc call feat(rpc): introduce getblocktemplate rpc call with stub fields Oct 26, 2022
mergify bot added a commit that referenced this pull request Oct 26, 2022
@mergify mergify bot merged commit fae9473 into main Oct 26, 2022
@mergify mergify bot deleted the issue5451 branch October 26, 2022 02:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rpc Area: Remote Procedure Call interfaces A-rust Area: Updates to Rust code C-feature Category: New features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Introduce getblocktemplate RPC method
3 participants