8000 refactor(crypto): handle errors and more in `bls12381` by melekes · Pull Request #2832 · cometbft/cometbft · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

refactor(crypto): handle errors and more in bls12381 #2832

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

Merged
merged 7 commits into from
Apr 18, 2024

Conversation

melekes
Copy link
Contributor
@melekes melekes commented Apr 17, 2024
  • pin cometbft-db-testing image version
  • extract const in a separate file
  • return err in GenPrivKey and NewPrivateKeyFromBytes

Follow-up to #2765


PR checklist

  • Tests written/updated
  • Changelog entry added in .changelog (we use unclog to manage our changelog)
  • Updated relevant documentation (docs/ or spec/) and code comments
  • Title follows the Conventional Commits spec

- pin cometbft-db-testing image version
- extract const in a separate file
- return err in GenPrivKey and NewPrivateKeyFromBytes
@melekes melekes added the backport-to-v1.x Tell Mergify to backport the PR to v1.x label Apr 17, 2024
@melekes melekes self-assigned this Apr 17, 2024
@melekes melekes requested review from a team as code owners April 17, 2024 11:51
@melekes melekes requested a review from sergio-mena April 17, 2024 12:16
@melekes melekes changed the title refactor(crypto): handle errors and more refactor(crypto): handle errors and more in bls12381 Apr 17, 2024
@@ -12,7 +12,62 @@ import (
"github.com/cometbft/cometbft/crypto/bls12381"
)

func TestSignAndValidateBLS12381(t *testing.T) {
func TestNewPrivateKeyFromBytes(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I love these unit tests ❤️

Copy link
Contributor
@sergio-mena sergio-mena left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome job! 🚀

Co-authored-by: Sergio Mena <sergio@informal.systems>
@melekes melekes enabled auto-merge April 18, 2024 07:49
@melekes melekes added this pull request to the merge queue Apr 18, 2024
Merged via the queue into main with commit d27732a Apr 18, 2024
38 checks passed
@melekes melekes deleted the 2765-anton-bls-curve-follow-up branch April 18, 2024 07:56
mergify bot pushed a commit that referenced this pull request Apr 18, 2024
- pin cometbft-db-testing image version
- extract const in a separate file
- return err in GenPrivKey and NewPrivateKeyFromBytes

Follow-up to #2765

---

#### PR checklist

- [x] Tests written/updated
- [ ] ~~Changelog entry added in `.changelog` (we use
[unclog](https://github.com/informalsystems/unclog) to manage our
changelog)~~
- [x] Updated relevant documentation (`docs/` or `spec/`) and code
comments
- [x] Title follows the [Conventional
Commits](https://www.conventionalcommits.org/en/v1.0.0/) spec

---------

Co-authored-by: Sergio Mena <sergio@informal.systems>
(cherry picked from commit d27732a)
melekes added a commit that referenced this pull request Apr 18, 2024
… (#2842)

- pin cometbft-db-testing image version
- extract const in a separate file
- return err in GenPrivKey and NewPrivateKeyFromBytes

Follow-up to #2765

---

#### PR checklist

- [x] Tests written/updated
- [ ] ~~Changelog entry added in `.changelog` (we use
[unclog](https://github.com/informalsystems/unclog) to manage our
changelog)~~
- [x] Updated relevant documentation (`docs/` or `spec/`) and code
comments
- [x] Title follows the [Conventional
Commits](https://www.conventionalcommits.org/en/v1.0.0/) spec
<hr>This is an automatic backport of pull request #2832 done by
[Mergify](https://mergify.com).

Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-to-v1.x Tell Mergify to backport the PR to v1.x
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0