Skip to content

Commit d1614d7

Browse files
committed
cleanup
1 parent 33c7c1f commit d1614d7

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ db-dump: ## Dump the database contents to file 'database.dump'
123123
.PHONY: dev-db-setup
124124
dev-db-setup: ## Create the basic database entries for testing and development
125125
@printf "$(BLUE)Create the allow-all measurements $(NC)\n"
126-
$(CURL) $(CURL_AUTH) --request POST --url http://localhost:8081/api/admin/v1/measurements --data '{"measurement_id": "test1","attestation_type": "test","measurements": {"11": {"expected": "efa43e0beff151b0f251c4abf48152382b1452b4414dbd737b4127de05ca31f7"}}}'
126+
$(CURL) $(CURL_AUTH) --request POST --url http://localhost:8081/api/admin/v1/measurements --data '{"measurement_id": "test1","attestation_type": "test","measurements": {}}'
127127

128128
@printf "$(BLUE)Enable the measurements $(NC)\n"
129129
$(CURL) $(CURL_AUTH) --request POST --url http://localhost:8081/api/admin/v1/measurements/activation/test1 --data '{"enabled": true}'

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ curl -u admin:secret http://localhost:8081/api/admin/v1/measurements
5151

5252
Local development only: you can disable Admin API auth with `--disable-admin-auth` or `DISABLE_ADMIN_AUTH=1`. This is unsafe; never use in production.
5353

54-
For development/testing, you may also allow empty measurements with `--enable-empty-measurements` or `ENABLE_EMPTY_MEASUREMENTS=1`. In production, keep this disabled and specify at least one expected measurement.
54+
For development/testing, you may also allow empty measurements with `--allow-empty-measurements` or `ALLOW_EMPTY_MEASUREMENTS=1`. In production, keep this disabled and specify at least one expected measurement.
5555

5656
### Manual setup
5757

cmd/httpserver/main.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,9 @@ var flags = []cli.Flag{
114114
EnvVars: []string{"MOCK_SECRETS"},
115115
},
116116
&cli.BoolFlag{
117-
Name: "enable-empty-measurements",
117+
Name: "allow-empty-measurements",
118118
Usage: "allow empty measurements in AddMeasurement (local development/testing only)",
119-
EnvVars: []string{"ENABLE_EMPTY_MEASUREMENTS"},
119+
EnvVars: []string{"ALLOW_EMPTY_MEASUREMENTS"},
120120
},
121121
}
122122

@@ -146,7 +146,7 @@ func runCli(cCtx *cli.Context) error {
146146
enablePprof := cCtx.Bool("pprof")
147147
drainDuration := time.Duration(cCtx.Int64("drain-seconds")) * time.Second
148148
mockSecretsStorage := cCtx.Bool("mock-secrets")
149-
enableEmptyMeasurements := cCtx.Bool("enable-empty-measurements")
149+
enableEmptyMeasurements := cCtx.Bool("allow-empty-measurements")
150150
adminBasicUser := cCtx.String("admin-basic-user")
151151
adminPasswordBcrypt := cCtx.String("admin-basic-password-bcrypt")
152152
disableAdminAuth := cCtx.Bool("disable-admin-auth")

docker/docker-compose.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ services:
4242
INTERNAL_ADDR: "0.0.0.0:8082"
4343
METRICS_ADDR: "0.0.0.0:8090"
4444
DISABLE_ADMIN_AUTH: "1" # local dev only; do not use in production
45-
ENABLE_EMPTY_MEASUREMENTS: "1" # local dev/testing convenience
45+
ALLOW_EMPTY_MEASUREMENTS: "1" # local dev/testing convenience
4646

4747
proxy:
4848
image: flashbots/builder-hub-mock-proxy

0 commit comments

Comments
 (0)