Skip to content

Commit

Permalink
new config package with default circuits variables
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasmenendez committed Jan 9, 2025
1 parent 455b665 commit e705973
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 10 deletions.
13 changes: 7 additions & 6 deletions circuits/aggregator/artifacts.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,25 @@ package aggregator

import (
"github.com/vocdoni/vocdoni-z-sandbox/circuits"
"github.com/vocdoni/vocdoni-z-sandbox/config"
"github.com/vocdoni/vocdoni-z-sandbox/types"
)

var Artifacts = circuits.NewCircuitArtifacts(
&circuits.Artifact{
RemoteURL: "https://media.githubusercontent.com/media/vocdoni/vocdoni-circuits-artifacts/main/aggregator/aggregator.pk",
Hash: types.HexStringToHexBytes("aecef25b7f5cd6c28df19d5398a7c9d6922149fdc60d7ebfee549eb42d84abe9"),
RemoteURL: config.AggregatorProvingKeyURL,
Hash: types.HexStringToHexBytes(config.AggregatorProvingKeyHash),
},
&circuits.Artifact{
RemoteURL: "https://media.githubusercontent.com/media/vocdoni/vocdoni-circuits-artifacts/main/aggregator/aggregator.vk",
Hash: types.HexStringToHexBytes("c748f9e234d70c0123f116a5a88b81ad1bcf782a9d9d0d50d2caa196aac2c0fb"),
RemoteURL: config.AggregatorVerificationKeyURL,
Hash: types.HexStringToHexBytes(config.AggregatorVerificationKeyHash),
},
)

var DummyArtifacts = circuits.NewCircuitArtifacts(
&circuits.Artifact{
RemoteURL: "https://media.githubusercontent.com/media/vocdoni/vocdoni-circuits-artifacts/main/aggregator/dummy.pk",
Hash: types.HexStringToHexBytes("fa587e9f24473de364d8950c70be11f6c33118b0be12df4ee100eed0dabecff2"),
RemoteURL: config.DummyProvingKeyURL,
Hash: types.HexStringToHexBytes(config.DummyProvingKeyHash),
},
nil,
)
9 changes: 5 additions & 4 deletions circuits/voteverifier/artifacts.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@ package voteverifier

import (
"github.com/vocdoni/vocdoni-z-sandbox/circuits"
"github.com/vocdoni/vocdoni-z-sandbox/config"
"github.com/vocdoni/vocdoni-z-sandbox/types"
)

var Artifacts = circuits.NewCircuitArtifacts(
&circuits.Artifact{
RemoteURL: "https://media.githubusercontent.com/media/vocdoni/vocdoni-circuits-artifacts/main/voteverifier/voteverifier.pk",
Hash: types.HexStringToHexBytes("4bcb2de78562f400a3f96e5adcdcc00d32ebd0e29c7af4145f857f05281eb9e8"),
RemoteURL: config.VoteVerifierProvingKeyURL,
Hash: types.HexStringToHexBytes(config.VoteVerifierProvingKeyHash),
},
&circuits.Artifact{
RemoteURL: "https://media.githubusercontent.com/media/vocdoni/vocdoni-circuits-artifacts/main/voteverifier/voteverifier.vk",
Hash: types.HexStringToHexBytes("a3a3874b6a1d4c568f6ee0d221e3213bf408f4e66d67e3f1eaf3c73f02994309"),
RemoteURL: config.VoteVerifierVerificationKeyURL,
Hash: types.HexStringToHexBytes(config.VoteVerifierVerificationKeyHash),
},
)
16 changes: 16 additions & 0 deletions config/circuit_artifacts.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package config

const (
// CircuitArtifacts constants for circuits/voteverifier package
VoteVerifierProvingKeyURL = "https://media.githubusercontent.com/media/vocdoni/vocdoni-circuits-artifacts/main/voteverifier/voteverifier.pk"
VoteVerifierProvingKeyHash = "4bcb2de78562f400a3f96e5adcdcc00d32ebd0e29c7af4145f857f05281eb9e8"
VoteVerifierVerificationKeyURL = "https://media.githubusercontent.com/media/vocdoni/vocdoni-circuits-artifacts/main/voteverifier/voteverifier.vk"
VoteVerifierVerificationKeyHash = "a3a3874b6a1d4c568f6ee0d221e3213bf408f4e66d67e3f1eaf3c73f02994309"
// CircuitArtifacts constants for circuits/aggregator package
AggregatorProvingKeyURL = "https://media.githubusercontent.com/media/vocdoni/vocdoni-circuits-artifacts/main/aggregator/aggregator.pk"
AggregatorProvingKeyHash = "aecef25b7f5cd6c28df19d5398a7c9d6922149fdc60d7ebfee549eb42d84abe9"
AggregatorVerificationKeyURL = "https://media.githubusercontent.com/media/vocdoni/vocdoni-circuits-artifacts/main/aggregator/aggregator.vk"
AggregatorVerificationKeyHash = "c748f9e234d70c0123f116a5a88b81ad1bcf782a9d9d0d50d2caa196aac2c0fb"
DummyProvingKeyURL = "https://media.githubusercontent.com/media/vocdoni/vocdoni-circuits-artifacts/main/aggregator/dummy.pk"
DummyProvingKeyHash = "fa587e9f24473de364d8950c70be11f6c33118b0be12df4ee100eed0dabecff2"
)

0 comments on commit e705973

Please sign in to comment.