Skip to content

Commit 412c8fc

Browse files
committed
merge main
1 parent 65e192a commit 412c8fc

7 files changed

Lines changed: 42 additions & 79 deletions

File tree

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
251104.4
1+
251107.0

flake.nix

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
clang
3333
libclang
3434
gcc13 # jemalloc fails to build on gcc14 (in debug builds)
35-
rocksdb
3635
];
3736
rustc = {
3837
stable = fenixPackages.stable.rustc;
@@ -43,12 +42,17 @@
4342
nightly = fenixPackages.minimal.cargo;
4443
};
4544
rust-std = {
46-
stable = fenixPackages.stable.rust-std;
45+
stable = fenixPackages.targets.${muslTarget}.stable.rust-std;
46+
# stable = fenixPackages.stable.rust-std;
4747
nightly = fenixPackages.minimal.rust-std;
4848
};
4949
rust-src = fenixPackages.stable.rust-src;
5050
rustfmt = fenixPackages.default.rustfmt;
5151
clippy = fenixPackages.default.clippy;
52+
53+
muslTarget = "x86_64-unknown-linux-musl";
54+
pkgsStatic = pkgs.pkgsStatic;
55+
cross = pkgs.pkgsCross.musl64;
5256
in
5357
{
5458
devShells.default = pkgs.mkShell {
@@ -59,11 +63,7 @@
5963

6064
# Use the dyn library for local development to improve build times.
6165
# Name of this var is defined here https://github.com/rust-rocksdb/rust-rocksdb/blob/master/librocksdb-sys/build.rs
62-
ROCKSDB_LIB_DIR = "${pkgs.rocksdb}/lib";
63-
64-
NIX_LDFLAGS = "${pkgs.lib.optionalString pkgs.stdenv.isDarwin "\
65-
-F${pkgs.darwin.apple_sdk.frameworks.Security}/Library/Frameworks -framework Security \
66-
-F${pkgs.darwin.apple_sdk.frameworks.CoreFoundation}/Library/Frameworks -framework CoreFoundation"}";
66+
# ROCKSDB_LIB_DIR = "${pkgs.rocksdb}/lib";
6767

6868
buildInputs = with pkgs; [
6969
(fenixPackages.combine [ cargo.stable rustc.stable rust-std.stable rust-src rustfmt ])

infra/modules/node-operator/main.tf

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
variable "config" {
22
type = object({
33
name = string
4-
peer_id = string
4+
secrets_file_path = string
55

66
db = object({
77
ec2_instance_type = string
@@ -15,17 +15,19 @@ variable "config" {
1515
})
1616
}
1717

18-
variable "secrets" {
19-
type = object({
20-
ed25519_secret_key = string
21-
})
22-
sensitive = true
23-
ephemeral = true
18+
data "aws_region" "current" {}
19+
20+
ephemeral "sops_file" "secrets" {
21+
source_file = var.config.secrets_file_path
2422
}
2523

2624
locals {
2725
region = data.aws_region.current.name
2826

27+
# We store encrypted secrets as a `local` to be able to derive secret versions.
28+
# The decrypted secrets are not being stored in the TF state.
29+
secrets_encrypted = yamldecode(file(var.config.secrets_file_path))
30+
2931
db = {
3032
primary_rpc_server_port = 3000
3133
secondary_rpc_server_port = 3001
@@ -42,8 +44,6 @@ resource "aws_ssm_parameter" "ed25519_secret_key" {
4244
value_wo_version = parseint(substr(local.ed25519_secret_key_hash, 0, 8), 16)
4345
}
4446

45-
data "aws_region" "current" {}
46-
4747
module "vpc" {
4848
source = "terraform-aws-modules/vpc/aws"
4949
version = "~> 6.5"

infra/testnet/main.tf

Lines changed: 13 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -16,35 +16,11 @@ provider "aws" {
1616
region = "eu-central-1"
1717
}
1818

19-
provider "aws" {
20-
region = "eu-central-1"
21-
alias = "eu"
22-
}
23-
24-
provider "aws" {
25-
region = "us-east-1"
26-
alias = "us"
27-
}
28-
29-
provider "aws" {
30-
region = "ap-southeast-1"
31-
alias = "ap"
32-
}
33-
34-
provider "aws" {
35-
region = "sa-east-1"
36-
alias = "sa"
37-
}
38-
3919
module "sops-encryption-key" {
4020
source = "../modules/sops-encryption-key"
4121
}
4222

43-
ephemeral "sops_file" "secrets" {
44-
source_file = "secrets.yaml"
45-
}
46-
47-
locals {
23+
locals {
4824
db_config = {
4925
# 2 vCPU / 4 GiB RAM, x86_64
5026
ec2_instance_type = "c5a.large"
@@ -56,18 +32,24 @@ locals {
5632
# 512 MiB are system reserved
5733
ecs_task_memory = 4096 - 512
5834
}
35+
36+
eu_operators = {
37+
wallet-connect-1 = {
38+
db = local.db_config
39+
}
40+
}
5941
}
6042

61-
module "eu-central-1-node-operator-1" {
43+
module "eu-central-1" {
6244
source = "../modules/node-operator"
45+
for_each = local.operators
6346

6447
config = {
65-
name = "wallet-connect-1"
66-
peer_id = "12D3KooWKpZ7ch5k4ggZHAKKMmu1oNnBxM5u1VZpGiopPZQmrLHT"
67-
db = local.db_config
68-
}
48+
name = each.key
49+
secrets_file_path = "${path.module}/secrets/${each.key}.sops.yaml"
6950

70-
secrets = jsondecode(ephemeral.sops_file.secrets.raw)["operators"][0]
51+
db = each.value.db
52+
}
7153

7254
providers = {
7355
aws = aws.eu

infra/testnet/secrets.yaml

Lines changed: 0 additions & 12 deletions
This file was deleted.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
peer_id_unencrypted: 12D3KooWKpZ7ch5k4ggZHAKKMmu1oNnBxM5u1VZpGiopPZQmrLHT
2+
ed25519_secret_key: ENC[AES256_GCM,data:j2RNFK2yWv1AimnV3jZobiI+DBA2lHnZA6yoVjXGn8JwXqutrL0I1qXjey4=,iv:+u3u55knUOIJnkcU/pfaTfY3BZIwKVzR4fS6h/eV5zw=,tag:3Y/cVAce/0HIsFHriSVuBg==,type:str]
3+
sops:
4+
kms:
5+
- arn: arn:aws:kms:eu-central-1:260477932319:key/mrk-b1e6810605c34402bb2db341187cf7ca
6+
created_at: "2025-10-30T15:42:01Z"
7+
enc: AQICAHi53voGJIbw5xN5Sxqidj47CKY1C6uMBW6lXoaYu7F5swHBeyxAvQLSGDnWMNCtAfbgAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQM3b4RwtqWcbgqKIEeAgEQgDthHzqxt6ODHnzE7B4XGXRmKgTDxrqHRkkYpiOhD6jg9Y8SSDMqn0LN0dgxVhV7N6uWJZ4iR+C0rkNfJw==
8+
aws_profile: ""
9+
lastmodified: "2025-11-04T15:10:13Z"
10+
mac: ENC[AES256_GCM,data:YE1yjHNTmUZbyVmth7MFdsi/sqFotVACCRsowR1+dBbJWRgijPpp0ouH386KgivJ1hCBFSTAYgtkisYHNkvFlR7cYPw9NcfE19GLL67q/o5nTpEhCwPe2YsntySLCXiPqH0EMuI8QqC9KM99kvlFTLepdG9mvIkUSjiHiF5aiVM=,iv:QB2k/+hZJ8AWr6nJigzybqR0XmkmZ2FYD8HhpI3ZD18=,tag:/fy/71/y9uNufCjmT1FYIQ==,type:str]
11+
unencrypted_suffix: _unencrypted
12+
version: 3.10.2

infra/testnet/test.yaml

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)