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

Ed/merge sig agg #1589

Merged
merged 88 commits into from
Aug 22, 2023
Merged

Ed/merge sig agg #1589

merged 88 commits into from
Aug 22, 2023

Conversation

elliedavidson
Copy link
Member

This PR is a wrapper around this PR: #1568

dailinsubjam and others added 30 commits June 13, 2023 18:56
…ment_for_votedata

Make the commitment of all VoteData of fixed length
…pressoSystems/HotShot into sishan/signature_aggregation_with_hsp
…pressoSystems/HotShot into sishan/signature_aggregation_with_hsp
shenkeyao
shenkeyao previously approved these changes Aug 21, 2023
Copy link
Member

@shenkeyao shenkeyao left a comment

Choose a reason for hiding this comment

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

LGTM!

@philippecamacho
Copy link
Contributor

I get this failure when I run the tests on my machine.

    at src/traits/networking/libp2p_network.rs:549

The application panicked (crashed).
  2023-08-21T22:45:30.303380Z ERROR libp2p_networking::network::behaviours::gossip: error publishing gossip message Err(Duplicate)
    at libp2p-networking/src/network/behaviours/gossip.rs:218

Message:  TEST FAILED! Results: [("Test Overall Safety Task", MismatchedLeaf)]
Location: /home/leloup/repositories/espressosys/HotShot/testing/src/test_runner.rs:168

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.
FAILED

failures:

failures:
    webserver_libp2p_network

test result: FAILED. 0 passed; 1 failed; 1 ignored; 0 measured; 0 filtered out; finished in 11.11s

Copy link
Contributor

@alxiong alxiong left a comment

Choose a reason for hiding this comment

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

  1. I thought @dailinsubjam is going to move SignatureKey into its own crate under /crates/ and out of /types? does that affect this PR as well? (or is this PR supposed to eclipse Sishan's?)
  2. I got lost in the many abstractions of crypto-team-defined QuorumCertificate, jellyfish's AggregatableSignature, and here HotShot's SignatureKey, AssembledSignature, SignedCertificate, and HotShot's own QuorumCertificate, we should clarify them and remove unnecessary layers of abstraction. (maybe in a separate PR)
    in fact, I'm lost because I don't know which trait is for what purposes and thus cannot comment on what API I expect it to have.
  3. would be great if @elliedavidson could provide more details in the PR description, at least highlight the main changes, and what changes deserve special attention (if any)

Comment on lines 47 to +50
/// List of known node's public keys, including own, sorted by nonce ()
pub known_nodes: Vec<K>,
/// List of known node's public keys and stake value for certificate aggregation, serving as public parameter
pub known_nodes_with_stake: Vec<ENTRY>,
Copy link
Contributor

Choose a reason for hiding this comment

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

it felt underconstrained w/o specifying the equivalence between the key in ENTRY and K.

I wonder if you want to use:

use hotshot-types::traits::stake_table::StakeTableScheme;

pub struct HotShotConfig<K,ST: StakeTableScheme, ELECTIONCONFIG> 
where ST::Key: K, {
  pub known_nodes: Vec<K>,
  pub stake_table: ST,
}

Copy link
Member Author

Choose a reason for hiding this comment

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

  1. Yes, that will happen in a separate PR!
  2. I agree. In general HotShot traits have gotten messy. Here is an issue for this, but we unfortunately have other priorities to work on right now: Remove unnecessary layers of abstraction between crypto primitives and HotShot traits #1595
  3. Normally a PR would have more details! Sishan's original PR did have more details. I only made this PR since Sishan can't make it while she is off.

Copy link
Member Author

Choose a reason for hiding this comment

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

Re this particular comment - I agree - good catch. I think we should probably just remove the known_nodes since it effectively the same thing as known_nodes_with_stake. Issue here: #1596

@elliedavidson
Copy link
Member Author

elliedavidson commented Aug 22, 2023

@philippecamacho
This is fine; the fix for that test is being upstreamed in another PR.

Copy link
Contributor

@philippecamacho philippecamacho left a comment

Choose a reason for hiding this comment

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

LGTM

@elliedavidson elliedavidson merged commit ff8b2a3 into main Aug 22, 2023
6 of 7 checks passed
@Ancient123 Ancient123 deleted the ed/merge_sig_agg branch October 12, 2023 15:30
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.

6 participants