Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.2.0 #610

Merged
merged 116 commits into from
May 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
116 commits
Select commit Hold shift + click to select a range
2a76c36
feat: secure p2p (#354)
ChaoticTempest Nov 23, 2023
0357770
feat: implement signing (#380)
itegulov Nov 23, 2023
3cb44f3
Protocol loop should continue on error (#387)
ChaoticTempest Nov 28, 2023
5e03bf3
fix: ignore RUSTSEC-2023-0071 (#394)
itegulov Nov 29, 2023
6f46b0b
fix: make Lake indexer work with macos (#392)
itegulov Dec 1, 2023
3885f4e
removed signer node ILBs (#397)
kmaus-near Dec 11, 2023
0af4a25
chore: structured errors (#391)
ChaoticTempest Dec 11, 2023
b4a9eaa
feat: implement terraform for multichain (#390)
itegulov Dec 11, 2023
bd6127e
fix: decrypt message during joining phase (#399)
itegulov Dec 12, 2023
9a2e848
fix: Added queue for sending encrypted messages (#395)
ChaoticTempest Dec 13, 2023
5755960
feat: implement key derivation (#402)
itegulov Dec 16, 2023
04d6016
fix: testnet rpc url (#404)
itegulov Jan 9, 2024
0ebb95d
feat: add persistent secret storage (#396)
itegulov Jan 10, 2024
0815884
make testnet near_root_account = testnet (#410)
ppca Jan 11, 2024
7a524a3
fix: Format error so context can show full chain (#408)
ChaoticTempest Jan 11, 2024
d27a3be
Randomly assign triples to a node after creation (#412)
DavidM-D Jan 16, 2024
04aa096
chore: cleanup protocol types (#417)
ChaoticTempest Jan 16, 2024
d8ab139
create terraform for multichain testnet and prod (#411)
ppca Jan 17, 2024
e1630e9
Determine Participant Id automatically (#400)
volovyks Jan 17, 2024
155b753
Expose root public key in mpc contract (#421)
ChaoticTempest Jan 17, 2024
804e164
differentiate the logging messages (#422)
ppca Jan 18, 2024
497aa04
feat: Added the ability to refresh the protocol on failures (#423)
ChaoticTempest Jan 23, 2024
3ecc83b
adding experiment with self calls (#401)
bowenwang1996 Jan 23, 2024
a3dc244
fix terraform multichain (#432)
ppca Jan 23, 2024
94f9c66
use candidates instead of participants (#429)
volovyks Jan 24, 2024
bc85d66
chore: cleanup testing (#440)
ChaoticTempest Jan 31, 2024
f01d398
Contract logs (#443)
volovyks Feb 7, 2024
e922b08
try fix CI (#459)
ppca Feb 13, 2024
22a3726
persist triples (#444)
ppca Feb 13, 2024
68e6076
add more info to node state output (#450)
ppca Feb 13, 2024
8288f95
Added key versions (#453)
DavidM-D Feb 13, 2024
ef77eb0
fix: start triple generation and presignature generation when #mine <…
ppca Feb 13, 2024
0b90387
fix: protocol timeout (#462)
ChaoticTempest Feb 14, 2024
2f337f1
5x faster unit test compilation on nix dev env (#467)
DavidM-D Feb 20, 2024
994a17e
Removed spurious recompile on integration tests (#468)
DavidM-D Feb 23, 2024
a6c9f8d
restore triple/presignature generation condition and optimize triple …
ppca Feb 27, 2024
bc4c134
Ignore RUSTSEC-2024-0019 (#472)
ChaoticTempest Mar 6, 2024
6a79bd5
GCE Based Multichain (#458)
kmaus-near Mar 6, 2024
d46cb54
feat: Persist block height (#465)
ChaoticTempest Mar 6, 2024
a228d2b
fix/test: derive recovery id for same address (#470)
ChaoticTempest Mar 6, 2024
fa99e10
fix: vm terraform minor fixes (#475)
ppca Mar 6, 2024
89d8636
Update multichain-prod.yml (#474)
kmaus-near Mar 6, 2024
6d78a95
Update multichain-prod.yml (#476)
kmaus-near Mar 6, 2024
3dfe672
Update multichain-prod.yml (#477)
kmaus-near Mar 6, 2024
076ceac
Update multichain-prod.yml (#478)
kmaus-near Mar 7, 2024
206ef4d
feat: Added stockpiling beaver triples at the start (#413)
ChaoticTempest Mar 8, 2024
81453f8
nit: remove excessive logging of gcp (#479)
ppca Mar 8, 2024
8709df5
Revert "Removed spurious recompile on integration tests (#468)" (#483)
DavidM-D Mar 11, 2024
df3761d
Contract reinit should not be possible (#491)
volovyks Mar 14, 2024
e729a9a
feat: add prometheus metrics (#490)
ppca Mar 14, 2024
9c133d3
Added a missing step to the integration tests instructions (#495)
DavidM-D Mar 18, 2024
2dc7b0a
feat: Added connection pool for offline participants (#446)
ChaoticTempest Mar 18, 2024
dbe9c05
Feat: added partner code for infrastructure, and updated dev code (#493)
kmaus-near Mar 18, 2024
9ef607f
feat(partner use): rust script to generate cipher keys (#494)
ppca Mar 18, 2024
489c1d8
feat: stop infinite loop of triple timeout by adding cache for failed…
ppca Mar 19, 2024
dd591e2
fix: stockpile condition (#497)
ppca Mar 19, 2024
10a61f6
Keep the build caches between builds (#500)
DavidM-D Mar 19, 2024
994a455
partner deploy: var names for easier onboard (#496)
ppca Mar 19, 2024
f31e39f
FIX: add cloud nat and router (#503)
kmaus-near Mar 20, 2024
808f6e5
Remove automatic vote mechanism (#498)
volovyks Mar 20, 2024
3009c12
fix: Added max_concurrent_generation for limiting triple timeouts (#499)
ChaoticTempest Mar 20, 2024
acab136
partner: add metrics for latest block height (#505)
ppca Mar 20, 2024
6f4fc44
Make the key version mandatory (#509)
DavidM-D Mar 21, 2024
f7ac4a5
Feat: Add multichain env that mirrors partners (#511)
kmaus-near Mar 22, 2024
bcef52a
Making sure we're not fetching dependencies from the heads of other r…
DavidM-D Mar 22, 2024
cebec45
FIX: remove dev loadbalancer (#516)
kmaus-near Mar 22, 2024
d3fc7f7
fix: signature timeout and add triple latency metric (#517)
ppca Mar 23, 2024
58935e4
fix: added naive intersection check for bypassing threshold (#504)
ChaoticTempest Mar 23, 2024
ac040bc
Switched over to a newer version of cait sith (#518)
DavidM-D Mar 23, 2024
d070def
Multichain load tests (#510)
volovyks Mar 25, 2024
d1207fc
add more metric (#519)
ppca Mar 25, 2024
590c903
No delay experiment (#512)
volovyks Mar 25, 2024
6542630
add tracing for error signature (#521)
ppca Mar 25, 2024
0a3986b
contract call limits (#520)
volovyks Mar 26, 2024
d6673c5
feat: configure presignature generation to limit max supply of presig…
ChaoticTempest Mar 26, 2024
5919b6f
fix: protocol too fast and spamming messages (#522)
ChaoticTempest Mar 26, 2024
864712b
add metric for contract version (#523)
ppca Mar 26, 2024
5598793
FIX: update dev env image (#532)
kmaus-near Mar 26, 2024
48134c9
Remove ciphertext debug logs spam (#533)
ChaoticTempest Mar 26, 2024
24b0bd3
check if the responder is a participant (#534)
volovyks Mar 27, 2024
f701d97
fix: issues with already taken triple and presig (#535)
ChaoticTempest Mar 27, 2024
50f3421
add metrics around success rates (#530)
ppca Mar 27, 2024
b224e3e
modify default timeout for triple (#537)
ppca Mar 27, 2024
d131645
fix: triple persistance tests (#540)
ppca Mar 28, 2024
b775b23
Make multichain docker image builds in release mode (#542)
ChaoticTempest Mar 28, 2024
aa2c7c4
terraform: add tuning perf env params into terraform (#541)
ppca Mar 28, 2024
bcbb5d4
Add send_encrypted metric (#544)
ppca Mar 28, 2024
51a48ec
Request counter (#531)
volovyks Mar 29, 2024
e1cbbd0
fix: add multichain_sign_requests_count_mine to correct sign success …
ppca Mar 29, 2024
dba79cc
feat: /msg endpoint now takes vectorized encrypted messages (#549)
ChaoticTempest Apr 1, 2024
d24cae0
chore: cleanup triple storage and unnecessary clones (#550)
ChaoticTempest Apr 2, 2024
e8df392
Added init_running contract function (#536)
volovyks Apr 3, 2024
3f0bb04
fix h2 version (#561)
ppca Apr 4, 2024
477775f
Feat: dev deployment pipeline (#557)
kmaus-near Apr 4, 2024
fa81364
Node and contract version metrics (#553)
volovyks Apr 5, 2024
c6e1d66
clear_payloads func (#551)
volovyks Apr 9, 2024
96ec17f
Feat: Dev Contract deployment automation (#562)
kmaus-near Apr 12, 2024
919c638
Subaccounts for load tests (#552)
volovyks Apr 15, 2024
e89ff43
vote_kick test (#556)
volovyks Apr 16, 2024
c173547
Make sure when we fail in the busy loop we cleanup (#586)
DavidM-D May 3, 2024
fded16b
fix: stop infinite process of presignature message missing triples (#…
ppca May 8, 2024
3568eb7
fix: only retry signature generators with proposer = me (#588)
ppca May 8, 2024
28a8c69
make sure signing works after resharing (#572)
volovyks May 10, 2024
15b3b86
Lowered the minimum gas limit and upped the depth (#589)
DavidM-D May 10, 2024
6ceb630
FIX: removed workflow automation for mpc cloudrun envs (#582)
kmaus-near May 13, 2024
aac2fca
Removed old testnet VM instances (#584)
kmaus-near May 13, 2024
38f5a96
feat: separate sign key for signing protocol messages (#565)
ChaoticTempest May 13, 2024
2227afb
contract: make multichain contract versioned (#558)
ppca May 13, 2024
a0092db
fix: allow triple memory only (#594)
ChaoticTempest May 14, 2024
0965fb7
fix: possible deadlock in load triple (#595)
ppca May 15, 2024
4d19bec
test: node back online (#567)
ppca May 15, 2024
ffa0802
chore: Made failed generators only get added on self proposers (#597)
ChaoticTempest May 20, 2024
b51097f
remove infra code for non-vm (#600)
ppca May 22, 2024
bf4c919
Contract API and other functions grouped (#604)
volovyks May 22, 2024
480feea
fix terraform code for getting sign_sk (#607)
ppca May 23, 2024
1e4a743
v0.2.0 (#609)
volovyks May 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .envrc
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
use flake 'github:DavidM-D/workspaces?dir=rust'
use flake .
34 changes: 34 additions & 0 deletions .github/workflows/deploy-multichain-dev-contract.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Deploy Dev Smart Contract
on:
pull_request:
types: [closed]
branches:
- develop

jobs:
deploy-contract:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- name: add JSON contract
run: mkdir -p ~/.near-credentials/testnet && echo '${{ secrets.DEV_CONTRACT_JSON }}' > ~/.near-credentials/testnet/v5.multichain-mpc-dev.testnet.json

- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 'latest'

- name: Install near-cli
run: 'npm install -g near-cli'

- name: Install Rust
run: "curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y"

- name: debug
run: cat ~/.near-credentials/testnet/v5.multichain-mpc-dev.testnet.json

- name: Cargo Build
run: |
source $HOME/.cargo/env && cd ./contract ; rustup target add wasm32-unknown-unknown && cargo build --target wasm32-unknown-unknown --release && \
cd .. && (yes || true) | near deploy v5.multichain-mpc-dev.testnet target/wasm32-unknown-unknown/release/mpc_contract.wasm
2 changes: 1 addition & 1 deletion .github/workflows/integrations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Compile Contract
run: cargo build -p mpc-contract --target wasm32-unknown-unknown --release
run: cargo build -p mpc-contract --target wasm32-unknown-unknown --release --target-dir target/seperate_wasm

- name: Test
run: cargo test -p mpc-recovery-integration-tests mpc --jobs 1 -- --test-threads 1
Expand Down
40 changes: 40 additions & 0 deletions .github/workflows/multichain-contract.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Multichain Contract

on:
push:
branches:
- develop
pull_request:
paths:
- contract/**

env:
RUSTFLAGS: -D warnings
jobs:
test:
name: Test
strategy:
matrix:
os: [ubuntu-22.04-4core]
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v3

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
target: wasm32-unknown-unknown

- uses: Swatinem/rust-cache@v1

- name: Compile Contract
run: cargo build -p mpc-contract --target wasm32-unknown-unknown --release --target-dir target/seperate_wasm

- name: Test Contract
run: cd contract && cargo test --target x86_64-unknown-linux-gnu --release
env:
RUST_LOG: INFO
RUST_BACKTRACE: 1
59 changes: 59 additions & 0 deletions .github/workflows/multichain-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Deploy Multichain Dev.
on:
pull_request:
types: [closed]
branches:
- develop

env:
IMAGE: "us-east1-docker.pkg.dev/pagoda-discovery-platform-dev/multichain-public/multichain-dev"
TAG: ${{ github.sha }}

jobs:
build-mpc-recovery:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
name: "Checkout mpc-recovery"

- name: Login to GCP Artifact Registry
run: echo "$GOOGLE_CREDENTIALS" | docker login -u _json_key --password-stdin https://us-east1-docker.pkg.dev
env:
GOOGLE_CREDENTIALS: ${{ secrets.GCP_CREDENTIALS_DEV }}

- name: Build Docker image and push to Google Artifact Registry
id: docker-push-tagged
uses: docker/build-push-action@v4
with:
push: true
file: ./Dockerfile.multichain
tags: "${{ env.IMAGE }}:${{ env.TAG }}"

deploy:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
needs: build-mpc-recovery
steps:
- id: 'auth'
uses: 'google-github-actions/auth@v2'
with:
credentials_json: '${{ secrets.GCP_CREDENTIALS_DEV }}'

- name: 'Set up Cloud SDK'
uses: 'google-github-actions/setup-gcloud@v2'

- name: 'Set project'
run: 'gcloud config set project pagoda-discovery-platform-dev'

- name: 'Update Nodes'
run: |
gcloud compute instances update-container multichain-dev-0 --zone us-central1-a --container-image=${{ env.IMAGE }}:${{ env.TAG }} & \
gcloud compute instances update-container multichain-dev-1 --zone us-central1-a --container-image=${{ env.IMAGE }}:${{ env.TAG }} & \
gcloud compute instances update-container multichain-dev-2 --zone us-central1-a --container-image=${{ env.IMAGE }}:${{ env.TAG }} & \
gcloud compute instances update-container multichain-dev-3 --zone us-central1-a --container-image=${{ env.IMAGE }}:${{ env.TAG }} & \
gcloud compute instances update-container multichain-dev-4 --zone us-central1-a --container-image=${{ env.IMAGE }}:${{ env.TAG }} & \
gcloud compute instances update-container multichain-dev-5 --zone us-central1-a --container-image=${{ env.IMAGE }}:${{ env.TAG }} & \
gcloud compute instances update-container multichain-dev-6 --zone us-central1-a --container-image=${{ env.IMAGE }}:${{ env.TAG }} & \
gcloud compute instances update-container multichain-dev-7 --zone us-central1-a --container-image=${{ env.IMAGE }}:${{ env.TAG }}

9 changes: 8 additions & 1 deletion .github/workflows/multichain-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,15 @@ jobs:
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Configure AWS
run: |
# Fake AWS configuration for LocalStack
aws configure set region us-east-1
aws --profile default configure set aws_access_key_id "123"
aws --profile default configure set aws_secret_access_key "456"

- name: Compile Contract
run: cargo build -p mpc-contract --target wasm32-unknown-unknown --release
run: cargo build -p mpc-contract --target wasm32-unknown-unknown --release --target-dir target/seperate_wasm

- name: Build MPC Recovery Binary Locally
run: |
Expand Down
75 changes: 75 additions & 0 deletions .github/workflows/multichain-prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: Deploy Multichain Prod.
on:
workflow_dispatch:
inputs:
network:
type: choice
options:
- mainnet
- testnet
description: mainnet or testnet network
required: true
image:
description: Full Artifact Registry image with tag (e.g. us-east1-docker.pkg.dev/pagoda-discovery-platform-prod/multichain/multichain-< testnet | mainnet >)
required: true
tag:
description: Image tag that you wish to deploy, either by SHA or Version/latest
node_group:
type: choice
options:
- partner
- internal
description: Do you want to deploy the Parner nodes or internal Pagoda nodes?

jobs:
build-mpc-recovery:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
name: "Checkout mpc-recovery"

- name: Login to GCP Artifact Registry
run: echo "$GOOGLE_CREDENTIALS" | docker login -u _json_key --password-stdin https://us-east1-docker.pkg.dev
env:
GOOGLE_CREDENTIALS: ${{ secrets.GCP_CREDENTIALS_PROD }}

- name: Build Docker image and push to internal Google Artifact Registry
if: ${{ github.event.inputs.node_group == 'internal' }}
id: docker-push-tagged
uses: docker/build-push-action@v4
with:
push: true
file: ./Dockerfile.multichain
tags: "${{ github.event.inputs.image }}:${{ github.event.inputs.tag }}"

- name: Build Docker image and deploy partner nodes
if: ${{ github.event.inputs.node_group == 'partner' }}
id: docker-push-tagged-partner
uses: docker/build-push-action@v4
with:
push: true
file: ./Dockerfile.multichain
tags: "${{ github.event.inputs.image }}:${{ github.event.inputs.tag }}"

deploy:
if: ${{ github.event.inputs.node_group == 'internal' }}
runs-on: ubuntu-latest
needs: build-mpc-recovery
steps:
- id: 'auth'
uses: 'google-github-actions/auth@v2'
with:
credentials_json: '${{ secrets.GCP_CREDENTIALS_PROD }}'

- name: 'Set up Cloud SDK'
uses: 'google-github-actions/setup-gcloud@v2'

- name: 'Set project'
run: 'gcloud config set project pagoda-discovery-platform-prod'

- name: 'Update Nodes'
run: |
gcloud compute instances update-container multichain-${{ github.event.inputs.network }}-0 --zone us-central1-a --container-image=${{ github.event.inputs.image }}:${{ github.event.inputs.tag }} & \
gcloud compute instances update-container multichain-${{ github.event.inputs.network }}-1 --zone us-central1-a --container-image=${{ github.event.inputs.image }}:${{ github.event.inputs.tag }} & \
gcloud compute instances update-container multichain-${{ github.event.inputs.network }}-2 --zone us-central1-a --container-image=${{ github.event.inputs.image }}:${{ github.event.inputs.tag }}

7 changes: 2 additions & 5 deletions .github/workflows/terraform-dev.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
name: Terraform Dev

on:
workflow_run:
workflows: ["Docker Image"]
types:
- completed
workflow_dispatch:

jobs:
terraform_dev:
Expand All @@ -30,7 +27,7 @@ jobs:
# Initialize a new or existing Terraform working directory by creating initial files, loading any remote state, downloading modules, etc.
- name: Terraform Init
id: init
run: terraform init -backend-config backend-config-dev.tfvars
run: terraform init
env:
GOOGLE_CREDENTIALS: ${{ secrets.GCP_CREDENTIALS_DEV }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/terraform-feature-env-destroy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
# Initialize a new or existing Terraform working directory by creating initial files, loading any remote state, downloading modules, etc.
- name: Terraform Init
id: init
run: terraform init -backend-config backend-config-dev.tfvars
run: terraform init
env:
GOOGLE_CREDENTIALS: ${{ secrets.GCP_CREDENTIALS_DEV }}

Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/terraform-feature-env.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
name: Terraform Feature Env

on:
pull_request:
types: [reopened, opened, synchronize, edited]
workflow_dispatch:

jobs:
terraform_apply:
Expand Down Expand Up @@ -30,7 +29,7 @@ jobs:
# Initialize a new or existing Terraform working directory by creating initial files, loading any remote state, downloading modules, etc.
- name: Terraform Init
id: init
run: terraform init -backend-config backend-config-dev.tfvars
run: terraform init
env:
GOOGLE_CREDENTIALS: ${{ secrets.GCP_CREDENTIALS_DEV }}

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Compile Contract
run: cargo build -p mpc-contract --target wasm32-unknown-unknown --release
run: cargo build -p mpc-contract --target wasm32-unknown-unknown --release --target-dir target/seperate_wasm
- name: Compile
run: cargo check
- name: Test format
Expand All @@ -51,4 +51,4 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: audit
args: --ignore RUSTSEC-2020-0071 --ignore RUSTSEC-2023-0052 --ignore RUSTSEC-2022-0093
args: --ignore RUSTSEC-2020-0071 --ignore RUSTSEC-2023-0052 --ignore RUSTSEC-2022-0093 --ignore RUSTSEC-2023-0071 --ignore RUSTSEC-2024-0019
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@

flamegraph*.svg
tmp
*.log
Loading
Loading