Skip to content

Commit

Permalink
Merge pull request #7 from maticnetwork/luka/fix-block-number-type-on…
Browse files Browse the repository at this point in the history
…-recovery

Luka/fix block number type on recovery
  • Loading branch information
luka-ethernal authored Nov 7, 2022
2 parents 137a34d + 5dff0bc commit 2ec9d12
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions kate/recovery/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "kate-recovery"
version = "0.1.2"
version = "0.2.0"
authors = ["Denis Ermolin <denis.ermolin@matic.network>"]
edition = "2018"

Expand All @@ -10,7 +10,7 @@ dusk-bytes = "0.1.6"
dusk-plonk = { git = "https://github.com/maticnetwork/plonk.git", tag = "v0.12.0-polygon-1" }
getrandom = { version = "0.2", features = ["js"] }
serde = { version = "1.0", features = ["derive"] }
thiserror-no-std = "2.0.2"
thiserror = "1.0.37"

[dev-dependencies]
rand = "0.8.4"
Expand Down
6 changes: 3 additions & 3 deletions kate/recovery/src/com.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use codec::Decode;
use dusk_bytes::Serializable;
use dusk_plonk::{fft::EvaluationDomain, prelude::BlsScalar};
use serde::{Deserialize, Serialize};
use thiserror_no_std::Error;
use thiserror::Error;

// TODO: Constants are copy from kate crate, we should move them to common place
pub const CHUNK_SIZE: usize = 32;
Expand Down Expand Up @@ -518,7 +518,7 @@ pub struct Position {

impl Position {
/// Refrence in format `block_number:column_number:row_number`
pub fn reference(&self, block_number: u64) -> String {
pub fn reference(&self, block_number: u32) -> String {
format!("{}:{}:{}", block_number, self.col, self.row)
}
}
Expand All @@ -542,7 +542,7 @@ pub struct Cell {
}

impl Cell {
pub fn reference(&self, block: u64) -> String { self.position.reference(block) }
pub fn reference(&self, block: u32) -> String { self.position.reference(block) }

pub fn data(&self) -> [u8; 32] { self.content[48..].try_into().expect("content is 80 bytes") }

Expand Down

0 comments on commit 2ec9d12

Please sign in to comment.