Skip to content

Commit

Permalink
chore: merge master (#445)
Browse files Browse the repository at this point in the history
* chore: add uacomment to dash.conf (#407)

* chore: fix loadwallet and handle misconfigured masternodes (#408)

* chore: revert #400 and move fee function to mn_init

* chore: handle misconfigured masternodes (enabled but wrong ip)

* chore: avoid using broken `loadwallet` locking function

* docs: add sections to mn_init for clarity

* fix: trailing spaces

* fix: uacomment spacing (#413)

* fix: miner-2 smoke test timeout (#415)

* chore: bump version to 0.23.1 (#416)

* feat: use new recaptcha methods available in multifaucet 0.9.0 (#429)

* feat: add tls to faucet (#430)

* feat: enable SPORK_23_QUORUM_POSE

* fix: logrotate hourly fails if drive fills before dateext changes

* chore: revert enabling spork 23
  • Loading branch information
strophy authored Mar 5, 2023
1 parent 43245b8 commit 495abf0
Show file tree
Hide file tree
Showing 8 changed files with 79 additions and 12 deletions.
7 changes: 7 additions & 0 deletions ansible/roles/dashd/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,13 @@
name: arillso.logrotate
vars:
logrotate_use_hourly_rotation: true
logrotate_options:
- weekly
- rotate 4
- create
- dateext
- dateformat -%Y%m%d-%s
- su root syslog
logrotate_applications:
- name: core-logs
definitions:
Expand Down
2 changes: 2 additions & 0 deletions ansible/roles/dashd/templates/dash.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ logtimestamps=1
maxconnections=256
debug={% if masternode.debug is defined or dashd_debug == 1 %}1{% else %}0{% endif %}

uacomment=dcg-{{ inventory_hostname }}

printtoconsole=1

{% if dashd_indexes %}
Expand Down
8 changes: 4 additions & 4 deletions ansible/roles/multifaucet/templates/config/faucet.conf.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@
"use_captcha" => true, // require the user to enter a captcha
"use_spammerslapper" => false, // Prevent The use of Proxies and check the IP against Blacklists

"captcha" => "recaptcha_v2", // which CAPTCHA to use, possible values are: "recaptcha", "solvemedia", and "simple-captcha".
"captcha" => "recaptcha_v2", // which CAPTCHA to use, possible values are: "recaptcha", "recaptcha_v2","solvemedia", and "simple-captcha".

"captcha_config" => array(
//Simple Captcha Session Name
"simple_captcha_session_name" => "multifaucet",
// if you're using reCAPTCHA, enter your private and public keys here:
"recpatcha_private_key" => "PRIVATE_KEY_HERE",
"recpatcha_public_key" => "PUBLIC_KEY_HERE",
"recaptcha_private_key" => "PRIVATE_KEY_HERE",
"recaptcha_public_key" => "PUBLIC_KEY_HERE",
// if you're using reCAPTCHA-v2, enter your private and public keys here:
"recaptcha_v2_private_key" => "PRIVATE_KEY_HERE",
"recaptcha_v2_public_key" => "{{ faucet_recaptcha_public_key }}",
"recaptcha_v2_public_key" => getenv("MULTIFAUCET_RECAPTCHA_PUBLIC_KEY"),
// if you're using Solve MEDIA, enter your private, challenge, and hash keys here:
"solvemedia_private_key" => "PRIVATE_KEY_HERE",
"solvemedia_challenge_key" => "CHALLENGE_KEY_HERE",
Expand Down
1 change: 1 addition & 0 deletions ansible/roles/multifaucet/templates/docker-compose.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ services:
- MULTIFAUCET_MAX_PAYOUT={{ faucet_maximum_payout }}
- MULTIFAUCET_PAYOUT_THRESHOLD={{ faucet_payout_threshold }}
- MULTIFAUCET_PAYOUT_INTERVAL={{ faucet_payout_interval }}
- MULTIFAUCET_RECAPTCHA_PUBLIC_KEY={{ faucet_recaptcha_public_key }}
volumes:
- ./config:/var/www/html/config/
ports:
Expand Down
39 changes: 37 additions & 2 deletions terraform/aws/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,20 @@ resource "aws_elb" "web" {
]

listener {
instance_port = 80
instance_port = var.faucet_port
instance_protocol = "http"
lb_port = 80
lb_port = var.faucet_port
lb_protocol = "http"
}

listener {
instance_port = var.faucet_port
instance_protocol = "http"
lb_port = var.faucet_https_port
lb_protocol = "https"
ssl_certificate_id = aws_acm_certificate_validation.faucet.certificate_arn
}

listener {
instance_port = var.insight_port
instance_protocol = "http"
Expand Down Expand Up @@ -140,6 +148,33 @@ resource "aws_elb" "web" {
}
}

resource "aws_acm_certificate" "faucet" {
domain_name = "faucet.${var.public_network_name}.${var.main_domain}"
validation_method = "DNS"
}

resource "aws_route53_record" "faucet_validation" {
for_each = {
for dvo in aws_acm_certificate.faucet.domain_validation_options : dvo.domain_name => {
name = dvo.resource_record_name
record = dvo.resource_record_value
type = dvo.resource_record_type
}
}

zone_id = data.aws_route53_zone.main_domain[0].zone_id
allow_overwrite = true
name = each.value.name
records = [each.value.record]
ttl = 60
type = each.value.type
}

resource "aws_acm_certificate_validation" "faucet" {
certificate_arn = aws_acm_certificate.faucet.arn
validation_record_fqdns = [for record in aws_route53_record.faucet_validation : record.fqdn]
}

resource "aws_route53_record" "faucet" {
zone_id = data.aws_route53_zone.main_domain[count.index].zone_id
name = "faucet.${var.public_network_name}.${var.main_domain}"
Expand Down
22 changes: 17 additions & 5 deletions terraform/aws/security_groups.tf
Original file line number Diff line number Diff line change
Expand Up @@ -343,12 +343,24 @@ resource "aws_security_group" "elb" {
name = "${terraform.workspace}-elb"
vpc_id = aws_vpc.default.id

# HTTP access from anywhere
# Faucet
ingress {
from_port = 80
to_port = 80
from_port = var.faucet_port
to_port = var.faucet_port
protocol = "tcp"
description = "Faucet"

cidr_blocks = [
"0.0.0.0/0",
]
}

# Faucet HTTPS
ingress {
from_port = var.faucet_https_port
to_port = var.faucet_https_port
protocol = "tcp"
description = "HTTP"
description = "Faucet HTTPS"

cidr_blocks = [
"0.0.0.0/0",
Expand All @@ -367,7 +379,7 @@ resource "aws_security_group" "elb" {
]
}

# Insight Explorer
# Insight Explorer HTTPS
ingress {
from_port = var.insight_https_port
to_port = var.insight_https_port
Expand Down
10 changes: 10 additions & 0 deletions terraform/aws/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,16 @@ variable "dashd_zmq_port" {
default = 29998
}

variable "faucet_port" {
description = "Faucet port"
default = 80
}

variable "faucet_https_port" {
description = "Faucet HTTPS port"
default = 443
}

variable "insight_port" {
description = "Insight port"
default = 3001
Expand Down
2 changes: 1 addition & 1 deletion test/smoke/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ describe('Core', () => {

const promises = [];
for (const hostName of allHosts) {
const timeout = 15000; // set individual rpc client timeout
const timeout = 30000; // set individual rpc client timeout

const client = createRpcClientFromConfig(hostName);

Expand Down

0 comments on commit 495abf0

Please sign in to comment.