File tree Expand file tree Collapse file tree 4 files changed +15
-13
lines changed Expand file tree Collapse file tree 4 files changed +15
-13
lines changed Original file line number Diff line number Diff line change @@ -348,7 +348,7 @@ func main() {
348
348
349
349
// Overwrite the default path to download the zksnarks circuits artifacts
350
350
// using the global datadir as parent folder.
351
- circuit .BaseDir = filepath .Join (globalCfg .DataDir , circuit . BaseDir )
351
+ circuit .BaseDir = filepath .Join (globalCfg .DataDir , "zkCircuits" )
352
352
353
353
// Ensure we can have at least 8k open files. This is necessary, since
354
354
// many components like IPFS and Tendermint require keeping many active
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ import (
16
16
"github.com/spf13/viper"
17
17
"go.vocdoni.io/dvote/api/faucet"
18
18
"go.vocdoni.io/dvote/crypto/ethereum"
19
+ "go.vocdoni.io/dvote/crypto/zk/circuit"
19
20
"go.vocdoni.io/dvote/internal"
20
21
"go.vocdoni.io/dvote/log"
21
22
"go.vocdoni.io/dvote/vochain/state"
@@ -178,6 +179,10 @@ func main() {
178
179
179
180
log .Infof ("using data directory at %s" , config .dir )
180
181
182
+ // Overwrite the default path to download the zksnarks circuits artifacts
183
+ // using the global datadir as parent folder.
184
+ circuit .BaseDir = filepath .Join (config .dir , "zkCircuits" )
185
+
181
186
mngKey := ethereum.SignKeys {}
182
187
if err := mngKey .AddHexKey (config .keymanager ); err != nil {
183
188
log .Fatal (err )
Original file line number Diff line number Diff line change @@ -19,21 +19,17 @@ var downloadCircuitsTimeout = time.Minute * 5
19
19
20
20
// BaseDir is where the artifact cache is expected to be found.
21
21
// If the artifacts are not found there, they will be downloaded and stored.
22
- // If unset ("") it will default to ~/.cache/vocdoni/zkCircuits/
22
+ //
23
+ // Defaults to ~/.cache/vocdoni/zkCircuits/
23
24
//
24
25
// In any case, the LocalDir path associated with the circuit config will be appended at the end
25
- var BaseDir = ""
26
-
27
- func init () {
28
- // if base dir is unset, default to ~/.cache/vocdoni/
29
- if BaseDir == "" {
30
- home , err := os .UserHomeDir ()
31
- if err != nil {
32
- panic (err )
33
- }
34
- BaseDir = home + "/.cache/vocdoni/zkCircuits"
26
+ var BaseDir = func () string {
27
+ home , err := os .UserHomeDir ()
28
+ if err != nil {
29
+ panic (err )
35
30
}
36
- }
31
+ return filepath .Join (home , ".cache" , "vocdoni" , "zkCircuits" )
32
+ }()
37
33
38
34
// ZkCircuit struct wraps the circuit configuration and contains the file
39
35
// content of the circuit artifacts (provingKey, verificationKey and wasm)
Original file line number Diff line number Diff line change 1
1
IMAGE_TAG = main
2
2
# VOCONED_KEYMANAGER=571063b70545d01b8c130bb411b5f0220e06b8db236bb12e77ae478f7078b77b
3
+ VOCONED_DIR = /app/run
3
4
VOCONED_PORT = 9090
4
5
VOCONED_URLPATH = /v2
5
6
VOCONED_BLOCKPERIOD = 5
You can’t perform that action at this time.
0 commit comments