Skip to content

Commit dfd330f

Browse files
authored
Merge branch 'NillionNetwork:main' into main
2 parents 37699d3 + 3dc50e8 commit dfd330f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+1403
-412
lines changed

.env.test

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
# Variables for nildb
12
APP_DB_NAME_DATA=test_datablocks_data
23
APP_DB_NAME_PRIMARY=test_datablocks
3-
APP_DB_URI=mongodb://localhost:27017
4+
APP_DB_URI=mongodb://localhost:30017
45
# If nilcomm is required in a test it should be enabled as a test fixture parameter, enabling here causes all tests to spin up conflicting consumers and producers
56
APP_ENABLED_FEATURES=migrations
67
APP_LOG_LEVEL=debug
@@ -10,3 +11,11 @@ APP_MQ_URI=amqp://guest:guest@localhost:5672
1011
APP_NODE_SECRET_KEY=ac8d429739597744f5c638a069aa641d66dce6478580aa6369dab47ea47abbeb
1112
APP_NODE_PUBLIC_ENDPOINT=http://localhost:8081
1213
APP_PORT=8081
14+
15+
# Variables for nilauth and nilchain
16+
NILLION_NILAUTH_URL=http://127.0.0.1:30921
17+
NILLION_NILCHAIN_JSON_RPC=http://127.0.0.1:30648
18+
19+
# Variables for the nuc client payer
20+
NILLION_NILCHAIN_PRIVATE_KEY_0=9a975f567428d054f2bf3092812e6c42f901ce07d9711bc77ee2cd81101f42c5
21+
NILLION_NILCHAIN_PRIVATE_KEY_1=1e491133b9408b39572a29f91644873decea554224b20e2b0b923aeb860a1c18

.github/workflows/ci.yaml

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -27,26 +27,6 @@ jobs:
2727
needs: check
2828
runs-on: ubuntu-latest
2929

30-
services:
31-
rabbitmq:
32-
image: rabbitmq:4
33-
ports:
34-
- 5672:5672
35-
options: >-
36-
--health-cmd "rabbitmq-diagnostics -q ping"
37-
--health-interval 10s
38-
--health-timeout 5s
39-
--health-retries 5
40-
mongodb:
41-
image: mongo:8.0
42-
ports:
43-
- 27017:27017
44-
options: >-
45-
--health-cmd "mongosh --eval 'db.runCommand(\"ping\").ok'"
46-
--health-interval 10s
47-
--health-timeout 5s
48-
--health-retries 5
49-
5030
steps:
5131
- uses: actions/checkout@v4
5232
- uses: actions/setup-node@v4

bin/credentials.ts

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

docker/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This is test infra.

docker/docker-compose.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
services:
2+
mongo:
3+
image: mongo:8
4+
ports:
5+
- "30017:27017"
6+
7+
rabbitmq:
8+
image: rabbitmq:4-management
9+
ports:
10+
- "30672:5672" # main server
11+
- "30673:15672" # management ui
12+
13+
postgres:
14+
image: postgres:17
15+
environment:
16+
POSTGRES_PASSWORD: postgres
17+
ports:
18+
- "30432:5432"
19+
20+
nilchain:
21+
image: ghcr.io/nillionnetwork/nilchaind:v0.2.5
22+
volumes:
23+
- ./nilchaind:/opt/nilchaind-configs
24+
entrypoint: ["/bin/sh", "-c", "cp -r /opt/nilchaind-configs /opt/nilchaind && nilchaind start --home /opt/nilchaind"]
25+
ports:
26+
- "30648:26648" # JSON RPC
27+
- "30649:26649" # gRPC
28+
- "30650:26650" # REST
29+
30+
nilauth:
31+
image: public.ecr.aws/k5d9x2g2/nilauth:380c888dfaf7caac6ba4beb9de89f1c42d587c08
32+
depends_on:
33+
- postgres
34+
- nilchain
35+
volumes:
36+
- ./nilauth/config.test.yaml:/opt/config.yaml
37+
command: ["--config-file", "/opt/config.yaml"]
38+
ports:
39+
- "30921:30921" # main server
40+
- "30022:39022" # metrics server

docker/nilauth/config.test.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
server:
2+
bind_endpoint: 0.0.0.0:30921
3+
4+
private_key:
5+
hex: 7c5c8d3114ac2410249ca2baae7dec86ac2950a389ac44a5fdca8941b92b6c86
6+
7+
metrics:
8+
bind_endpoint: 0.0.0.0:30022
9+
10+
payments:
11+
nilchain_url: http://nilchain:30648
12+
13+
subscriptions:
14+
renewal_threshold_seconds: 60
15+
length_seconds: 120
16+
dollar_cost: 1
17+
18+
token_price:
19+
api_key: abc
20+
base_url: http://172.17.0.1:59123
21+
22+
postgres:
23+
url: postgres://postgres:postgres@db:30432/postgres
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"key": "2df7e9ed510558a71905f92c",
3+
"addrs": []
4+
}

docker/nilchaind/config/app.toml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
app-db-backend = ""
2+
halt-height = 0
3+
halt-time = 0
4+
iavl-cache-size = 1000
5+
iavl-disable-fastnode = false
6+
index-events = []
7+
inter-block-cache = true
8+
min-retain-blocks = 0
9+
minimum-gas-prices = "0stake"
10+
pruning = "custom"
11+
pruning-interval = 100
12+
pruning-keep-recent = 1000
13+
query-gas-limit = "0"
14+
15+
[api]
16+
address = "tcp://0.0.0.0:26650"
17+
enable = true
18+
enabled-unsafe-cors = true
19+
max-open-connections = 1000
20+
rpc-max-body-bytes = 1000000
21+
rpc-read-timeout = 10
22+
rpc-write-timeout = 0
23+
swagger = true
24+
25+
[grpc]
26+
address = "0.0.0.0:26649"
27+
enable = true
28+
max-recv-msg-size = "10485760"
29+
max-send-msg-size = "2147483647"
30+
31+
[grpc-web]
32+
enable = true
33+
34+
[mempool]
35+
max-txs = -1
36+
37+
[state-sync]
38+
snapshot-interval = 0
39+
snapshot-keep-recent = 2
40+
41+
[streaming.abci]
42+
keys = []
43+
plugin = ""
44+
stop-node-on-err = true
45+
46+
[telemetry]
47+
datadog-hostname = ""
48+
enable-hostname = false
49+
enable-hostname-label = false
50+
enable-service-label = false
51+
enabled = false
52+
global-labels = []
53+
metrics-sink = ""
54+
prometheus-retention-time = 0
55+
service-name = ""
56+
statsd-addr = ""
57+
58+
[wasm]
59+
lru_size = 0
60+
query_gas_limit = 300000
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# This is a TOML config file.
2+
# For more information, see https://github.com/toml-lang/toml
3+
4+
###############################################################################
5+
### Client Configuration ###
6+
###############################################################################
7+
8+
# The network chain ID
9+
chain-id = "nillion-chain-devnet"
10+
11+
# The keyring's backend, where the keys are stored (os|file|kwallet|pass|test|memory)
12+
keyring-backend = "test"
13+
14+
# CLI output format (text|json)
15+
output = "text"
16+
17+
# <host>:<port> to CometBFT RPC interface for this chain
18+
node = "tcp://localhost:26657"
19+
20+
# Transaction broadcasting mode (sync|async)
21+
broadcast-mode = "sync"
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
abci = "socket"
2+
db_backend = "goleveldb"
3+
db_dir = "data"
4+
filter_peers = false
5+
genesis_file = "config/genesis.json"
6+
log_format = "plain"
7+
log_level = "info"
8+
moniker = "nilchaind"
9+
node_key_file = "config/node_key.json"
10+
priv_validator_key_file = "config/priv_validator_key.json"
11+
priv_validator_laddr = ""
12+
priv_validator_state_file = "data/priv_validator_state.json"
13+
proxy_app = "tcp://0.0.0.0:26658"
14+
version = "0.38.6"
15+
16+
[blocksync]
17+
version = "v0"
18+
19+
[consensus]
20+
create_empty_blocks = true
21+
create_empty_blocks_interval = "0s"
22+
double_sign_check_height = 0
23+
peer_gossip_sleep_duration = "100ms"
24+
peer_query_maj23_sleep_duration = "2s"
25+
skip_timeout_commit = true
26+
timeout_commit = "200ms"
27+
timeout_precommit = "200ms"
28+
timeout_precommit_delta = "500ms"
29+
timeout_prevote = "200ms"
30+
timeout_prevote_delta = "500ms"
31+
timeout_propose = "200ms"
32+
timeout_propose_delta = "500ms"
33+
wal_file = "data/cs.wal/wal"
34+
35+
[instrumentation]
36+
max_open_connections = 3
37+
namespace = "cometbft"
38+
prometheus = false
39+
prometheus_listen_addr = ":26660"
40+
41+
[mempool]
42+
broadcast = true
43+
cache_size = 10000
44+
experimental_max_gossip_connections_to_non_persistent_peers = 0
45+
experimental_max_gossip_connections_to_persistent_peers = 0
46+
keep-invalid-txs-in-cache = false
47+
max_batch_bytes = 0
48+
max_tx_bytes = 1048576
49+
max_txs_bytes = 1073741824
50+
recheck = true
51+
size = 5000
52+
type = "flood"
53+
wal_dir = ""
54+
55+
[p2p]
56+
addr_book_file = "config/addrbook.json"
57+
addr_book_strict = true
58+
allow_duplicate_ip = false
59+
dial_timeout = "3s"
60+
external_address = ""
61+
flush_throttle_timeout = "100ms"
62+
handshake_timeout = "20s"
63+
laddr = "tcp://0.0.0.0:26656"
64+
max_num_inbound_peers = 40
65+
max_num_outbound_peers = 10
66+
max_packet_msg_payload_size = 1024
67+
persistent_peers = ""
68+
persistent_peers_max_dial_period = "0s"
69+
pex = true
70+
private_peer_ids = ""
71+
recv_rate = 5120000
72+
seed_mode = false
73+
seeds = ""
74+
send_rate = 5120000
75+
unconditional_peer_ids = ""
76+
77+
[rpc]
78+
cors_allowed_headers = ["Origin", "Accept", "Content-Type", "X-Requested-With", "X-Server-Time"]
79+
cors_allowed_methods = ["HEAD", "GET", "POST"]
80+
cors_allowed_origins = []
81+
experimental_close_on_slow_client = false
82+
experimental_subscription_buffer_size = 200
83+
experimental_websocket_write_buffer_size = 200
84+
grpc_laddr = ""
85+
grpc_max_open_connections = 900
86+
laddr = "tcp://0.0.0.0:26648"
87+
max_body_bytes = 1000000
88+
max_header_bytes = 1048576
89+
max_open_connections = 900
90+
max_subscription_clients = 100
91+
max_subscriptions_per_client = 5
92+
pprof_laddr = "localhost:6060"
93+
timeout_broadcast_tx_commit = "10s"
94+
tls_cert_file = ""
95+
tls_key_file = ""
96+
unsafe = false
97+
98+
[statesync]
99+
chunk_fetchers = "4"
100+
chunk_request_timeout = "10s"
101+
discovery_time = "15s"
102+
enable = false
103+
rpc_servers = ""
104+
temp_dir = ""
105+
trust_hash = ""
106+
trust_height = 0
107+
trust_period = "168h0m0s"
108+
109+
[storage]
110+
discard_abci_responses = false
111+
112+
[tx_index]
113+
indexer = "kv"
114+
psql-conn = ""

0 commit comments

Comments
 (0)