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

feat: multi zone - plugin & reflection #8

Merged
merged 2 commits into from
Jul 19, 2023
Merged

feat: multi zone - plugin & reflection #8

merged 2 commits into from
Jul 19, 2023

Conversation

bizk
Copy link
Contributor

@bizk bizk commented Jul 4, 2023

Description

Main feature: Enable Rosetta multi zone compatibility

Closes:

Changes on this PR

  • Added plugins feature in order to onboard custom types
  • Added reflection feature to infeer node types through reflection
  • Updated packages versioning
  • Fixed minor sdkTx variables issue
  • Roll back some changes on config.
  • Fixed makefile build
  • improvements over lint
  • Added makefile build plugin steps
  • Added docs
  • Improved test github ci a

Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

I have...

  • [*] included the correct type prefix in the PR title
  • [*] added ! to the type prefix if API or client breaking change
  • [*] targeted the correct branch (see PR Targeting)
  • [/] provided a link to the relevant issue or specification
  • [*] followed the guidelines for building modules
  • [/] included the necessary unit and integration tests
  • added a changelog entry to CHANGELOG.md
  • [*] included comments for documenting Go code
  • [*] updated the relevant documentation or specification
  • [*] reviewed "Files changed" and left comments if necessary
  • [*] confirmed all CI checks have passed

Reviewers Checklist

All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.

I have...

  • confirmed the correct type prefix in the PR title
  • confirmed ! in the type prefix if API or client breaking change
  • confirmed all author checklist items have been addressed
  • reviewed state machine logic
  • reviewed API design and naming
  • reviewed documentation is accurate
  • reviewed tests and test coverage
  • manually tested (if applicable)

* added plugins feature and reflection features

* fixed minor sdkTx variables issue

* Roll back some changes on config.go

* fixed makefile build command

* improvements over lint

* Added nolint ant changed variable name

* fix .gitworkflow build

* fix .gitworkflow build

* Added makefile build plugin steps

* added nolint on staticcheck on load.go

* added nolint on staticcheck on load.go

* added nolint on staticcheck on load.go

* added nolint on staticcheck on load.go

* gofumpt on project

* skiped a test due to reliance on an experimental feature of cosmos v0.46.0-beta

* build plugin before test

* build plugin before test

* fixed failing test

* fix make test

* added docs

* small refactor on variable names
@bizk bizk self-assigned this Jul 4, 2023
@bizk bizk marked this pull request as ready for review July 4, 2023 16:03
@bizk
Copy link
Contributor Author

bizk commented Jul 6, 2023

CC: @julienrbrt who should we add as reviewers of this code?

@julienrbrt
Copy link
Member

CC: @julienrbrt who should we add as reviewers of this code?

Hum, I don't know. Are you (Zondax) not the sole maintainer of this now 😬?
Probably @tac0turtle will have a better answer.

@bizk
Copy link
Contributor Author

bizk commented Jul 7, 2023

Thx for the response @julienrbrt ! We are the main mainteiners, thought it would be nice to check it with other devs who were involved on it, lets sync up with @tac0turtle

Copy link
Contributor

@JulianToledano JulianToledano left a comment

Choose a reason for hiding this comment

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

LGTM!
my only concern is the plugin path is not configurable right now but we can address that in other pr

@@ -6,10 +6,13 @@ rosetta:
go build -mod=readonly ./cmd/rosetta

build:
go build ./cmd/rosetta.go
go build -mod=readonly ./cmd/rosetta

Copy link
Contributor

Choose a reason for hiding this comment

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

whats the difference between this two? should we compile inside a build dir??

README.md Outdated
go install cosmossdk.io/rosetta/cmd/rosetta
```

Alternatively, for building from source, simply run `make rosetta`. The binary will be located in `tools/rosetta`.
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this is not correct right now as make rosetta compiles the binary in the root project dir

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

Copy link
Member

Choose a reason for hiding this comment

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

I do not think this has been yet updated.

README.md Outdated Show resolved Hide resolved
plugins.go Outdated Show resolved Hide resolved
Copy link
Member

@julienrbrt julienrbrt left a comment

Choose a reason for hiding this comment

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

utACK.

Unrelated question: are you going to submit a PR to remove it from the SDK main?

README.md Outdated Show resolved Hide resolved
README.md Outdated
go install cosmossdk.io/rosetta/cmd/rosetta
```

Alternatively, for building from source, simply run `make rosetta`. The binary will be located in `tools/rosetta`.
Copy link
Member

Choose a reason for hiding this comment

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

I do not think this has been yet updated.

github.com/cosmos/cosmos-sdk v0.46.0-beta2.0.20230614103911-b3da8bb4e801
github.com/cosmos/gogoproto v1.4.10
github.com/cometbft/cometbft v0.37.2
github.com/cosmos/cosmos-sdk v0.47.3
Copy link
Member

Choose a reason for hiding this comment

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

Given that we already have a Rosetta version released for v0.47, doesn't it makes more sense to integrate with 0.50 already?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yaah it makes sense, i would wait until v0.50 is out of alpha tbh.
Once merged this I will move on to clean up rosetta from cosmos-sdk
thx for the review :)

* added plugins feature and reflection features

* fixed minor sdkTx variables issue

* Roll back some changes on config.go

* fixed makefile build command

* improvements over lint

* Added nolint ant changed variable name

* fix .gitworkflow build

* fix .gitworkflow build

* Added makefile build plugin steps

* added nolint on staticcheck on load.go

* added nolint on staticcheck on load.go

* added nolint on staticcheck on load.go

* added nolint on staticcheck on load.go

* gofumpt on project

* skiped a test due to reliance on an experimental feature of cosmos v0.46.0-beta

* build plugin before test

* build plugin before test

* fixed failing test

* fix make test

* added docs

* small refactor on variable names

* Updated documentation and added --plugin flag

* updated install step on README

* lint fix

* updated docs
@bizk
Copy link
Contributor Author

bizk commented Jul 18, 2023

Any clue why we cannot merge this?
CC: @julienrbrt @JulianToledano @tac0turtle

@julienrbrt
Copy link
Member

Any clue why we cannot merge this? CC: @julienrbrt @JulianToledano @tac0turtle

For some reason, the approval didn't work. Re-approved and now it seems you can merge.

@tac0turtle tac0turtle merged commit 61f1cbb into cosmos:main Jul 19, 2023
bizk added a commit that referenced this pull request Sep 1, 2023
* feat: multi zone - plugin & reflection  (#5)

* added plugins feature and reflection features

* fixed minor sdkTx variables issue

* Roll back some changes on config.go

* fixed makefile build command

* improvements over lint

* Added nolint ant changed variable name

* fix .gitworkflow build

* fix .gitworkflow build

* Added makefile build plugin steps

* added nolint on staticcheck on load.go

* added nolint on staticcheck on load.go

* added nolint on staticcheck on load.go

* added nolint on staticcheck on load.go

* gofumpt on project

* skiped a test due to reliance on an experimental feature of cosmos v0.46.0-beta

* build plugin before test

* build plugin before test

* fixed failing test

* fix make test

* added docs

* small refactor on variable names

* Zondax/feature/multi zone fix

* added plugins feature and reflection features

* fixed minor sdkTx variables issue

* Roll back some changes on config.go

* fixed makefile build command

* improvements over lint

* Added nolint ant changed variable name

* fix .gitworkflow build

* fix .gitworkflow build

* Added makefile build plugin steps

* added nolint on staticcheck on load.go

* added nolint on staticcheck on load.go

* added nolint on staticcheck on load.go

* added nolint on staticcheck on load.go

* gofumpt on project

* skiped a test due to reliance on an experimental feature of cosmos v0.46.0-beta

* build plugin before test

* build plugin before test

* fixed failing test

* fix make test

* added docs

* small refactor on variable names

* Updated documentation and added --plugin flag

* updated install step on README

* lint fix

* updated docs

* updated go.sum (#8)

* refactor: Upgrade rosetta to cosmos-sdk v0.50.0 (#7)

* changed go.mod name, renamed dependencies on rosetta, adapted methods and uses of cosmos-sdk, upgraded dependencies

* fixed all code errors

* improvements over parsing

* fees and gas parsing

* remmoved validation on message due to deprecation (it should be validated on the server side)

* solved issue on missing tx tipper

* added codec types

* fixed interface registre addr issue

* improvements

* fixed converter tests

* commented plugin_test.go due to some modules not being available at v0.50 yet

* improved code, moved parsing functions to utils.go

* solved comments, fixed lint and added utils.go for parsing

* fixed comment on cast variables

* lint comments

* Commented ibc-go dependdency until upgrade

* added type assertion error handlinhg

* updated go.sum

* rename module for vanity url

* update go.mod and go.sum
bizk added a commit that referenced this pull request Sep 4, 2023
* feat: multi zone - plugin & reflection  (#5)

* added plugins feature and reflection features

* fixed minor sdkTx variables issue

* Roll back some changes on config.go

* fixed makefile build command

* improvements over lint

* Added nolint ant changed variable name

* fix .gitworkflow build

* fix .gitworkflow build

* Added makefile build plugin steps

* added nolint on staticcheck on load.go

* added nolint on staticcheck on load.go

* added nolint on staticcheck on load.go

* added nolint on staticcheck on load.go

* gofumpt on project

* skiped a test due to reliance on an experimental feature of cosmos v0.46.0-beta

* build plugin before test

* build plugin before test

* fixed failing test

* fix make test

* added docs

* small refactor on variable names

* Zondax/feature/multi zone fix

* added plugins feature and reflection features

* fixed minor sdkTx variables issue

* Roll back some changes on config.go

* fixed makefile build command

* improvements over lint

* Added nolint ant changed variable name

* fix .gitworkflow build

* fix .gitworkflow build

* Added makefile build plugin steps

* added nolint on staticcheck on load.go

* added nolint on staticcheck on load.go

* added nolint on staticcheck on load.go

* added nolint on staticcheck on load.go

* gofumpt on project

* skiped a test due to reliance on an experimental feature of cosmos v0.46.0-beta

* build plugin before test

* build plugin before test

* fixed failing test

* fix make test

* added docs

* small refactor on variable names

* Updated documentation and added --plugin flag

* updated install step on README

* lint fix

* updated docs

* updated go.sum (#8)

* refactor: Upgrade rosetta to cosmos-sdk v0.50.0 (#7)

* changed go.mod name, renamed dependencies on rosetta, adapted methods and uses of cosmos-sdk, upgraded dependencies

* fixed all code errors

* improvements over parsing

* fees and gas parsing

* remmoved validation on message due to deprecation (it should be validated on the server side)

* solved issue on missing tx tipper

* added codec types

* fixed interface registre addr issue

* improvements

* fixed converter tests

* commented plugin_test.go due to some modules not being available at v0.50 yet

* improved code, moved parsing functions to utils.go

* solved comments, fixed lint and added utils.go for parsing

* fixed comment on cast variables

* lint comments

* Commented ibc-go dependdency until upgrade

* added type assertion error handlinhg

* updated go.sum

* rename module for vanity url

* update go.mod and go.sum

* refactor: error handling improvements (#9)

* issue on load.go

* fixed tests

* added client offline

* client_online.go

* added error handling on utils.go and unified both files

* added plugins.go

* added config, converter and libraries

* linted and fixed issues

* fixed some issues
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.

4 participants