Skip to content

Fix multiple TODOs#89

Open
mertwole wants to merge 4 commits into
masterfrom
mertwole-refactor
Open

Fix multiple TODOs#89
mertwole wants to merge 4 commits into
masterfrom
mertwole-refactor

Conversation

@mertwole

@mertwole mertwole commented Jun 8, 2026

Copy link
Copy Markdown

Part of #88
Resolves #87

Benchmarks have shown that batching curve normalizations in verify won't give any significant performance gains (a difference was less than 1% in my tests)

@mertwole mertwole requested a review from drskalman June 8, 2026 13:36

@drskalman drskalman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Few questions and nits mostly :-)

Also could you make it to merge into https://github.com/paritytech/bls/tree/skalman/fix-audit-findings instead of master please?

Comment thread src/experimental/bit.rs
type M = Message;
type PKG = PublicKey<E>;

type PKnM = ::core::iter::Once<(Message, PublicKey<E>)>;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Could you explain me that how is replacing Once with ExactSizeIterator works?


type M = &'a Message;
type PKG = &'a PublicKey<Self::E>;
type PKnM = ::std::collections::hash_map::Iter<'a, Message, PublicKey<E>>;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I believe the explicit use of hash_map was intentional to impose the hash_map's orders, do we know for sure if we remove the hash_map we get the same ordering?


use core::borrow::Borrow; // BorrowMut
// We use BTreeMap instead of BTreeMap for no_std compatibility.
// We use BTreeMap instead of BTreeMap for no_std compatibility.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
// We use BTreeMap instead of BTreeMap for no_std compatibility.
// We use BTreeMap instead of HashMap for no_std compatibility.

Comment thread src/single.rs
//! TODO: Add serde support for serialization throughout. See
//! https://github.com/ebfull/pairing/pull/87#issuecomment-402397091
//! https://github.com/poanetwork/hbbft/blob/38178af1244ddeca27f9d23750ca755af6e886ee/src/crypto/serde_impl.rs#L95

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
//!
//! Serialization for Public Keys and Signatures is provided via `serialize.rs::SerializableToBytes`

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.

Check if batching for two elements is worth it

2 participants