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

refactor: migrate MinerGetBaseInfo, StateCall to trait RpcMethod #4244

Merged
merged 6 commits into from
Apr 19, 2024

Conversation

aatifsyed
Copy link
Contributor

Summary of changes

Changes introduced in this pull request:

Reference issue to close (if applicable)

Closes

Other information and links

Change checklist

  • I have performed a self-review of my own code,
  • I have made corresponding changes to the documentation,
  • I have added tests that prove my fix is effective or that my feature works (if possible),
  • I have made sure the CHANGELOG is up-to-date. All user-facing changes should be reflected in this document.

@aatifsyed aatifsyed requested a review from a team as a code owner April 19, 2024 13:10
@aatifsyed aatifsyed requested review from ruseinov and elmattic and removed request for a team April 19, 2024 13:10

async fn handle(
ctx: Ctx<impl Blockstore + Send + Sync + 'static>,
(LotusJson(message), LotusJson(ApiTipsetKey(tsk))): Self::Params,
Copy link
Contributor

Choose a reason for hiding this comment

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

Hope we can get rid of LotusJson wrappers in Params as well

Copy link
Contributor

Choose a reason for hiding this comment

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

Hope we can get rid of LotusJson wrappers in Params as well

Yes, exactly what I was thinking. It's quite verbose both here and in api compare tests.

Copy link
Contributor

@hanabi1224 hanabi1224 Apr 19, 2024

Choose a reason for hiding this comment

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

@aatifsyed I made a draft PR #4247 to drop these wrappers, we can use it for discussion.

shared_tipset.key().into(),
)));
tests.push(RpcTest::identity(
StateCall::request((msg.clone().into(), LotusJson(shared_tipset.key().into())))
Copy link
Contributor

Choose a reason for hiding this comment

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

thought: looking at the verbosity of having to wrap things into LotusJson and struggling with it during my own method impls - I think we could probably try and solve it somehow. I will just leave it here, perhaps we could eventually come up with a good way of solving this.

Copy link
Contributor

@ruseinov ruseinov left a comment

Choose a reason for hiding this comment

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

lgtm

@aatifsyed aatifsyed added this pull request to the merge queue Apr 19, 2024
Merged via the queue into main with commit 50f36f6 Apr 19, 2024
27 checks passed
@aatifsyed aatifsyed deleted the aatifsyed/migrate-state-1 branch April 19, 2024 13:42
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