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

Support ethermint #150

Closed
wants to merge 2 commits into from
Closed

Support ethermint #150

wants to merge 2 commits into from

Conversation

yihuang
Copy link
Contributor

@yihuang yihuang commented Aug 20, 2021

Closes #145

Add a cargo feature to switch to ethermint mode:

  • address derivation method
  • EthAccount decoding
  • default coin type change to 60
  • change message hashing in signing

deep_space PR: iqlusioninc/deep_space#1

@levicook
Copy link
Contributor

working my way through this one today; fyi

Copy link
Contributor

@levicook levicook left a comment

Choose a reason for hiding this comment

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

One question on the external dependency this introduces & then a couple of minor changes to use statics instead of duplicating them.

let hd_path = args
.flag_hd_wallet_path
.as_deref()
.unwrap_or("m/44'/118'/0'/0/0");
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's use DEFAULT_HD_PATH here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

let hd_path = args
.flag_hd_wallet_path
.as_deref()
.unwrap_or("m/44'/118'/0'/0/0");
Copy link
Contributor

Choose a reason for hiding this comment

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

also DEFAULT_HD_PATH

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done, moved DEFAULT_HD_PATH to cosmos_gravity::crypto::.

@@ -13,3 +13,5 @@ members = [
"register_delegate_keys",
"gorc",
]
[patch.crates-io]
deep_space = { git = "https://github.com/yihuang/deep_space/", branch = "ethermint" }
Copy link
Contributor

Choose a reason for hiding this comment

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

Will this be merged into deep_space soon? Would prefer to avoid the external dependency

Copy link
Contributor

Choose a reason for hiding this comment

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

@yihuang I am going to try and merge your changes to deep space in with the iqlusioninc deep space changes so we can just depend on that upstream repo.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@yihuang I am going to try and merge your changes to deep space in with the iqlusioninc deep space changes so we can just depend on that upstream repo.

how's that going? 😄

#[cfg(not(feature = "ethermint"))]
pub const DEFAULT_HD_PATH: &str = "m/44'/118'/0'/0/0";

/// PriateKey wraps cosmos private key, switch between cosmos and ethermint behavior according to compile feature.
Copy link

Choose a reason for hiding this comment

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

PriateKey -> PrivateKey

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good catch, fixed

@yihuang
Copy link
Contributor Author

yihuang commented Sep 10, 2021

fixed conflicts and squashed.

- patch deep_space with ethermint fork
- add a PrivateKey which switch to ethermint when ethermint feature is turn on
- change default hd_path if ethermint feature turn on

change to crypto-org-chain repo

fix test_runner build
@thomas-nguy
Copy link
Contributor

can be close crypto-org-chain#31

@yihuang yihuang closed this Mar 1, 2022
@yihuang yihuang deleted the ethermint branch March 1, 2022 07:09
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.

orchestrator is not compatible with ethermint
5 participants