-
Notifications
You must be signed in to change notification settings - Fork 193
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
feat(testutil): key generation should support both ed25519 and secp256k1. #1316
Comments
Unique-Divine
added a commit
that referenced
this issue
May 5, 2023
matthiasmatt
added a commit
that referenced
this issue
May 9, 2023
…#1317) * golang structs for the contract binding types * feat(wasm): implement custom queries: Reserves, AllMarkets * refactor: make request type names more obvious * Wire in the WasmKeeper to the app with []wasm.Option set for the bindings * add FundAccount fn to x/common/testutil * rm fund.go. These functions were defined in the recent x/inflation PR * refactor: test genesis setup to testutil/genesis so other modules can import th functions * fix: add json serialization info to cw_query.go * test(wasmbin): add perp bindings contract and add correctness tests * test(wasm/binding): successful integration test using the real contract * update CHANGELOG and include marshal.go * fix: linter * (wasm): impl and test base price query * add utils * impl and test BasePrice, Metrics, and PremiumFraction queries * add remaining integration tests for the PR * test,fix(wasm): all integration tests working on a real contract * test,fix(wasm): all integration tests working on a real contract * comment * refactor(wasm): small rename to query_responses.json * refactor,docs: PR comments * test(cw_struct): test compatibility with rust binding types for execute msgs * feat(wasm): add execute msg bindings for open pos, add & remove margin, close pos * (wasm.go): wire the execute msg as a wasm.Option * test(wasm): unit + integration tests for perp transactions * changelog * changelog * test(wasm): check for position in state after it's open * golangci-lint * (wasm): new bindings contract * feat(wasm): peg shift bindings + unit test + integration test * changelog * build: new contract with String types for sdk.Dec values that can be negative * impl Position query with unit test * test: integration test for Position query * impl and test multiple position query * test(wasm): verify correctness of fields in positions query * checkpoint #wip sudo core business logic * checkpoint #wip: implement all business logic with full test coverage * test: add integration tests of the sudo contracts in x/wasm * changelog * changelog * more docs * refactor(sudo): run msg.ValidateBasic before the main handler * refactor: small cleanup * doc comment * feat(sudo): cli commands + tests for tx and query * feat(sample.go): secp256k1 usage for #1316 * chore: changelog + linter * test(sudo): slice order can change when written into state * test(sudo): fix boolean checks * chore: linter * chore: linter * changelog * remove ed25519Algo support in sample.go --------- Co-authored-by: Matthias <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Context
All of our key generation util functions in
x/common/testutil
are generated from ed25519. I found out when trying to import one of these accounts to the validator node'sclientCtx.Keyring
that support was never added on the binary for ed25519 keys.Background
It seems the feature was de-prioritized and never implemented according to the comments in the SDK repo:
Reproducibility
This was some of the code I wrote that made the error apparent:
The
root
account was created using thePrivKeyAddresPairs
function. The semantically relevant part of that function is:I executed a transaction with the
root
as the sender and got the following output.Desired Solution
Both the
testutil.AccAddress
andtestutil.PrivKeyAddressPairs
functions inx/common/testutil
should generate keys with secp256k1 instead of ed25519. We can replace or rename the current versions of these functions.The text was updated successfully, but these errors were encountered: