@@ -80,23 +80,27 @@ func CLIFlags(envPrefix, category string) []cli.Flag {
80
80
Name : G1PathFlagName ,
81
81
Usage : "Directory path to g1.point file." ,
82
82
EnvVars : withEnvPrefix (envPrefix , "TARGET_KZG_G1_PATH" ),
83
- // TODO: should use absolute path wrt root directory to prevent future errors
84
- // in case we move this file around
85
- Value : "../ resources/g1.point" ,
83
+ // we use a relative path so that the path works for both the binary and the docker container
84
+ // aka we assume the binary is run from root dir, and that the resources/ dir is copied into the working dir of the container
85
+ Value : "resources/g1.point" ,
86
86
Category : category ,
87
87
},
88
88
& cli.StringFlag {
89
- Name : G2TauFlagName ,
90
- Usage : "Directory path to g2.point.powerOf2 file." ,
91
- EnvVars : withEnvPrefix (envPrefix , "TARGET_G2_TAU_PATH" ),
92
- Value : "../resources/g2.point.powerOf2" ,
89
+ Name : G2TauFlagName ,
90
+ Usage : "Directory path to g2.point.powerOf2 file." ,
91
+ EnvVars : withEnvPrefix (envPrefix , "TARGET_G2_TAU_PATH" ),
92
+ // we use a relative path so that the path works for both the binary and the docker container
93
+ // aka we assume the binary is run from root dir, and that the resources/ dir is copied into the working dir of the container
94
+ Value : "resources/g2.point.powerOf2" ,
93
95
Category : category ,
94
96
},
95
97
& cli.StringFlag {
96
- Name : CachePathFlagName ,
97
- Usage : "Directory path to SRS tables for caching." ,
98
- EnvVars : withEnvPrefix (envPrefix , "TARGET_CACHE_PATH" ),
99
- Value : "../resources/SRSTables/" ,
98
+ Name : CachePathFlagName ,
99
+ Usage : "Directory path to SRS tables for caching." ,
100
+ EnvVars : withEnvPrefix (envPrefix , "TARGET_CACHE_PATH" ),
101
+ // we use a relative path so that the path works for both the binary and the docker container
102
+ // aka we assume the binary is run from root dir, and that the resources/ dir is copied into the working dir of the container
103
+ Value : "resources/SRSTables/" ,
100
104
Category : category ,
101
105
},
102
106
// TODO: can we use a genericFlag for this, and automatically parse the string into a uint64?
0 commit comments