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

Rianhughes/07 get block with receipts #517

Merged
merged 14 commits into from
Mar 8, 2024

Conversation

rianhughes
Copy link
Contributor

@rianhughes rianhughes commented Feb 8, 2024

closes #516

Edit: This PR incorporates the changes from rc-1 which relate to block receipts

@rianhughes rianhughes mentioned this pull request Feb 8, 2024
7 tasks
@rianhughes rianhughes requested a review from omerfirmak February 8, 2024 13:46
rpc/types_block.go Outdated Show resolved Hide resolved
@rianhughes
Copy link
Contributor Author

Todo: update tests when juno supports rpc v07

@rianhughes rianhughes requested a review from kirugan February 28, 2024 12:17
@IronGauntlets
Copy link
Collaborator

The PR, in general, looks good, however, it still needs to be updated as per your comment. I can have a look again after you have updated it.

@rianhughes rianhughes requested a review from IronGauntlets March 6, 2024 09:21
rpc/block.go Outdated
return &block, nil
}

// if result.Status == nil it's a pending block
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is incorrect, please see here. If the block is pending then the status should be "PENDING".

Copy link
Contributor Author

@rianhughes rianhughes Mar 8, 2024

Choose a reason for hiding this comment

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

getBlockWithReceipts can return a BLOCK_WITH_RECEIPTSwhich has a BLOCK_STATUS (which may be "PENDING"), however getBlockWithReceipts can also return a distinct type PENDING_BLOCK_WITH_RECEIPTS which has no BLOCK_STATUS.

Copy link
Contributor Author

@rianhughes rianhughes Mar 8, 2024

Choose a reason for hiding this comment

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

The naming could be clearer tbh (on the spec side), but I think the current implementation is correct.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've updated the logic to make this a bit clearer, but it's essentially the same

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yeah looks like the spec is ambiguous

@rianhughes rianhughes requested a review from IronGauntlets March 7, 2024 15:20
@rianhughes rianhughes merged commit 8775066 into main Mar 8, 2024
3 checks passed
@rianhughes rianhughes deleted the rianhughes/07-getBlockWithReceipts branch March 8, 2024 10:31
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.

RPC07 implement new method
3 participants