Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/go_modules/test/github.com/contai…
Browse files Browse the repository at this point in the history
…nerd/containerd-1.6.26
  • Loading branch information
agouin committed Mar 27, 2024
2 parents 2a41e4a + 54beead commit 81cef80
Show file tree
Hide file tree
Showing 54 changed files with 1,196 additions and 486 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ COMMIT := $(shell git log -1 --format='%H')

all: install

LD_FLAGS = -X github.com/strangelove-ventures/horcrux/cmd/horcrux/cmd.Version=$(VERSION) \
-X github.com/strangelove-ventures/horcrux/cmd/horcrux/cmd.Commit=$(COMMIT)
LD_FLAGS = -X github.com/strangelove-ventures/horcrux/v3/cmd/horcrux/cmd.Version=$(VERSION) \
-X github.com/strangelove-ventures/horcrux/v3/cmd/horcrux/cmd.Commit=$(COMMIT)

LD_FLAGS += $(LDFLAGS)
LD_FLAGS := $(strip $(LD_FLAGS))
Expand Down Expand Up @@ -56,4 +56,4 @@ proto-lint:
@$(protoImage) buf lint --error-format=json


.PHONY: all lint test race msan tools clean build
.PHONY: all lint test race msan tools clean build
2 changes: 1 addition & 1 deletion client/address_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package client_test
import (
"testing"

"github.com/strangelove-ventures/horcrux/client"
"github.com/strangelove-ventures/horcrux/v3/client"
"github.com/stretchr/testify/require"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/horcrux/cmd/address.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
cometprivval "github.com/cometbft/cometbft/privval"
"github.com/cosmos/cosmos-sdk/types/bech32"
"github.com/spf13/cobra"
"github.com/strangelove-ventures/horcrux/signer"
"github.com/strangelove-ventures/horcrux/v3/signer"
)

type AddressCmdOutput struct {
Expand Down
2 changes: 1 addition & 1 deletion cmd/horcrux/cmd/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"os"

"github.com/spf13/cobra"
"github.com/strangelove-ventures/horcrux/signer"
"github.com/strangelove-ventures/horcrux/v3/signer"
)

const (
Expand Down
8 changes: 4 additions & 4 deletions cmd/horcrux/cmd/leader_election.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import (

grpcretry "github.com/grpc-ecosystem/go-grpc-middleware/retry"
"github.com/spf13/cobra"
"github.com/strangelove-ventures/horcrux/client"
"github.com/strangelove-ventures/horcrux/signer"
"github.com/strangelove-ventures/horcrux/signer/multiresolver"
"github.com/strangelove-ventures/horcrux/signer/proto"
"github.com/strangelove-ventures/horcrux/v3/client"
"github.com/strangelove-ventures/horcrux/v3/signer"
"github.com/strangelove-ventures/horcrux/v3/signer/multiresolver"
"github.com/strangelove-ventures/horcrux/v3/signer/proto"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/horcrux/cmd/migrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
cometcryptoencoding "github.com/cometbft/cometbft/crypto/encoding"
cometprotocrypto "github.com/cometbft/cometbft/proto/tendermint/crypto"
"github.com/spf13/cobra"
"github.com/strangelove-ventures/horcrux/signer"
"github.com/strangelove-ventures/horcrux/v3/signer"
amino "github.com/tendermint/go-amino"
"gopkg.in/yaml.v2"
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/horcrux/cmd/migrate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"path/filepath"
"testing"

"github.com/strangelove-ventures/horcrux/cmd/horcrux/cmd/testdata"
"github.com/strangelove-ventures/horcrux/v3/cmd/horcrux/cmd/testdata"
"github.com/stretchr/testify/require"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/horcrux/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
homedir "github.com/mitchellh/go-homedir"
"github.com/spf13/cobra"
"github.com/spf13/viper"
"github.com/strangelove-ventures/horcrux/signer"
"github.com/strangelove-ventures/horcrux/v3/signer"
"gopkg.in/yaml.v2"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/horcrux/cmd/shards.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"path/filepath"

"github.com/spf13/cobra"
"github.com/strangelove-ventures/horcrux/signer"
"github.com/strangelove-ventures/horcrux/v3/signer"
)

func createCosignerDirectoryIfNecessary(out string, id int) (string, error) {
Expand Down
2 changes: 1 addition & 1 deletion cmd/horcrux/cmd/single_signer.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"io"

"github.com/strangelove-ventures/horcrux/signer"
"github.com/strangelove-ventures/horcrux/v3/signer"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion cmd/horcrux/cmd/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
cometlog "github.com/cometbft/cometbft/libs/log"
"github.com/cometbft/cometbft/libs/service"
"github.com/spf13/cobra"
"github.com/strangelove-ventures/horcrux/signer"
"github.com/strangelove-ventures/horcrux/v3/signer"
)

func startCmd() *cobra.Command {
Expand Down
2 changes: 1 addition & 1 deletion cmd/horcrux/cmd/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"time"

"github.com/spf13/cobra"
"github.com/strangelove-ventures/horcrux/signer"
"github.com/strangelove-ventures/horcrux/v3/signer"

cometjson "github.com/cometbft/cometbft/libs/json"
cometlog "github.com/cometbft/cometbft/libs/log"
Expand Down
2 changes: 1 addition & 1 deletion cmd/horcrux/cmd/state_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"testing"
"time"

"github.com/strangelove-ventures/horcrux/signer"
"github.com/strangelove-ventures/horcrux/v3/signer"
"github.com/stretchr/testify/require"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/horcrux/cmd/threshold.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

cometlog "github.com/cometbft/cometbft/libs/log"
cometservice "github.com/cometbft/cometbft/libs/service"
"github.com/strangelove-ventures/horcrux/signer"
"github.com/strangelove-ventures/horcrux/v3/signer"
)

const maxWaitForSameBlockAttempts = 3
Expand Down
2 changes: 1 addition & 1 deletion cmd/horcrux/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ limitations under the License.
*/
package main

import "github.com/strangelove-ventures/horcrux/cmd/horcrux/cmd"
import "github.com/strangelove-ventures/horcrux/v3/cmd/horcrux/cmd"

func main() {
cmd.Execute()
Expand Down
2 changes: 1 addition & 1 deletion docs/metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ If 'signer_total_sentry_connect_tries' is significant, it can indicate network o

## Watching Cosigner With Grafana

A sample Grafana configration is available. See [`horcrux.json`](https://github.com/chillyvee/horcrux-info/blob/master/grafana/horcrux.json)
A sample Grafana configuration is available. See [`horcrux.json`](https://github.com/chillyvee/horcrux-info/blob/master/grafana/horcrux.json)


## Watching For Cosigner Trouble
Expand Down
2 changes: 1 addition & 1 deletion docs/signing.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ To provide private key security, The key is sharded into multiple pieces using [

Each piece of the key is added to a relative signer node that will run the horcrux application. These signer nodes are part of an overall Horcrux cluster that will communicate with each other to sign each block, as requested by the configured sentry node(s).

A higher threshold _`t`_ equates to more security, since more pieces of the key will be required to assemble a full signature. A higher threshold also means the fault tolerance is lower since you cannot tolerate as many missing participants, or in Horcrux' case, failed nodes. It is important to think about your specific use case to determine what the balance of _`n`_ and _`t`_.
A higher threshold _`t`_ equates to more security, since more pieces of the key will be required to assemble a full signature. A higher threshold also means the fault tolerance is lower since you cannot tolerate as many missing participants, or in Horcrux's case, failed nodes. It is important to think about your specific use case to determine what the balance of _`n`_ and _`t`_.

> IMPORTANT: For security and to ensure that there cannot be a situation in which there are two separate clusters of signer nodes that could combine a full signature, it is required that _`t > n/2`_
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/strangelove-ventures/horcrux
module github.com/strangelove-ventures/horcrux/v3

go 1.21

Expand All @@ -7,7 +7,7 @@ require (
github.com/Jille/raft-grpc-transport v1.4.0
github.com/Jille/raftadmin v1.2.1
github.com/armon/go-metrics v0.4.1
github.com/cometbft/cometbft v0.38.0
github.com/cometbft/cometbft v0.38.2
github.com/cosmos/cosmos-sdk v0.50.1
github.com/cosmos/gogoproto v1.4.11
github.com/ethereum/go-ethereum v1.13.5
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwP
github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg=
github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo=
github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ=
github.com/cometbft/cometbft v0.38.0 h1:ogKnpiPX7gxCvqTEF4ly25/wAxUqf181t30P3vqdpdc=
github.com/cometbft/cometbft v0.38.0/go.mod h1:5Jz0Z8YsHSf0ZaAqGvi/ifioSdVFPtEGrm8Y9T/993k=
github.com/cometbft/cometbft v0.38.2 h1:io0JCh5EPxINKN5ZMI5hCdpW3QVZRy+o8qWe3mlJa/8=
github.com/cometbft/cometbft v0.38.2/go.mod h1:PIi48BpzwlHqtV3mzwPyQgOyOnU94BNBimLS2ebBHOg=
github.com/cometbft/cometbft-db v0.7.0 h1:uBjbrBx4QzU0zOEnU8KxoDl18dMNgDh+zZRUE0ucsbo=
github.com/cometbft/cometbft-db v0.7.0/go.mod h1:yiKJIm2WKrt6x8Cyxtq9YTEcIMPcEe4XPxhgX59Fzf0=
github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
Expand Down
21 changes: 14 additions & 7 deletions proto/strangelove/horcrux/cosigner.proto
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
syntax = "proto3";
package strangelove.horcrux;

option go_package = "github.com/strangelove-ventures/horcrux/signer/proto";
option go_package = "github.com/strangelove-ventures/horcrux/v3/signer/proto";

service Cosigner {
rpc SignBlock (SignBlockRequest) returns (SignBlockResponse) {}
Expand All @@ -17,7 +17,8 @@ message Block {
int64 round = 2;
int32 step = 3;
bytes signBytes = 4;
int64 timestamp = 5;
bytes voteExtSignBytes = 5;
int64 timestamp = 6;
}

message SignBlockRequest {
Expand All @@ -27,7 +28,8 @@ message SignBlockRequest {

message SignBlockResponse {
bytes signature = 1;
int64 timestamp = 2;
bytes vote_ext_signature = 2;
int64 timestamp = 3;
}

message Nonce {
Expand Down Expand Up @@ -55,13 +57,18 @@ message SetNoncesAndSignRequest {
repeated Nonce nonces = 2;
HRST hrst = 3;
bytes signBytes = 4;
string chainID = 5;
bytes voteExtUuid = 5;
repeated Nonce voteExtNonces = 6;
bytes voteExtSignBytes = 7;
string chainID = 8;
}

message SetNoncesAndSignResponse {
bytes noncePublic = 1;
int64 timestamp = 2;
int64 timestamp = 1;
bytes noncePublic = 2;
bytes signature = 3;
bytes voteExtNoncePublic = 4;
bytes voteExtSignature = 5;
}

message GetNoncesRequest {
Expand All @@ -88,4 +95,4 @@ message GetLeaderResponse {
}

message PingRequest {}
message PingResponse {}
message PingResponse {}
2 changes: 1 addition & 1 deletion proto/strangelove/horcrux/remote_signer.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package strangelove.horcrux;

import "strangelove/horcrux/cosigner.proto";

option go_package = "github.com/strangelove-ventures/horcrux/signer/proto";
option go_package = "github.com/strangelove-ventures/horcrux/v3/signer/proto";

service RemoteSigner {
rpc PubKey (PubKeyRequest) returns (PubKeyResponse) {}
Expand Down
2 changes: 1 addition & 1 deletion scripts/protocgen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ for dir in $proto_dirs; do
done
done

cp -r github.com/strangelove-ventures/horcrux/signer ./
cp -r github.com/strangelove-ventures/horcrux/v3/signer ./
rm -rf github.com
2 changes: 1 addition & 1 deletion signer/cond/cond_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"sync"
"testing"

"github.com/strangelove-ventures/horcrux/signer/cond"
"github.com/strangelove-ventures/horcrux/v3/signer/cond"
"github.com/stretchr/testify/require"
)

Expand Down
2 changes: 1 addition & 1 deletion signer/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
"github.com/cosmos/cosmos-sdk/crypto/keys/ed25519"
cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types"
"github.com/cosmos/cosmos-sdk/types/bech32"
"github.com/strangelove-ventures/horcrux/client"
"github.com/strangelove-ventures/horcrux/v3/client"
"gopkg.in/yaml.v2"
)

Expand Down
2 changes: 1 addition & 1 deletion signer/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"path/filepath"
"testing"

"github.com/strangelove-ventures/horcrux/signer"
"github.com/strangelove-ventures/horcrux/v3/signer"
"github.com/stretchr/testify/require"
)

Expand Down
Loading

0 comments on commit 81cef80

Please sign in to comment.