Skip to content

Conversation

@aristotleee
Copy link

No description provided.

@aristotleee aristotleee changed the title use exsiting lock script copy to init connector c for validation Groth16 cache validation fix Jan 14, 2025
}

// to reuse lock scripts in validation
pub fn get_lock_scripts_copy(&self) -> Vec<ScriptBuf> { self.lock_scripts.clone() }
Copy link

@franklynot franklynot Jan 14, 2025

Choose a reason for hiding this comment

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

I suggest we make the lock_scripts field on the connector public, instead of introducing this fn. It'd be less code and we don't lose on readability. In most connectors all of their fields are public, so it would just be consistent (although not required).

operator_taproot_public_key: &XOnlyPublicKey,
commitment_public_keys: &BTreeMap<CommitmentMessageId, WinternitzPublicKey>,
lock_scripts_generator: LockScriptsGenerator,
lock_scripts_copy: Option<Vec<ScriptBuf>>,
Copy link

@franklynot franklynot Jan 14, 2025

Choose a reason for hiding this comment

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

I would suggest renaming all occurrences of lock_scripts_copy to lock_scripts_cache to better explain the purpose of this parameter.

@aristotleee aristotleee merged commit 29353c1 into groth16-cache Jan 15, 2025
1 of 2 checks passed
@aristotleee aristotleee deleted the groth16-cache-validation-fix branch January 15, 2025 02:38
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.

3 participants