fix: Test fail after PR#40 #15
Labels
No Label
bug
documentation
duplicate
enhancement
good first issue
help wanted
in progress
invalid
question
wontfix
Copied from Github
Kind/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: cerc-io/laconic-sdk#15
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "murali/fix-tests"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
closes: #8
@nikugogoi @roysc I made a few changes on laconic-sdk and laconicd (https://github.com/cerc-io/laconicd/pull/70)
Now I'm stuck with a different error
signature verification failed; please verify account number (0) and chain-id (ethermint_9000-1): feePayer pubkey EthPubKeySecp256k1{02E848C9FABEED18CF49F8315ED6B4D162487B2DAEA701414EBF8BD33CF943A531} is different from transaction pubkey EthPubKeySecp256k1{0358D2444AF562B806BDF14586DF061DD969E043C93B0A780B4E4834FF313A2E86}: invalid pubkey [cerc-io/laconicd/app/ante/eip712.go:251]: unauthorized
To recreate: checkout to murali/fix-tests on laconic-sdk and murali/record-attributes on laconicd
Hi, just noticed the message above references chain id ethermint_9000-1 -- in my scripts I changed it to laconic_9000-1.
As long as the chai-ID is same in both the repos, it works. Both laconicd and laconic-sdk in my PRs use ethermint chainID.
Now, only SetRecord Messages return this error. All other messages work as expected.
Can we please set the chain ID to laconic instead of ethermint? Thanks!
That's the wrong chain id. It should be changed in laconicd, and left as-is in laconic-sdk. See : https://github.com/cerc-io/laconicd/pull/71/files#r1058056971
This seems like quite a large number of files changed in order to resolve a test regression. Could you give a bit of background on what's going on in this PR? (or does this PR incorporate some other body of work not directly related to the test fix perhaps)?
Fixed that in a different open PR https://github.com/cerc-io/laconicd/pull/69
Thank you.
Most of the changed files are due to renaming of nameservice module to "registry". You can go through the proto/vulcanize which are same as in laconicd and ignore all the src/proto files which are proto generated.
Now the main changes are refferred to the change of attributes type from string to Any.
e295b8de36/proto/vulcanize/registry/v1beta1/registry.proto (L67)
See:
src/account.ts
src/messages/registry.ts
src/types.ts
Update:
Problem 1:
After hardcodeing record attributes in https://github.com/cerc-io/laconicd/pull/70 I found out that the issue was with EIP712 signature verification.
While unpacking the messages to generate typed data, the attributes field in record, which is of type Any, is also being unpacked to the typ of attributes Ex: Website Registration Record Attributes
But the on the client side the message with attributes as type Any is signed. And thus the difference in signBytes on laconicd and laconic-sdk.
Problem 2:
The tests on laconic-sdk rely on versioning of records but the attribute types defined on laconicd do not have a version field. So when the record is signed on laconic-sdk and the signature is added to the payload, the signedbytes are of the record containing a version field. When we try to verify the owner of the record from signature inside the keeper, the signBytes generated there are of the record that do not have a version field and the verification of record owner fails.
I fixed the above problems and 35/40 tests are passing. Working on the failing tests now.
checkout to murali/record-attributes on laconicd before running tests
except for one util test which was failing even before PR #40 everything else passes
All tests pass successfully and merging this now.