Skip to content

Commit

Permalink
collation-generation: use v2 receipts (#5908)
Browse files Browse the repository at this point in the history
Part of #5047

Plus some cleanups

---------

Signed-off-by: Andrei Sandu <[email protected]>
Co-authored-by: Andrei Sandu <[email protected]>
Co-authored-by: Andrei Sandu <[email protected]>
Co-authored-by: GitHub Action <[email protected]>
  • Loading branch information
4 people authored Nov 4, 2024
1 parent fa52407 commit 68e0563
Show file tree
Hide file tree
Showing 9 changed files with 529 additions and 1,234 deletions.
2 changes: 2 additions & 0 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions polkadot/node/collation-generation/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ sp-core = { workspace = true, default-features = true }
sp-maybe-compressed-blob = { workspace = true, default-features = true }
thiserror = { workspace = true }
codec = { features = ["bit-vec", "derive"], workspace = true }
schnellru = { workspace = true }

[dev-dependencies]
polkadot-node-subsystem-test-helpers = { workspace = true }
Expand Down
9 changes: 7 additions & 2 deletions polkadot/node/collation-generation/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Polkadot. If not, see <http://www.gnu.org/licenses/>.

use polkadot_primitives::vstaging::CandidateReceiptError;
use thiserror::Error;

#[derive(Debug, Error)]
Expand All @@ -30,8 +31,12 @@ pub enum Error {
UtilRuntime(#[from] polkadot_node_subsystem_util::runtime::Error),
#[error(transparent)]
Erasure(#[from] polkadot_erasure_coding::Error),
#[error("Parachain backing state not available in runtime.")]
MissingParaBackingState,
#[error("Collation submitted before initialization")]
SubmittedBeforeInit,
#[error("V2 core index check failed: {0}")]
CandidateReceiptCheck(CandidateReceiptError),
#[error("PoV size {0} exceeded maximum size of {1}")]
POVSizeExceeded(usize, usize),
}

pub type Result<T> = std::result::Result<T, Error>;
Loading

0 comments on commit 68e0563

Please sign in to comment.