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

main_to:main #48

wants to merge 67 commits into from

Conversation

nitronit
Copy link
Owner

No description provided.

boojamya and others added 30 commits January 23, 2023 14:25
… HOME env var not being respected in tests. (#132)
* Fix single signer state load bug

* Don't create sign state in config init for single signer

* Add unsupported warnings for single-signer mode

* Use Fprintln to cmd stdout for single signer warning

* Require accept-risk flag for single signer mode
Co-authored-by: Andrew Gouin <andrew@gouin.io>
* Phase 1 of ICS

* Fix leader election flaky test (#133)

* Handle feedback

* fix lint

* remove remaining log.Fatal calls

* split cosigner/single signer key file methods
* Wait for sign state flush on stop

* swap out WaitAndTerminate wait group for channel

* Handle feedback

* godoc tidy
* Update linter to be more strict around import aliases and introduce revive

* Updates for golangci-lint 1.52

* fix broken test. tidy
* single signer multi chain

* enforce interface impl

* cmd impl

* lint imports

* restore check on key file

* Add mutex for map rw

* Preload pubkey

* lint

* Update to sync.Map for chainState

* Update comment for state file disk creation

* Add comment for file pv mutex
* Make threshold validator chain ID agnostic

* Feedback
* Track chain IDs in separate chain state caches. Remove chain ID from config and determine automatically from block sign requests. Enable a single horcrux cluster to sign multiple networks at once with the same private key.

* Fix lint

* Add horcrux multi-chain test

* Fix lint

* add chain id log

* Add chain id and hrs to leader logs

* enrich error logs

* initialize map

* add single signer test and additional double sign assertions

* aliases to lowercase

* wait for async sign state saves before shutdown in tests and runtime

* Fix lint and race before tmp dir deletion

* Remove no longer relevant comment
tidy

* swap out WaitAndTerminate wait group for channel

* Merge main

* Add comment for TestIsRunning not working on macOS
* Bump to go v1.20

* Implement errors.Join suggestions

* Simplify errors.Join returns

* Fix TestIsRunning for go 1.20

* lint

* bump gomod

* Feedback

* lint
* swap tendermint with cometbft v0.37.0

* Fork of grpc-multi-resolver for compatibility with grpc 1.54

* Import aliases and docs updates

* Updates for sdk 47

* cbft -> comet for import aliases

* Remove stale comment
* key assignment feature

* lint

* Add migrate command

* Simplify key2shares. Make TestMultipleChainHorcrux use different priv keys for each chain

* fix key2shares test

* handle feedback

* Fix non-out-dir, update docs

* Fix test

* lint
* One config file for all signers

* Update docs

* Fix test

* Fix cosigner cmd

* Bump test timeout

* handle feedback on naming

* lint

* fix testdata rsa_keys.json

* fix cosigners from flag test

* consolidate start command. panic if config is v2 format
* tidy up usage and flags

* Fix sign mode flag description

* nits

* add --bare flag to config init to disable validation

* update test data
* migrate grpc-multi-resolver to internal to remove replace. bump raft libs

* remove unused file, enforce interface impl
* Use dash for cosigner dirs. Create state dir on startup if doesn't exist

* go back to underscore
Bumps [github.com/opencontainers/runc](https://github.com/opencontainers/runc) from 1.1.3 to 1.1.5.
- [Release notes](https://github.com/opencontainers/runc/releases)
- [Changelog](https://github.com/opencontainers/runc/blob/main/CHANGELOG.md)
- [Commits](opencontainers/runc@v1.1.3...v1.1.5)

---
updated-dependencies:
- dependency-name: github.com/opencontainers/runc
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* set and get nonces concurrently

* handle feedback
* nonce rename

* lint

* feedback
Bumps [github.com/cosmos/cosmos-sdk](https://github.com/cosmos/cosmos-sdk) from 0.47.1 to 0.47.3.
- [Release notes](https://github.com/cosmos/cosmos-sdk/releases)
- [Changelog](https://github.com/cosmos/cosmos-sdk/blob/main/CHANGELOG.md)
- [Commits](cosmos/cosmos-sdk@v0.47.1...v0.47.3)

---
updated-dependencies:
- dependency-name: github.com/cosmos/cosmos-sdk
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [github.com/cometbft/cometbft](https://github.com/cometbft/cometbft) from 0.37.0 to 0.37.2.
- [Release notes](https://github.com/cometbft/cometbft/releases)
- [Changelog](https://github.com/cometbft/cometbft/blob/main/CHANGELOG.md)
- [Commits](cometbft/cometbft@v0.37.0...v0.37.2)

---
updated-dependencies:
- dependency-name: github.com/cometbft/cometbft
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* fix multiresolver for IPs

* lint

* enhance test

* lint
* use sync.cond for sign state signaling

* use existingSignatureOrErrorIfRegression

* handle feedback

* handle feedback

* last sign state initiated don't write to file

* final tidy
* threshold signer integration into local cosigner

* tidy
agouin and others added 24 commits July 27, 2023 13:16
* don't allow concurrent dials to same node

* remove timer, use timeout context only

* tidy

* feedback

* add timer for min amount of time between dial attempts
* Update goreleaser.yaml

* remove goreleaser

* perms
Bumps [github.com/libp2p/go-libp2p](https://github.com/libp2p/go-libp2p) from 0.22.0 to 0.27.8.
- [Release notes](https://github.com/libp2p/go-libp2p/releases)
- [Changelog](https://github.com/libp2p/go-libp2p/blob/master/CHANGELOG.md)
- [Commits](libp2p/go-libp2p@v0.22.0...v0.27.8)

---
updated-dependencies:
- dependency-name: github.com/libp2p/go-libp2p
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Fix race in leader election test

* simplify
* fix go test

* add code of conduct

* Adds Contributing
* remote signer grpc server

* simplify api

* expose ToProto

* Go 1.21

* buf.lock perms

* Remove buf mod update

* direct path

* test updates

* Fix race in leader election test

* simplify

* Add test for horcrux proxy

* bump to go 1.21 in test too
Co-authored-by: Andrew Gouin <andrew@gouin.io>
* Pre-share nonces

* lint

* next cosigner retry

* improve

* fix test

* lint

* noplogger

* Add fallback to old nonces fetch mechanism

* lint

* use new raft get leader ID

* lint

* lint

* add back leader election timeout metric. Use existing grpc clients for ping

* error types

* Expired nonce pruning

* should use nonceExpiration

* make local cosigner nonce cache expiration twice the leader nonce cache
* FEAT: Add chain and node metris

* PATCH: Fix linting

* add drained nonce cache metrics

---------

Co-authored-by: gustavobelfort <gustavo@belfort.dev>
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.9.0 to 0.17.0.
- [Commits](golang/net@v0.9.0...v0.17.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.55.0 to 1.56.3.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](grpc/grpc-go@v1.55.0...v1.56.3)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.11.0 to 0.17.0.
- [Commits](golang/net@v0.11.0...v0.17.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump github.com/ethereum/go-ethereum from 1.12.0 to 1.13.5

Bumps [github.com/ethereum/go-ethereum](https://github.com/ethereum/go-ethereum) from 1.12.0 to 1.13.5.
- [Release notes](https://github.com/ethereum/go-ethereum/releases)
- [Commits](ethereum/go-ethereum@v1.12.0...v1.13.5)

---
updated-dependencies:
- dependency-name: github.com/ethereum/go-ethereum
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* remaining dep bumps

* bump to sdk 50.1 and ibc-go v8

* bump raft

* bump all deps. lower raft timeout in tests

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Andrew Gouin <andrew@gouin.io>
* temp fix for error checking over rpc

* improve logs, lint

* use grpc status check instead of checking horcrux errs
* Account for continued nonce consumption in target. Sort by expiration

* remove redundant lock

* lock for entire GetNonces operation

* Swap map to slice for nonce cache in CosignerNonceCache

* Add tests, fix prune all

* Fix test

* Add Delete test

* lint

* siplify flaky test

* add comments
* Fix clearnonces index out of range

* Auto remove lockfile after unclean shutdown

* fix cmd
* Fine tune nonce consumption greater than get nonces interval

* lint

* fix test

* make tests less flakey

* fix test race
* Fix stuck leader when cosigner goes down

* Use ticker with reset instead of timer

* Fix local cosigner getnonce

* lint
…west (#234)

* Reverse where we start checking for a non-expired nonce, oldest ->
newest

* Improve TestNonceCacheExpiration

* lint fix

* Fix unit test

* Add a little more breathing room for unit test
* mitigate unexpected state

remove ClearAllNonces

* use string constant
* Update go.mod

* change package path

---------

Co-authored-by: jakubbujny <jakub@figment.io>
Copy link

coderabbitai bot commented Dec 21, 2023

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

agouin and others added 5 commits January 11, 2024 08:36
* Support vote extensions

* Update single signer test

* Lint

* add additional checks

* Fix leader election test

* fix e2e

* lint

* use grpc timeout in nonce overallocation

* lint

* Bump horcrux-proxy
)

Bumps [github.com/opencontainers/runc](https://github.com/opencontainers/runc) from 1.1.10 to 1.1.12.
- [Release notes](https://github.com/opencontainers/runc/releases)
- [Changelog](https://github.com/opencontainers/runc/blob/v1.1.12/CHANGELOG.md)
- [Commits](opencontainers/runc@v1.1.10...v1.1.12)

---
updated-dependencies:
- dependency-name: github.com/opencontainers/runc
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Make max read size configurable

* Add init cmd flag

* migrate cmd

* fix test
)

* fix(runtime): debug server not starting due to blocking grpc serve

* Update signer/remote_signer_grpc_server.go
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.