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

Fix query_proof RPC #514

Merged
merged 2 commits into from
Apr 2, 2024
Merged

Fix query_proof RPC #514

merged 2 commits into from
Apr 2, 2024

Conversation

ToufeeqP
Copy link
Contributor

@ToufeeqP ToufeeqP commented Apr 2, 2024

Pull Request type

Please add the labels corresponding to the type of changes your PR introduces:

  • Bugfix

Description

Kate query_proof RPC was not extending the columns, As a result, we were not able to fetch the proof for extended cells

Checklist

  • I have performed a self-review of my own code.
  • The tests pass successfully with cargo test.
  • The code was formatted with cargo fmt.
  • The code compiles with no new warnings with cargo build --release and cargo build --release --features runtime-benchmarks.
  • The code has no new warnings when using cargo clippy.
  • If this change affects documented features or needs new documentation, I have created a PR with a documentation update.

@ToufeeqP ToufeeqP self-assigned this Apr 2, 2024
@aterentic-ethernal aterentic-ethernal requested review from aterentic and removed request for aterentic April 2, 2024 05:08
let mut content = [0u8; 80];
content.copy_from_slice(&actual_proof);
let commitment: [u8; 48] = commitment[48..96].try_into().unwrap();
let dcell = kate_recovery::data::Cell {
Copy link
Collaborator

@fmiguelgarcia fmiguelgarcia Apr 2, 2024

Choose a reason for hiding this comment

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

It looks like we can refactor this Cell because we are encoding the scalar to raw bytes some lines above, and then it is decoded inside verify function.
Maybe it could be a new PR after release.
In general, we should avoid any Vec<u8> from encoding/serializing in favor of an specific type like GDataProof.
att. @ToufeeqP @jakubcech

@ToufeeqP ToufeeqP merged commit 0592ec7 into main Apr 2, 2024
19 checks passed
@ToufeeqP ToufeeqP deleted the toufeeq/fix-query-proof branch April 2, 2024 12: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.

4 participants