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

main_to:main #48

Draft
wants to merge 67 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
f01dd2b
update pm workflow (#123)
boojamya Jan 23, 2023
01c415e
Make cli methods consistent, remove init funcs. fix test bleed due to…
agouin Apr 6, 2023
d5fa40f
Fix single signer state load bug (#131)
agouin Apr 6, 2023
12380d8
Update migrating.md (#127)
Neschadin Apr 7, 2023
c3a094e
Fix leader election flaky test (#133)
agouin Apr 19, 2023
a1d6bb8
Phase 1 of ICS (#130)
agouin Apr 20, 2023
1c09596
Wait for sign state flush on stop (#137)
agouin Apr 21, 2023
927c4af
Lint import aliases (#138)
agouin Apr 24, 2023
7e03e57
single signer multi chain (#139)
agouin Apr 25, 2023
f6df4ef
Make threshold validator chain ID agnostic (#140)
agouin Apr 25, 2023
1b83451
Interchain Security - one remote signer to rule them all (#122)
agouin Apr 26, 2023
6d2607d
go 1.20 (#141)
agouin Apr 27, 2023
074e1e9
swap tendermint with cometbft v0.37.0 (#142)
agouin Apr 28, 2023
219ce9f
key assignment feature (#144)
agouin May 3, 2023
08989c3
One config file to rule them all and in cryptography bind them (#147)
agouin May 10, 2023
c466a8c
updated usage (#148)
danbryan May 15, 2023
cf9a0ce
tidy up usage and flags (#149)
agouin May 15, 2023
eda0df9
v3 docs updates (#150)
agouin May 16, 2023
931f30c
grpc-multi-resolver (#151)
agouin May 16, 2023
aa4dc42
v3 polish (#153)
agouin May 24, 2023
3b8ef4f
Bump github.com/opencontainers/runc from 1.1.3 to 1.1.5 (#155)
dependabot[bot] Jun 7, 2023
8849625
Make horcrux a static executable (#157)
vimystic Jun 8, 2023
9db1d77
Remove depguard (#158)
vimystic Jun 14, 2023
54c540c
set and get nonces concurrently (#164)
agouin Jun 28, 2023
788974c
nonce rename (#165)
agouin Jul 6, 2023
782cbd8
Bump github.com/cosmos/cosmos-sdk from 0.47.1 to 0.47.3 (#163)
dependabot[bot] Jul 6, 2023
94057ad
Bump github.com/cometbft/cometbft from 0.37.0 to 0.37.2 (#167)
dependabot[bot] Jul 7, 2023
d23eb61
Fix multiresolver for IPs (#168)
agouin Jul 10, 2023
34c4db1
sign state signaling (#169)
agouin Jul 12, 2023
68d4265
threshold signer integration into local cosigner (#170)
agouin Jul 13, 2023
8eb5e28
Cosigner Security (#171)
agouin Jul 14, 2023
7c21a7e
CosignerSecurityECIES (#173)
agouin Jul 17, 2023
5252b60
Interchaintest for e2e tests (#174)
agouin Jul 18, 2023
d6b20b5
Bump github.com/containerd/containerd from 1.6.8 to 1.6.18 in /test (…
dependabot[bot] Jul 18, 2023
ac0a811
use go-ethereum ecies due to instability with ecies/go/v2 (#178)
agouin Jul 19, 2023
097a15a
Bump github.com/gin-gonic/gin from 1.8.1 to 1.9.1 in /test (#179)
dependabot[bot] Jul 19, 2023
1346f86
waiting for same block signature - timeout and max attempts (#184)
agouin Jul 25, 2023
6cf45a6
Vivek/156 : Downgrade golang version from 1.20 to 1.19 (#183)
vimystic Jul 25, 2023
f1c9264
fix raft store npe (#185)
agouin Jul 27, 2023
1944d3d
no concurrent dial to same node (#186)
agouin Jul 31, 2023
03f565d
Remove goreleaser (#187)
agouin Aug 1, 2023
3ee62f1
Bump github.com/libp2p/go-libp2p from 0.22.0 to 0.27.8 in /test (#189)
dependabot[bot] Sep 2, 2023
91b1e51
Fix race in leader election test (#216)
agouin Nov 9, 2023
0a99656
chore: contributing + code of conduct (#208)
Reecepbcups Nov 9, 2023
706fa2f
remote signer grpc server (#215)
agouin Nov 13, 2023
1a3490f
Update migrating.md (#213)
akc2267 Nov 16, 2023
73350e2
Pre-share nonces (#218)
agouin Nov 16, 2023
234ea43
Prom vecs (#219)
agouin Nov 17, 2023
69b3429
Bump golang.org/x/net from 0.9.0 to 0.17.0 (#207)
dependabot[bot] Nov 17, 2023
637d32b
Bump google.golang.org/grpc from 1.55.0 to 1.56.3 (#209)
dependabot[bot] Nov 17, 2023
7a6813e
Bump golang.org/x/net from 0.11.0 to 0.17.0 in /test (#206)
dependabot[bot] Nov 17, 2023
5794a02
Bump github.com/ethereum/go-ethereum from 1.12.0 to 1.13.5 (#220)
dependabot[bot] Nov 17, 2023
de54dfd
Fix lint (#222)
agouin Nov 17, 2023
ad63753
fix error checking over rpc (#223)
agouin Nov 17, 2023
976815f
Fix - running out of nonces under load (#224)
agouin Nov 22, 2023
6a974bb
Fix ClearNonces index out of range (#227)
agouin Nov 30, 2023
4fe383e
Low nonce consumption (#229)
agouin Dec 1, 2023
26c340c
Fix stuck leader when cosigner goes down (#232)
agouin Dec 11, 2023
7ded03c
Reverse where we start checking for a non-expired nonce, oldest -> ne…
misko9 Dec 12, 2023
60760f2
add unit tests for prune (#235)
agouin Dec 12, 2023
8e01923
mitigate unexpected state (#233)
agouin Dec 12, 2023
eef600c
Update Horcrux go.mod module path (#240)
jakubbujny Dec 21, 2023
6ccfc19
vote extensions (#242)
agouin Jan 11, 2024
a15c3d6
Bump github.com/opencontainers/runc from 1.1.10 to 1.1.12 in /test (#…
dependabot[bot] Feb 1, 2024
54beead
Fix typos (#251)
shapeshed Feb 14, 2024
29bfe6d
Make max read size configurable (#273)
agouin Jul 10, 2024
735808b
fix(runtime): debug server not starting due to blocking grpc serve (#…
agouin Jul 10, 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
5 changes: 4 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,7 @@ test/
scripts/
docs/
data/
build/
build/
docker/
go.work
go.work.sum
20 changes: 11 additions & 9 deletions .github/workflows/docker-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ name: Create and publish a Docker image

on:
push:
tags:
- '**'
branches:
- '**'
- '**'
tags-ignore:
- "v[0-9]+.[0-9]+.[0-9]+" # Push events to matching v*, i.e. v1.0, v20.15.10
- "v[0-9]+.[0-9]+.[0-9]+-beta[0-9]+"
- "v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+"

env:
REGISTRY: ghcr.io
Expand All @@ -20,29 +22,29 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Set up QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v2

- name: Log in to the Container registry
uses: docker/login-action@v1
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v3
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Build and push Docker image
uses: docker/build-push-action@v2.7.0
uses: docker/build-push-action@v4
with:
context: .
platforms: linux/amd64,linux/arm64
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ jobs:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
uses: golangci/golangci-lint-action@v3
with:
version: latest
only-new-issues: true
Expand Down
84 changes: 56 additions & 28 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,46 +2,74 @@ name: "Release"

on:
push:
branches:
- "RC[0-9]/**"
tags:
- "v[0-9]+.[0-9]+.[0-9]+" # Push events to matching v*, i.e. v1.0, v20.15.10
- "v[0-9]+.[0-9]+.[0-9]+-beta[0-9]+"
- "v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+"

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
goreleaser:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout
uses: actions/[email protected]
with:
fetch-depth: 0
- name: Checkout repository
uses: actions/checkout@v3

- uses: actions/setup-go@v2
with:
go-version: '1.19'
- name: Set up QEMU
uses: docker/setup-qemu-action@v2

# TODO:figure out how to add the supported SDK and tendermint versions
# here we need to run the following and save the results to ENV in the goreleaser action
# SDKVERSION := $(shell go list -m -u -f '{{.Version}}' github.com/cosmos/cosmos-sdk)
# TMVERSION := $(shell go list -m -u -f '{{.Version}}' github.com/tendermint/tendermint)
# Also see .goreleaser.yaml to wire up the environment variables
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- run: echo ":rocket::rocket::rocket:" > ../release_notes.md
if: startsWith(github.ref, 'refs/tags/')
- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build
uses: goreleaser/goreleaser-action@v2
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
version: latest
args: build --skip-validate # skip validate skips initial sanity checks in order to be able to fully run
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Release
uses: goreleaser/goreleaser-action@v2
if: startsWith(github.ref, 'refs/tags/')
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
version: latest
args: release --rm-dist --release-notes=../release_notes.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
context: .
platforms: linux/amd64,linux/arm64
file: docker/horcrux/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

draft-release:
needs: build-and-push-image
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: Copy Binary
run: |
docker create -it --entrypoint sh --name amd --platform linux/amd64 ${{ env.REGISTRY }}/${{ github.repository }}:${{ github.ref_name }}
docker create -it --entrypoint sh --name arm --platform linux/arm64 ${{ env.REGISTRY }}/${{ github.repository }}:${{ github.ref_name }}
docker cp amd:/bin/horcrux ./horcrux_linux-amd64
docker cp arm:/bin/horcrux ./horcrux_linux-arm64
sha256sum ./horcrux_linux-amd64 > ./horcrux_sha256.txt
sha256sum ./horcrux_linux-arm64 >> ./horcrux_sha256.txt

- name: Draft Release
uses: softprops/action-gh-release@v1
with:
draft: true
files: |
horcrux_linux-amd64
horcrux_linux-arm64
horcrux_sha256.txt
2 changes: 1 addition & 1 deletion .github/workflows/strangelove-project-managment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
github.event_name == 'issues' && (github.event.action == 'opened' || github.event.action == 'reopened')
steps:
- name: Add Issue to "Motherboard" Project Board
uses: leonsteinhaeuser/project-beta-automations@v1.2.1
uses: leonsteinhaeuser/project-beta-automations@v2.0.1
with:
gh_app_secret_key: ${{ secrets.MB_SECRET_KEY }}
gh_app_ID: ${{ secrets.MB_APP_ID }}
Expand Down
56 changes: 37 additions & 19 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Run Go Tests
name: Tests

on:
pull_request:
Expand All @@ -13,31 +13,49 @@ on:
- 'Makefile'

jobs:
test:
name: run tests
runs-on: [self-hosted, linux]
unit:
runs-on: ubuntu-latest
steps:
# Install and setup go
- name: Set up Go 1.19
uses: actions/setup-go@v2
- name: Set up Go 1.21
uses: actions/setup-go@v4
with:
go-version: 1.19
go-version: '^1.21.4'

# checkout horcrux
- name: checkout horcrux
uses: actions/checkout@v2

# cleanup docker environment on self-hosted test runner
- name: prepare fresh docker environment
run: |
docker stop $(docker ps -a -q) || true
docker rm -f $(docker ps -a -q) || true
docker network prune -f || true

# make sure proto files are up to date
- name: generate fresh signer proto .go files
run: make signer-proto
uses: actions/checkout@v3

# run tests
- name: run horcrux tests
run: make test
e2e:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
test:
- TestMultipleChainHorcrux
- TestChainPureHorcrux
- TestDownedSigners2of3
- TestDownedSigners3of5
- TestLeaderElection2of3
- Test2Of3SignerThreeSentries
- Test2Of3SignerThreeSentriesUniqueConnection
- TestUpgradeValidatorToHorcrux
- TestSingleSignerTwoSentries
- TestHorcruxProxyGRPC
steps:
# Install and setup go
- name: Set up Go 1.21
uses: actions/setup-go@v4
with:
go-version: '^1.21.4'

# checkout horcrux
- name: checkout horcrux
uses: actions/checkout@v3

# run test matrix
- name: run test
run: cd test && go test -v -timeout 30m -run ^${{ matrix.test }}$ .
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,8 @@
build
data
private_share_*
*_shard.json
rsa_keys.json
priv_validator_key.json
dist/
dist/
go.work.sum
Loading