Skip to content

Commit

Permalink
hacky way of reloading trusted setup
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanBratanov committed Oct 20, 2023
1 parent ae1611b commit 45901f3
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,15 @@ public synchronized void loadTrustedSetup(final String trustedSetupFile) throws
}

try {
// allow reloading of trusted setup
loadedTrustedSetupFile.ifPresent(__ -> freeTrustedSetup());
// allow loading different trusted setup
loadedTrustedSetupFile.ifPresent(
currentTrustedSetupFile -> {
LOG.debug(
"Replacing current trusted setup {} with {}",
currentTrustedSetupFile,
trustedSetupFile);
freeTrustedSetup();
});
final TrustedSetup trustedSetup = CKZG4844Utils.parseTrustedSetupFile(trustedSetupFile);
final List<Bytes> g1Points = trustedSetup.g1Points();
final List<Bytes> g2Points = trustedSetup.g2Points();
Expand Down

0 comments on commit 45901f3

Please sign in to comment.