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

Update wallet keymanager for v0.11 #5453

Merged
merged 8 commits into from
Apr 16, 2020
Merged

Update wallet keymanager for v0.11 #5453

merged 8 commits into from
Apr 16, 2020

Conversation

mcdee
Copy link
Contributor

@mcdee mcdee commented Apr 16, 2020

This is an attempt to re-apply #4984 to allow keys held by the wallet keymanager to be able to sign in the new testnet.

The patch works as-is, however there have been changes to herumi within prysm since the original patch went in. As such I have had to re-add Nishant's herumi installation as a workspace item.

I assume there is some way around this, using the herumi library that's been introduced as a third-party element, but I'm unaware of how to do so. Any guidance on this would be much appreciated.

@mcdee mcdee requested a review from a team as a code owner April 16, 2020 10:22
@mcdee
Copy link
Contributor Author

mcdee commented Apr 16, 2020

Latest version of this patch uses the local third party version of herumi, so should have no conflicts. An interop run confirms that signing is carried out and verifies as expected.

Copy link
Member

@prestonvanloon prestonvanloon left a comment

Choose a reason for hiding this comment

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

A few feedback comments. We expect to have a design ready to review for #5423 by EOD today or tomorrow.

@@ -143,8 +143,5 @@ go_library(
}),
copts = OPTS,
cgo = True,
visibility = [
# Additional access will require security approval.
"@prysm//shared/bls:__pkg__",
Copy link
Member

Choose a reason for hiding this comment

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

Please do not remove this. We can accept another whitelisted target for now, but ultimately want everything to use //shared/bls:go_default_library.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Apologies; I couldn't find a way of doing this explicitly without creating a dependency loop. With the changes made elsewhere in the patch this now works with an explicit package name.

Copy link
Member

Choose a reason for hiding this comment

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

No worries!

WORKSPACE Outdated
url = "https://github.com/wealdtech/go-eth2-types/archive/2245f15f56405852a0dc040864f6e8570735b04a.zip",
sha256 = "95a166c015e1a25ed53421807b8cc382fde3c414bae6f3ad8bcc3cb511cd77cb",
strip_prefix = "go-eth2-types-2245f15f56405852a0dc040864f6e8570735b04a",
build_file = "@prysm//third_party:eth2_types.BUILD"
Copy link
Member

Choose a reason for hiding this comment

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

Instead of a build_file, you can use build_directives to specify the herumi library alias with a go_repository.

Suggested change
build_file = "@prysm//third_party:eth2_types.BUILD"
build_directives = [
"gazelle:resolve go github.com/herumi/bls-eth-go-binary/bls @herumi_bls_eth_go_binary//:go_default_library",
],

Note: this suggestion requires changing from http_archive to go_repository.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Great stuff; this seems to be a lot cleaner. My bazel isn't up to much, I'm afraid.

importpath_aliases = ["github.com/wealdtech/go-eth2-types"],
visibility = ["//visibility:public"],
deps = [
"@herumi_bls_eth_go_binary//:go_default_library",
Copy link
Member

Choose a reason for hiding this comment

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

We're going to want to remove this dependency somehow. We're still working on revamp design for integrating the functionality of wallet / keymanager, but I am thinking we can agree on some interface that would be implemented by //shared/bls:go_default_library.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No problems with doing this once it's available. May be worth raising as a separate issue, rather than holding back this patch for it, given that any users on the current testnet who are using the wallet keymanager won't be able to sign correctly without this patch in place and the testnet goes live in around 24 hours.

Copy link
Member

Choose a reason for hiding this comment

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

Agreed on that. No delay for this PR. Thanks!

WORKSPACE Outdated
version = "v2.3.0",
build_directives = [
"gazelle:resolve go github.com/herumi/bls-eth-go-binary/bls @herumi_bls_eth_go_binary//:go_default_library",
]
Copy link
Member

Choose a reason for hiding this comment

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

I think the linter is going to complain about a missing trailing comma.

prestonvanloon
prestonvanloon previously approved these changes Apr 16, 2020
WORKSPACE Outdated Show resolved Hide resolved
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.

None yet

2 participants