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

AggregatedTranscript() signature incorrect in .pyi #129

Closed
fjarri opened this issue Jun 19, 2023 · 2 comments
Closed

AggregatedTranscript() signature incorrect in .pyi #129

fjarri opened this issue Jun 19, 2023 · 2 comments

Comments

@fjarri
Copy link

fjarri commented Jun 19, 2023

ferveo/__init__.pyi has:

class AggregatedTranscript:

    def __init__(self, messages: Sequence[Tuple[Validator, Transcript]]):
        ...

But AggregatedTranscript::new is defined in the bindings as

#[pymethods]
impl AggregatedTranscript {
    #[new]
    pub fn new(messages: Vec<ValidatorMessage>) -> Self {

where ValidatorMessage is not exported.

Same problem with AffregatedTranscript.verify() and Dkg.aggregate_transcripts(). This is also repeated in the copy of the type stubs in nucypher-core.

@piotr-roslaniec
Copy link

I don't think it's possible to a tuple definition from Rust pyo3:

#[derive(FromPyObject, Clone)]
pub struct ValidatorMessage(Validator, Transcript);

I will replace ValidatorMessage with a pyclass, which is a breaking change fo nucypher.

@piotr-roslaniec
Copy link

Closed by #131

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

No branches or pull requests

2 participants