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

WIP: Rho #1436

Closed
wants to merge 25 commits into from
Closed

WIP: Rho #1436

wants to merge 25 commits into from

Conversation

okwme
Copy link
Contributor

@okwme okwme commented Apr 19, 2022

replaces #1410

@okwme
Copy link
Contributor Author

okwme commented Apr 19, 2022

from #1410 :

I took the work that Lido began on their fork of wasmd and started porting it over to gaia. I did this by pasting the entirety of each file from theirs to ours, then went through the git diff and added or tweaked as seemed resonable. Some TODOs still left to confirm certain things.

Updated the go.mod similarly and did a replace on github.com/CosmWasm/wasmd with github.com/cosmos/wasmd to use the latest commit from their working branch.

There are still a number of errors, but most of them seem to be around importing liquidity module and other sdk v0.45 discrepancies.

I started this with a new branch off of Theta-main, that might not have been right now that it's merged into main. Unfortunately when I target main there are over 100 files changed. Would rebasing main fix that?

@okwme okwme mentioned this pull request Apr 19, 2022
Copy link
Contributor

@alexanderbez alexanderbez left a comment

Choose a reason for hiding this comment

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

Reviewed the E2E changes -- mainly a few minor remarks.

Looking into the liveness test...

Comment on lines +136 to +138
if err != nil {
s.Require().NoError(err)
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if err != nil {
s.Require().NoError(err)
}
s.Require().NoError(err)

Comment on lines 139 to 141
s.Require().NoError(
addGenesisAccount(val0ConfigDir, "", initBalanceStr, val.keyInfo.GetAddress()),
addGenesisAccount(val0ConfigDir, "", initBalanceStr, address),
)
Copy link
Contributor

Choose a reason for hiding this comment

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

no need to make this multi-line :)

tests/e2e/e2e_test.go Outdated Show resolved Hide resolved
tests/e2e/keys.go Outdated Show resolved Hide resolved
kb, err := keyring.New("testnet", keyring.BackendMemory, "", nil)
func createMemoryKeyFromMnemonic(mnemonic string) (*keyring.Record, error) {

cdc := params.MakeTestEncodingConfig().Codec
Copy link
Contributor

Choose a reason for hiding this comment

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

There should already be a private global for the codec -- let's use that instead of creating a new variable here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ah that's great! how do i access it?

v.consensusKey = filePV.Key

return nil
}

func (v *validator) createKeyFromMnemonic(name, mnemonic string) error {
kb, err := keyring.New(keyringAppName, keyring.BackendTest, v.configDir(), nil)
cdc := params.MakeTestEncodingConfig().Codec
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

@alexanderbez
Copy link
Contributor

alexanderbez commented Apr 26, 2022

Liveness test fails due to the image failing to build: https://github.com/cosmos/gaia/runs/6182913797?check_suite_focus=true#step:5:176

I can look into this shortly.

okwme and others added 2 commits April 27, 2022 13:26
Co-authored-by: Aleksandr Bezobchuk <[email protected]>
Co-authored-by: Aleksandr Bezobchuk <[email protected]>
@okwme
Copy link
Contributor Author

okwme commented Apr 27, 2022

Liveness test fails due to the image failing to build: https://github.com/cosmos/gaia/runs/6182913797?check_suite_focus=true#step:5:176

I can look into this shortly.

that's weird, it builds locally with make build but fails when i run make localnet-start

@okwme
Copy link
Contributor Author

okwme commented Apr 27, 2022

ah this is the error:

> make localnet-start
--> Ensure dependencies have not been modified
LEDGER_ENABLED=false GOOS=linux GOARCH=amd64 /Library/Developer/CommandLineTools/usr/bin/make build
--> Ensure dependencies have not been modified
go build -mod=readonly -tags "netgo" -ldflags '-X github.com/cosmos/cosmos-sdk/version.Name=gaia -X github.com/cosmos/cosmos-sdk/version.AppName=gaiad -X github.com/cosmos/cosmos-sdk/version.Version=okwme/rho-base-main-b83b0b85b8092061d32c6dd4029434da6ee85458 -X github.com/cosmos/cosmos-sdk/version.Commit=b83b0b85b8092061d32c6dd4029434da6ee85458 -X "github.com/cosmos/cosmos-sdk/version.BuildTags=netgo" -X github.com/tendermint/tendermint/version.TMCoreSemVer=v0.36.0-dev.0.20220226000315-ea497301a7d3 -w -s' -trimpath -o /Users/billy/GitHub/cosmos/gaia/build/ ./...
# github.com/CosmWasm/wasmvm/api
../../../go/pkg/mod/github.com/!cosm!wasm/[email protected]/api/mock_failure.go:15:27: undefined: GoAPI
../../../go/pkg/mod/github.com/!cosm!wasm/[email protected]/api/mocks.go:192:2: undefined: GasMeter
../../../go/pkg/mod/github.com/!cosm!wasm/[email protected]/api/mocks.go:193:20: undefined: Gas
../../../go/pkg/mod/github.com/!cosm!wasm/[email protected]/api/mocks.go:197:11: undefined: Gas
../../../go/pkg/mod/github.com/!cosm!wasm/[email protected]/api/mocks.go:198:11: undefined: Gas
../../../go/pkg/mod/github.com/!cosm!wasm/[email protected]/api/mocks.go:202:28: undefined: Gas
../../../go/pkg/mod/github.com/!cosm!wasm/[email protected]/api/mocks.go:209:38: undefined: Gas
../../../go/pkg/mod/github.com/!cosm!wasm/[email protected]/api/mocks.go:213:32: undefined: Gas
../../../go/pkg/mod/github.com/!cosm!wasm/[email protected]/api/mocks.go:227:42: undefined: Gas
../../../go/pkg/mod/github.com/!cosm!wasm/[email protected]/api/mocks.go:362:20: undefined: GoAPI
../../../go/pkg/mod/github.com/!cosm!wasm/[email protected]/api/mocks.go:362:20: too many errors
make[1]: *** [build] Error 2

Looks like it's because https://github.com/CosmWasm/wasmvm has tests that mock wasmd. Our version of wasmd is updated to v0.46 but I'm guessing the mocks in wasmvm are still targeting an older version of the SDK.

Is it possible to disable these somehow? We went a route with forking wasmd so that we wouldn't have to fork wasmvm as well and it would be great if we still didn't need to.

@alexanderbez
Copy link
Contributor

Liveness tests refactored -> #1456

@yaruwangway
Copy link
Contributor

yaruwangway commented May 2, 2022

hi, is this branch working, it seems have some problem with importing packet-forwarding package, it imports the fork, but the fork still has the module name with strangelove-ventures @okwme

@okwme
Copy link
Contributor Author

okwme commented May 2, 2022

@yaruwangway working on fixing conflicts now

@okwme okwme mentioned this pull request May 11, 2022
@okwme
Copy link
Contributor Author

okwme commented May 12, 2022

closing in favor of #1478

@okwme okwme closed this May 12, 2022
@okwme okwme deleted the okwme/rho-base-main branch May 12, 2022 10:55
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.

3 participants