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

refactor: reduce tendermint deps #14616

Merged
merged 13 commits into from
Jan 18, 2023
Merged

refactor: reduce tendermint deps #14616

merged 13 commits into from
Jan 18, 2023

Conversation

julienrbrt
Copy link
Member

@julienrbrt julienrbrt commented Jan 13, 2023

Description

Reduces dependencies on tendermint packages due to the uncertainty about the tendermint github org:

  • tendermint/crypto
  • tendermint/btcd

Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

I have...

  • included the correct type prefix in the PR title
  • added ! to the type prefix if API or client breaking change
  • targeted the correct branch (see PR Targeting)
  • provided a link to the relevant issue or specification
  • followed the guidelines for building modules
  • included the necessary unit and integration tests
  • added a changelog entry to CHANGELOG.md
  • included comments for documenting Go code
  • updated the relevant documentation or specification
  • reviewed "Files changed" and left comments if necessary
  • confirmed all CI checks have passed

Reviewers Checklist

All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.

I have...

  • confirmed the correct type prefix in the PR title
  • confirmed ! in the type prefix if API or client breaking change
  • confirmed all author checklist items have been addressed
  • reviewed state machine logic
  • reviewed API design and naming
  • reviewed documentation is accurate
  • reviewed tests and test coverage
  • manually tested (if applicable)

@@ -0,0 +1,291 @@
// MODIFIED BY TENDERMINT TO EXPOSE `salt` in `GenerateFromPassword`.
Copy link
Member Author

@julienrbrt julienrbrt Jan 13, 2023

Choose a reason for hiding this comment

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

Basically re-add this to the repo as it was some years ago: https://github.com/cosmos/cosmos-sdk/tree/v0.22.0/crypto/keys/bcrypt

Copy link
Contributor

Choose a reason for hiding this comment

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

Confirmed this file is the same as https://github.com/cosmos/cosmos-sdk/blob/v0.22.0/crypto/keys/bcrypt/bcrypt.go with only benign changes.

@@ -1,6 +1,3 @@
//go:build ledger && test_ledger_mock
Copy link
Member Author

@julienrbrt julienrbrt Jan 13, 2023

Choose a reason for hiding this comment

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

TODO: make go test ./crypto/ledger/... -tags='ledger,test_ledger_mock' tests pass
EDIT: works

@@ -0,0 +1,35 @@
// Copyright 2011 The Go Authors. All rights reserved.
Copy link
Member

Choose a reason for hiding this comment

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

we should open an issue on how/if we can remove this file and use the canonical version

Copy link
Member Author

@julienrbrt julienrbrt Jan 14, 2023

Choose a reason for hiding this comment

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

I agree. I need to look at it more as well, as CI is not happy with this file too (there were no CI in tendermint/crypto).
I wonder if we should enhance it, or leave it as is and exclude it from linting.
EDIT: used nolint for having CI not complain, as this is a copy of the original.

Copy link
Member Author

@julienrbrt julienrbrt Jan 15, 2023

Choose a reason for hiding this comment

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

Relevant: tendermint/tendermint#3027, TM removed the use of their own fork some time ago.

@julienrbrt julienrbrt marked this pull request as ready for review January 14, 2023 22:32
@julienrbrt julienrbrt requested a review from a team as a code owner January 14, 2023 22:32
@github-prbot github-prbot requested review from a team, aaronc and tac0turtle and removed request for a team January 14, 2023 22:33
@julienrbrt
Copy link
Member Author

@odeke-em I would love if someone from your team could check this :)

@julienrbrt julienrbrt added backport/0.45.x backport/0.46.x PR scheduled for inclusion in the v0.46's next stable release labels Jan 14, 2023
@odeke-em
Copy link
Collaborator

@odeke-em I would love if someone from your team could check this :)

Sure, kindly paging @elias-orijtech

Copy link
Contributor

@elias-orijtech elias-orijtech left a comment

Choose a reason for hiding this comment

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

LGTM.

// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package bcrypt
Copy link
Contributor

Choose a reason for hiding this comment

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

@@ -0,0 +1,291 @@
// MODIFIED BY TENDERMINT TO EXPOSE `salt` in `GenerateFromPassword`.
Copy link
Contributor

Choose a reason for hiding this comment

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

Confirmed this file is the same as https://github.com/cosmos/cosmos-sdk/blob/v0.22.0/crypto/keys/bcrypt/bcrypt.go with only benign changes.

@julienrbrt julienrbrt added backport/v0.47.x PR scheduled for inclusion in the v0.47's next stable release and removed TODO:backport-v0.47.1 labels Jan 17, 2023
Copy link
Member

@tac0turtle tac0turtle left a comment

Choose a reason for hiding this comment

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

we should just verify the ledger changes

@julienrbrt
Copy link
Member Author

julienrbrt commented Jan 17, 2023

we should just verify the ledger changes

Just tested with my nano s and it works.

Copy link
Contributor

@amaury1093 amaury1093 left a comment

Choose a reason for hiding this comment

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

tACK with ledger nano s

@julienrbrt julienrbrt merged commit 44fbb0d into main Jan 18, 2023
@julienrbrt julienrbrt deleted the julien/tm-deps branch January 18, 2023 10:28
mergify bot pushed a commit that referenced this pull request Jan 18, 2023
(cherry picked from commit 44fbb0d)

# Conflicts:
#	x/nft/go.mod
#	x/nft/go.sum
mergify bot pushed a commit that referenced this pull request Jan 18, 2023
(cherry picked from commit 44fbb0d)

# Conflicts:
#	crypto/ledger/ledger_mock.go
#	crypto/ledger/ledger_secp256k1.go
#	simapp/go.mod
#	simapp/go.sum
#	tests/go.mod
#	tests/go.sum
#	x/nft/go.mod
mergify bot pushed a commit that referenced this pull request Jan 18, 2023
(cherry picked from commit 44fbb0d)

# Conflicts:
#	crypto/ledger/ledger_mock.go
#	crypto/ledger/ledger_secp256k1.go
#	go.mod
#	go.sum
#	simapp/go.mod
#	simapp/go.sum
#	tests/go.mod
#	tests/go.sum
#	x/nft/go.mod
#	x/nft/go.sum
julienrbrt added a commit that referenced this pull request Jan 18, 2023
Co-authored-by: Julien Robert <julien@rbrt.fr>
julienrbrt added a commit that referenced this pull request Jan 18, 2023
Co-authored-by: Julien Robert <julien@rbrt.fr>
julienrbrt added a commit that referenced this pull request Jan 18, 2023
Co-authored-by: Julien Robert <julien@rbrt.fr>
jiujiteiro pushed a commit to realiotech/cosmos-sdk that referenced this pull request Mar 7, 2023
@faddat faddat mentioned this pull request Mar 23, 2023
19 tasks
larry0x pushed a commit to larry0x/cosmos-sdk that referenced this pull request May 22, 2023
JeancarloBarrios pushed a commit to agoric-labs/cosmos-sdk that referenced this pull request Sep 28, 2024
JeancarloBarrios pushed a commit to agoric-labs/cosmos-sdk that referenced this pull request Sep 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/v0.47.x PR scheduled for inclusion in the v0.47's next stable release backport/0.46.x PR scheduled for inclusion in the v0.46's next stable release C:x/nft
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants