Skip to content

Commit 57f04a2

Browse files
committed
chore: re-init repository
To prepare for public releases, the repository needs to be reinitialized
0 parents  commit 57f04a2

File tree

282 files changed

+77795
-0
lines changed

Some content is hidden

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

282 files changed

+77795
-0
lines changed

.cargo/config.toml

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[net]
2+
git-fetch-with-cli = true

.dockerignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Copy almost everything to the builder image docker context
2+
# dotfiles in the repo root
3+
/.*
4+
/target/

.editorconfig

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
root = true
2+
[*]
3+
indent_style=tab
4+
indent_size=tab
5+
tab_width=4
6+
end_of_line=lf
7+
charset=utf-8
8+
trim_trailing_whitespace=true
9+
max_line_length=100
10+
insert_final_newline=true
11+
12+
[*.yml]
13+
indent_style=space
14+
indent_size=2
15+
tab_width=8
16+
end_of_line=lf
17+
18+
[*.sh]
19+
indent_style=space
20+
indent_size=4
21+
tab_width=8
22+
end_of_line=lf
23+
24+
[*.json]
25+
indent_style=space
26+
indent_size=2
27+
tab_width=8
28+
end_of_line=lf
29+

.envrc

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#!/usr/bin/env bash
2+
export DOCKER_BUILDKIT=1
3+
4+
export RUN_DIR="$(pwd)/.run"
5+
export DATA_DIR="$RUN_DIR/data"
6+
mkdir -p $DATA_DIR
7+
chmod 777 $RUN_DIR $DATA_DIR
8+
export CARDANO_CONFIG_DIR="$(pwd)/docker/config"
9+
export KUPO_WORKDIR="$RUN_DIR/kupo-db"
10+
mkdir -p $KUPO_WORKDIR
11+
12+
source devnet/.envrc
13+
14+
if [[ -f "$PWD/.envrc.local" ]]; then
15+
echo using local envrc
16+
source "$PWD/.envrc.local"
17+
fi
18+
19+
if [[ "$OSTYPE" == "darwin"* ]]; then
20+
FLAKE_SYSTEM_ARGS="--system x86_64-darwin"
21+
fi
22+
23+
if [[ -z "$SKIP_FLAKE" ]]; then
24+
echo using flake
25+
if [[ $(type -t use_flake) != function ]]; then
26+
echo "ERROR: use_flake function missing."
27+
echo "Please update direnv to v2.30.0 or later."
28+
else
29+
if [[ -n "$NIX_SHELL" ]]; then
30+
use_flake $NIX_SHELL $FLAKE_SYSTEM_ARGS
31+
else
32+
use_flake $FLAKE_SYSTEM_ARGS
33+
fi
34+
fi
35+
fi

.github/ISSUE_TEMPLATE/bug_report.md

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior
15+
16+
**Expected behavior**
17+
A clear and concise description of what you expected to happen.
18+
19+
**Additional resources**
20+
If applicable, add logs, screenshots etc. to help explain your problem.
21+
22+
**Environment**
23+
- OS: [e.g. linux, darwin]
24+
- Version [e.g. 1.0.0]
25+
- run parameters
26+
27+
**Additional context**
28+
Add any other context about the problem here.
+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

.github/earthly-setup/action.yml

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: 'Earthly Setup'
2+
description: 'Install Earthly, and configure SSH & mTLS'
3+
4+
inputs:
5+
ssh_key:
6+
description: 'SSH key for setting up known_hosts and ssh-agent'
7+
required: false
8+
config_tar:
9+
description: 'Tarball containing earthly certs and configuration'
10+
required: false
11+
12+
runs:
13+
using: composite
14+
steps:
15+
- name: Setup earthly
16+
uses: earthly/actions-setup@v1
17+
with:
18+
github-token: ${{ github.token }}
19+
use-cache: false
20+
version: ^0.8.0
21+
22+
- name: Configure Secrets
23+
shell: bash
24+
env:
25+
EARTHLY_TAR: ${{ inputs.config_tar }}
26+
run: |
27+
if [[ "${{ inputs.config_tar }}" != "" ]]; then
28+
mkdir -p ~/.earthly
29+
printf "%s" "$EARTHLY_TAR" | base64 -d | tar -C ~/.earthly --zstd -x
30+
fi
31+
if [[ "${{ inputs.ssh_key }}" != "" ]]; then
32+
mkdir -p ~/.ssh
33+
ssh-keyscan github.com >> ~/.ssh/known_hosts
34+
ssh-agent -a "$SSH_AUTH_SOCK" > /dev/null || true
35+
ssh-add - <<< "${{ inputs.ssh_key }}"
36+
fi

.github/pull_request_template.md

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Description
2+
3+
Add your description here, if it fixes a particular issue please provide a
4+
[link](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword=)
5+
to the issue.
6+
7+
# Checklist
8+
9+
- [ ] Commit sequence broadly makes sense and commits have useful messages.
10+
- [ ] New tests are added if needed and existing tests are updated.
11+
- [ ] Relevant logging and metrics added
12+
- [ ] CI passes. See note on CI.
13+
- [ ] Any changes are noted in the `changelog.md` for affected crate
14+
- [ ] Self-reviewed the diff
15+
16+
# Note on CI
17+
If your PR is from a fork, the necessary CI jobs won't trigger automatically for security reasons.
18+
You will need to get someone with write privileges. Please contact IOG Partner Chains developers to do this
19+
for you.
20+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!/bin/bash
2+
set -e
3+
4+
# Input parameters
5+
SHA=$1
6+
7+
# Repository and image configurations
8+
IMAGE_REPO="689191102645.dkr.ecr.eu-central-1.amazonaws.com/substrate-node"
9+
10+
# Manifest configurations
11+
MANIFEST_FILENAME="manifest-sha-$SHA.yaml"
12+
MANIFEST_TEMPLATE="./manifest.yaml"
13+
14+
# GitHub configurations for the ArgoCD repository
15+
ARGOCD_CONTENT_PATH="integration-testing/$MANIFEST_FILENAME"
16+
ARGOCD_REPO_API_ENDPOINT="https://api.github.com/repos/input-output-hk/sidechains-argocd/contents/$ARGOCD_CONTENT_PATH"
17+
BRANCH_NAME="main"
18+
19+
# Message for the commit
20+
MESSAGE="ci: Deploy integration-testing environment for SHA #$SHA"
21+
22+
# Create the new manifest file in the current directory
23+
sed "s|{{SHA}}|$SHA|g; s|{{SUBSTRATE_NODE_IMAGE}}|$IMAGE_REPO:$SHA|g" "$MANIFEST_TEMPLATE" > "$MANIFEST_FILENAME"
24+
25+
# Encode file in Base64 as GitHub API expects this format
26+
CONTENT=$(base64 -w 0 "$MANIFEST_FILENAME")
27+
28+
# Create or update the file in the ArgoCD repo using the GitHub API
29+
gh api "$ARGOCD_REPO_API_ENDPOINT" \
30+
--method PUT \
31+
--field message="$MESSAGE" \
32+
--field content="$CONTENT" \
33+
--field branch="$BRANCH_NAME"
+140
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
apiVersion: v1
2+
kind: Namespace
3+
metadata:
4+
name: integration-testing
5+
---
6+
apiVersion: apps/v1
7+
kind: Deployment
8+
metadata:
9+
name: substrate-node-sha-{{SHA}}
10+
namespace: integration-testing
11+
labels:
12+
app: substrate-node
13+
unique: substrate-node-sha-{{SHA}}
14+
spec:
15+
replicas: 1
16+
selector:
17+
matchLabels:
18+
app: substrate-node
19+
unique: substrate-node-sha-{{SHA}}
20+
template:
21+
metadata:
22+
labels:
23+
app: substrate-node
24+
unique: substrate-node-sha-{{SHA}}
25+
spec:
26+
containers:
27+
- name: substrate-node
28+
image: {{SUBSTRATE_NODE_IMAGE}}
29+
resources:
30+
limits:
31+
memory: "4096Mi"
32+
cpu: "1000m"
33+
requests:
34+
memory: "4096Mi"
35+
cpu: "1000m"
36+
env:
37+
- name: DB_SYNC_POSTGRES_CONNECTION_STRING
38+
value: "postgres://postgres:[email protected]:5432/cexplorer"
39+
- name: CARDANO_SECURITY_PARAMETER
40+
value: "432"
41+
- name: CARDANO_ACTIVE_SLOTS_COEFF
42+
value: "0.05"
43+
- name: MC__FIRST_EPOCH_TIMESTAMP_MILLIS
44+
value: "1666656000000"
45+
- name: MC__FIRST_EPOCH_NUMBER
46+
value: "0"
47+
- name: MC__EPOCH_DURATION_MILLIS
48+
value: "86400000"
49+
- name: MC__FIRST_SLOT_NUMBER
50+
value: "0"
51+
# The below values can be obtained with: scripts/echo_kubernetes_yamls.sh
52+
- name: CHAIN_ID
53+
value: "0"
54+
- name: THRESHOLD_NUMERATOR
55+
value: "2"
56+
- name: THRESHOLD_DENOMINATOR
57+
value: "3"
58+
- name: GENESIS_COMMITTEE_UTXO
59+
value: "67fa24dcda2ef78acf69dee758292d659493b85bf540a95b371cff4b10150359#1"
60+
- name: GOVERNANCE_AUTHORITY
61+
value: "88965c0bc8902c5056ca285684bc56e6498c77b6e04005cd78019175"
62+
- name: COMMITTEE_CANDIDATE_ADDRESS
63+
value: "addr_test1wrnv62hjzfj0uapagpgzuhh4nxzrvkr06y6lxyhpun32usqenuxw9"
64+
- name: D_PARAMETER_POLICY_ID
65+
value: "d7f493bbff9f17eefa50a3358d4609c71fc481de109eea52ee9c8a7e"
66+
- name: PERMISSIONED_CANDIDATES_POLICY_ID
67+
value: "393c202bf632a8914e5cca1ccb172f0564105f5b31ef05585d785e02"
68+
- name: SIDECHAIN_BLOCK_BENEFICIARY
69+
value: "0x0000000000000000000000000000000000000000000000000000000000000001"
70+
- name: BLOCK_STABILITY_MARGIN
71+
value: "0"
72+
args:
73+
- "--base-path"
74+
- "/tmp/alice"
75+
- "--chain"
76+
- "dev"
77+
- "--alice"
78+
- "--node-key"
79+
- "0000000000000000000000000000000000000000000000000000000000000001"
80+
- "--unsafe-rpc-external"
81+
- "--rpc-port"
82+
- "9933"
83+
- "--rpc-cors=all"
84+
- "--prometheus-port"
85+
- "9615"
86+
- "--prometheus-external"
87+
ports:
88+
- containerPort: 30333
89+
name: p2p
90+
- containerPort: 9945
91+
name: ws-port
92+
- containerPort: 9933
93+
name: rpc-port
94+
- containerPort: 9615
95+
name: prometheus
96+
volumeMounts:
97+
- name: substrate-node-data
98+
mountPath: /data
99+
- name: ipc
100+
mountPath: /ipc
101+
volumes:
102+
- name: substrate-node-data
103+
persistentVolumeClaim:
104+
claimName: integration-testing-claim-substrate-node-sha-{{SHA}}-data
105+
- name: ipc
106+
emptyDir: {}
107+
---
108+
apiVersion: v1
109+
kind: Service
110+
metadata:
111+
name: sha-{{SHA}}-service
112+
namespace: integration-testing
113+
spec:
114+
type: NodePort
115+
selector:
116+
app: substrate-node
117+
unique: substrate-node-sha-{{SHA}}
118+
ports:
119+
- name: p2p-port
120+
port: 30333
121+
targetPort: 30333
122+
- name: rpc-port
123+
port: 9933
124+
targetPort: 9933
125+
- name: substrate-node-metrics
126+
port: 9615
127+
targetPort: 9615
128+
---
129+
apiVersion: v1
130+
kind: PersistentVolumeClaim
131+
metadata:
132+
name: integration-testing-claim-substrate-node-sha-{{SHA}}-data
133+
namespace: integration-testing
134+
spec:
135+
accessModes:
136+
- ReadWriteMany
137+
storageClassName: aws-efs-storageclass
138+
resources:
139+
requests:
140+
storage: 10Gi

0 commit comments

Comments
 (0)