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

fix: change relayer call args to use secp256k1 private keys #2729

Merged
merged 1 commit into from
Aug 10, 2022

Conversation

jeronimoalbi
Copy link
Member

Fixes #2711

Description

The pkg/relayer was sending the private keys to the TS relayer as arguments in "ASCII armored" format instead of "secp256k1" which is the expected format.

This chage uses secp256k1 private keys instead of ASCII armored ones as
gRPC arguments when calling the TS relayer.
@jeronimoalbi jeronimoalbi added the type:bug Something isn't working label Aug 10, 2022
@jeronimoalbi jeronimoalbi added this to the Priority milestone Aug 10, 2022
@jeronimoalbi jeronimoalbi self-assigned this Aug 10, 2022
@@ -200,12 +203,25 @@ func (r Relayer) prepare(ctx context.Context, conf relayerconf.Config, chainID s
}
}

key, err := r.ca.ExportHex(chain.Account, "")
// Get the key in ASCII armored format
passphrase := ""
Copy link
Contributor

Choose a reason for hiding this comment

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

@jeronimoalbi So the passphrase is not required ?

Copy link
Member Author

Choose a reason for hiding this comment

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

@tbruyelle good question. To be honest I am not sure about the reason why we were using an empty passphrase.

These changes just make it explicit that we are using an empty passphrase which should be the same for the Export and UnarmorDecryptPrivKey calls.

Copy link
Contributor

Choose a reason for hiding this comment

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

ah yes I didn't notice it was already the case before! OK for me.

@aljo242
Copy link
Contributor

aljo242 commented Aug 10, 2022

Tested - working for me

Copy link
Contributor

@lumtis lumtis left a comment

Choose a reason for hiding this comment

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

LGTM

@lumtis lumtis merged commit 70293c8 into feat/sdk-ibc-upgrade Aug 10, 2022
@lumtis lumtis deleted the fix/relayer-call-args branch August 10, 2022 18:14
aljo242 pushed a commit that referenced this pull request Aug 17, 2022
* docs(changelog): add unreleased section

* feat!: Cosmos SDK v0.46.0 (#2675)

* update go mod

* update ibc path

* fix merge errors

* add temp client mock

* fix: deps (#2676)

* revert packages to old ibc-go

* fix remaining ibc paths

* fix template go.sum

* panic keyring errors

* add mockery generate instructions

* regenerate mocks

Co-authored-by: İlker G. Öztürk <[email protected]>

* fix merge

* update spn

* upgrade spn

* remove ibc-go fork

* template updates

* fix ibc and oracle templates

* update templates

* remaining tempalte updates

* fix template

* fix faucet test

* use beta ibc release

* update deps in template

* use ibcmodule idiom (#2692)

* Update ignite/templates/module/create/ibc/x/{{moduleName}}/module_ibc.go.plush

Co-authored-by: Lucas Btd <[email protected]>

* fix(`pkg/cosmosaccount`): register cryptocodec interfaces (#2702)

* register crypto codec interfaces

* improve error messages

* fix(template): removed unused methods and fix comments (#2708)

* fix(`cosmosclient`): use protobuf Any for TxMsgData  (#2714)

* fix comment

* use proto Any

* Update ignite/pkg/cosmosclient/cosmosclient.go

Co-authored-by: Lucas Btd <[email protected]>

Co-authored-by: Lucas Btd <[email protected]>

* chore(0.46): upgrade spn version (#2730)

* feat(`app`): add interchain accounts for `v0.46.0` (#2703)

* update template for ica

* Update ignite/templates/app/stargate/app/app.go.plush

Co-authored-by: Lucas Btd <[email protected]>

Co-authored-by: Lucas Btd <[email protected]>

* fix: change relayer call to use secp256k1 private keys in call (#2729)

This chage uses secp256k1 private keys instead of ASCII armored ones as
gRPC arguments when calling the TS relayer.

* docs: update tutorials (#2737)

- Change `ibc-go` import to use "v5"
- Add package missing definition to code examples that can be copy/pasted
- Change file references to paths, for consistency with other tutorials
- Fix interchange tutorial to use ports that don't overlap
- Remove unused imports
- Fix documentation issues

* feat: upgrade `ts-relayer` dependencies (#2722)

* chore: upgrade `@confio/relayer` to the latest version 0.5.1
* chore: update `@cosmjs` to version 0.28.9
* chore: remove `@cosmjs/launchpad` from dependencies
* chore: add new dependency `@cosmjs/encoding` for relayer
* chore: add `sinon` dependency required to build the relayer
* fix: remove "gasLimit" option from relayer
* fix: update `@cosmjs` to version 0.28.11

* fix(cosmosclient): fix account prefix config (#2743)

* fix(cosmosclient): account prefix config not correct when broadcasting a tx from a newly created default account

* add issue

Co-authored-by: Alex Johnson <[email protected]>
Co-authored-by: Lucas Btd <[email protected]>
Co-authored-by: Denis Fadeev <[email protected]>
Co-authored-by: Jerónimo Albi <[email protected]>
Jchicode pushed a commit to Jchicode/cli that referenced this pull request Aug 9, 2023
* docs(changelog): add unreleased section

* feat!: Cosmos SDK v0.46.0 (ignite#2675)

* update go mod

* update ibc path

* fix merge errors

* add temp client mock

* fix: deps (ignite#2676)

* revert packages to old ibc-go

* fix remaining ibc paths

* fix template go.sum

* panic keyring errors

* add mockery generate instructions

* regenerate mocks

Co-authored-by: İlker G. Öztürk <[email protected]>

* fix merge

* update spn

* upgrade spn

* remove ibc-go fork

* template updates

* fix ibc and oracle templates

* update templates

* remaining tempalte updates

* fix template

* fix faucet test

* use beta ibc release

* update deps in template

* use ibcmodule idiom (ignite#2692)

* Update ignite/templates/module/create/ibc/x/{{moduleName}}/module_ibc.go.plush

Co-authored-by: Lucas Btd <[email protected]>

* fix(`pkg/cosmosaccount`): register cryptocodec interfaces (ignite#2702)

* register crypto codec interfaces

* improve error messages

* fix(template): removed unused methods and fix comments (ignite#2708)

* fix(`cosmosclient`): use protobuf Any for TxMsgData  (ignite#2714)

* fix comment

* use proto Any

* Update ignite/pkg/cosmosclient/cosmosclient.go

Co-authored-by: Lucas Btd <[email protected]>

Co-authored-by: Lucas Btd <[email protected]>

* chore(0.46): upgrade spn version (ignite#2730)

* feat(`app`): add interchain accounts for `v0.46.0` (ignite#2703)

* update template for ica

* Update ignite/templates/app/stargate/app/app.go.plush

Co-authored-by: Lucas Btd <[email protected]>

Co-authored-by: Lucas Btd <[email protected]>

* fix: change relayer call to use secp256k1 private keys in call (ignite#2729)

This chage uses secp256k1 private keys instead of ASCII armored ones as
gRPC arguments when calling the TS relayer.

* docs: update tutorials (ignite#2737)

- Change `ibc-go` import to use "v5"
- Add package missing definition to code examples that can be copy/pasted
- Change file references to paths, for consistency with other tutorials
- Fix interchange tutorial to use ports that don't overlap
- Remove unused imports
- Fix documentation issues

* feat: upgrade `ts-relayer` dependencies (ignite#2722)

* chore: upgrade `@confio/relayer` to the latest version 0.5.1
* chore: update `@cosmjs` to version 0.28.9
* chore: remove `@cosmjs/launchpad` from dependencies
* chore: add new dependency `@cosmjs/encoding` for relayer
* chore: add `sinon` dependency required to build the relayer
* fix: remove "gasLimit" option from relayer
* fix: update `@cosmjs` to version 0.28.11

* fix(cosmosclient): fix account prefix config (ignite#2743)

* fix(cosmosclient): account prefix config not correct when broadcasting a tx from a newly created default account

* add issue

Co-authored-by: Alex Johnson <[email protected]>
Co-authored-by: Lucas Btd <[email protected]>
Co-authored-by: Denis Fadeev <[email protected]>
Co-authored-by: Jerónimo Albi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants