Skip to content

Use sequence number from cosmos auth module#1462

Merged
NicolasMahe merged 8 commits intodevfrom
fix/atomic-acc-seq
Nov 7, 2019
Merged

Use sequence number from cosmos auth module#1462
NicolasMahe merged 8 commits intodevfrom
fix/atomic-acc-seq

Conversation

@krhubert
Copy link
Copy Markdown
Contributor

@krhubert krhubert commented Nov 4, 2019

close #1334

@krhubert krhubert added the bug Something isn't working label Nov 4, 2019
@krhubert krhubert added this to the next milestone Nov 4, 2019
@krhubert krhubert requested a review from NicolasMahe November 4, 2019 18:16
@krhubert krhubert self-assigned this Nov 4, 2019
Copy link
Copy Markdown
Member

@antho1404 antho1404 left a comment

Choose a reason for hiding this comment

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

I'm not sure that's the best solution to handle that but that will do it for now :)

@antho1404
Copy link
Copy Markdown
Member

antho1404 commented Nov 5, 2019

Just put a comment on the issue #1334 (comment), there is a better way to do that fix

Copy link
Copy Markdown
Member

@NicolasMahe NicolasMahe left a comment

Choose a reason for hiding this comment

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

I didn't try it yet but it looks good!
The accNumber can also be removed

Comment thread cosmos/client.go Outdated
Comment thread sdk/service/sdk.go Outdated
Comment thread sdk/service/sdk.go Outdated
Comment thread cosmos/client.go Outdated
Comment thread cosmos/client.go
Comment thread cosmos/client.go Outdated
@antho1404
Copy link
Copy Markdown
Member

The sequence is always 0, this is because the auth antehandler is never called. There is an issue with the initialization of the cosmos app. Also because we generate the genesis in dev mode and send one transaction, the initial sequence should be incremented and be 1.

I'm already working a way to fix that, I can put the fix on this PR and make sure it actually works

@NicolasMahe NicolasMahe changed the title Increase sequence number on every transaction Use sequence number from cosmos auth module Nov 7, 2019
@NicolasMahe NicolasMahe merged commit ec7dbf8 into dev Nov 7, 2019
@NicolasMahe NicolasMahe deleted the fix/atomic-acc-seq branch November 7, 2019 08:41
@NicolasMahe NicolasMahe added the release:fix Pull requests that fix something label Nov 26, 2019
@NicolasMahe NicolasMahe mentioned this pull request Nov 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working release:fix Pull requests that fix something

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement correctly cosmos account sequence

3 participants