Skip to content
This repository was archived by the owner on Feb 28, 2023. It is now read-only.

Commit 89d9fc6

Browse files
authored
Faucet's config changes reflection and Mantis pin upgrade to latest develop (#10)
1 parent 125abfe commit 89d9fc6

File tree

3 files changed

+121
-32
lines changed

3 files changed

+121
-32
lines changed

jobs/mantis-qa-load.nix

Lines changed: 67 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ let
414414
in [
415415
{
416416
data = ''
417-
include "${mantis}/conf/testnet-internal.conf"
417+
include "${mantis-faucet}/conf/testnet-internal.conf"
418418
mantis.blockchains.testnet-internal.custom-genesis-file = "{{ env "NOMAD_TASK_DIR" }}/genesis.json"
419419
420420
faucet {
@@ -442,37 +442,88 @@ let
442442
# Transaction value
443443
tx-value = 1000000000000000000
444444
445-
# Faucet listen interface
446-
listen-interface = "0.0.0.0"
447-
448-
# Faucet listen port
449-
listen-port = {{ env "NOMAD_PORT_rpc" }}
450-
451-
# Faucet cors config
452-
cors-allowed-origins = "*"
453-
454445
# Address of Ethereum node used to send the transaction
455446
rpc-address = {{- range service "${namespace}-mantis-1.${namespace}-mantis-miner-rpc" -}}
456447
"http://{{ .Address }}:{{ .Port }}"
457448
{{- end }}
458449
459450
# How often can a single IP address send a request
460-
min-request-interval = 1.minute
461-
462-
# How many ip addr -> timestamp entries to store
463-
latest-timestamp-cache-size = 1024
451+
min-request-interval = 0.minute
464452
}
465453
466454
logging {
467455
# Flag used to switch logs to the JSON format
468-
json-output = false
456+
json-output = true
469457
470458
# Logs directory
471-
logs-dir = /local/mantis-faucet/logs
459+
#logs-dir = /local/mantis-faucet/logs
472460
473461
# Logs filename
474462
logs-file = "logs"
475463
}
464+
465+
mantis {
466+
network {
467+
rpc {
468+
http {
469+
# JSON-RPC mode
470+
# Available modes are: http, https
471+
# Choosing https requires creating a certificate and setting up 'certificate-keystore-path' and
472+
# 'certificate-password-file'
473+
# See: https://github.com/input-output-hk/mantis/wiki/Creating-self-signed-certificate-for-using-JSON-RPC-with-HTTPS
474+
mode = "http"
475+
476+
# Whether to enable JSON-RPC HTTP(S) endpoint
477+
enabled = true
478+
479+
# Listening address of JSON-RPC HTTP(S) endpoint
480+
interface = "0.0.0.0"
481+
482+
# Listening port of JSON-RPC HTTP(S) endpoint
483+
port = {{ env "NOMAD_PORT_rpc" }}
484+
485+
# Path to the keystore storing the certificates (used only for https)
486+
# null value indicates HTTPS is not being used
487+
certificate-keystore-path = null
488+
489+
# Type of certificate keystore being used
490+
# null value indicates HTTPS is not being used
491+
certificate-keystore-type = null
492+
493+
# File with the password used for accessing the certificate keystore (used only for https)
494+
# null value indicates HTTPS is not being used
495+
certificate-password-file = null
496+
497+
# Domains allowed to query RPC endpoint. Use "*" to enable requests from
498+
# any domain.
499+
cors-allowed-origins = "*"
500+
}
501+
502+
ipc {
503+
# Whether to enable JSON-RPC over IPC
504+
enabled = false
505+
506+
# Path to IPC socket file
507+
socket-file = "/local/mantis-faucet/faucet.ipc"
508+
}
509+
510+
# Enabled JSON-RPC APIs over the JSON-RPC endpoint
511+
apis = "faucet"
512+
}
513+
}
514+
}
515+
516+
mantis.blockchains.testnet-internal.bootstrap-nodes = [
517+
{{ range service "${namespace}-mantis-miner" -}}
518+
"enode:// {{- with secret (printf "kv/data/nomad-cluster/${namespace}/%s/enode-hash" .ServiceMeta.Name) -}}
519+
{{- .Data.data.value -}}
520+
{{- end -}}@{{ .Address }}:{{ .Port }}",
521+
{{ end -}}
522+
]
523+
524+
mantis.client-id = "${faucetName}"
525+
mantis.metrics.enabled = true
526+
mantis.metrics.port = {{ env "NOMAD_PORT_metrics" }}
476527
'';
477528
changeMode = "noop";
478529
destination = "local/faucet.conf";

jobs/mantis.nix

Lines changed: 52 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -531,26 +531,13 @@ let
531531
# Transaction value
532532
tx-value = 1000000000000000000
533533
534-
# Faucet listen interface
535-
listen-interface = "0.0.0.0"
536-
537-
# Faucet listen port
538-
listen-port = {{ env "NOMAD_PORT_rpc" }}
539-
540-
# Faucet cors config
541-
cors-allowed-origins = "*"
542-
543534
# Address of Ethereum node used to send the transaction
544-
rpc-address =
545-
{{- range service "mantis-1.${namespace}-mantis-miner-rpc" -}}
535+
rpc-address = {{- range service "${namespace}-mantis-1.${namespace}-mantis-miner-rpc" -}}
546536
"http://{{ .Address }}:{{ .Port }}"
547537
{{- end }}
548538
549539
# How often can a single IP address send a request
550540
min-request-interval = 1.minute
551-
552-
# How many ip addr -> timestamp entries to store
553-
latest-timestamp-cache-size = 1024
554541
}
555542
556543
logging {
@@ -564,6 +551,57 @@ let
564551
logs-file = "logs"
565552
}
566553
554+
mantis {
555+
network {
556+
rpc {
557+
http {
558+
# JSON-RPC mode
559+
# Available modes are: http, https
560+
# Choosing https requires creating a certificate and setting up 'certificate-keystore-path' and
561+
# 'certificate-password-file'
562+
# See: https://github.com/input-output-hk/mantis/wiki/Creating-self-signed-certificate-for-using-JSON-RPC-with-HTTPS
563+
mode = "http"
564+
565+
# Whether to enable JSON-RPC HTTP(S) endpoint
566+
enabled = true
567+
568+
# Listening address of JSON-RPC HTTP(S) endpoint
569+
interface = "0.0.0.0"
570+
571+
# Listening port of JSON-RPC HTTP(S) endpoint
572+
port = {{ env "NOMAD_PORT_rpc" }}
573+
574+
# Path to the keystore storing the certificates (used only for https)
575+
# null value indicates HTTPS is not being used
576+
certificate-keystore-path = null
577+
578+
# Type of certificate keystore being used
579+
# null value indicates HTTPS is not being used
580+
certificate-keystore-type = null
581+
582+
# File with the password used for accessing the certificate keystore (used only for https)
583+
# null value indicates HTTPS is not being used
584+
certificate-password-file = null
585+
586+
# Domains allowed to query RPC endpoint. Use "*" to enable requests from
587+
# any domain.
588+
cors-allowed-origins = "*"
589+
}
590+
591+
ipc {
592+
# Whether to enable JSON-RPC over IPC
593+
enabled = false
594+
595+
# Path to IPC socket file
596+
socket-file = "/local/mantis-faucet/faucet.ipc"
597+
}
598+
599+
# Enabled JSON-RPC APIs over the JSON-RPC endpoint
600+
apis = "faucet"
601+
}
602+
}
603+
}
604+
567605
mantis.blockchains.testnet-internal.bootstrap-nodes = [
568606
{{ range service "${namespace}-mantis-miner" -}}
569607
"enode:// {{- with secret (printf "kv/data/nomad-cluster/${namespace}/%s/enode-hash" .ServiceMeta.Name) -}}

overlay.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ in {
1010
# The branch was `chore/update-sbt-add-nix`, for future reference.
1111
mantis-source = builtins.fetchGit {
1212
url = "https://github.com/input-output-hk/mantis";
13-
rev = "1adf11435e35e7368bb9b6268d8ccab9fd104349";
13+
rev = "df2916bccd53b2ccc5c3758e5aa7f272c6fbb4fe";
1414
ref = "develop";
1515
submodules = true;
1616
};
1717

1818
mantis-faucet-source = builtins.fetchGit {
1919
url = "https://github.com/input-output-hk/mantis";
20-
rev = "62c00140d34e134dcb71b1812e5f76d8401ee747";
20+
rev = "df2916bccd53b2ccc5c3758e5aa7f272c6fbb4fe";
2121
ref = "develop";
2222
submodules = true;
2323
};

0 commit comments

Comments
 (0)