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

Combine wasmd and wasmgovd into one code package #210

Closed
4 tasks
ethanfrey opened this issue Jul 20, 2020 · 0 comments · Fixed by #229
Closed
4 tasks

Combine wasmd and wasmgovd into one code package #210

ethanfrey opened this issue Jul 20, 2020 · 0 comments · Fixed by #229

Comments

@ethanfrey
Copy link
Member

Summary

It is important to have these two binaries, but it seems heavy to require to copy all code to do so.

Problem Definition

Since the only difference is one configuration option, which is []string{}, we could pass this in from the cli on the build step.

Proposal

Update https://github.com/CosmWasm/wasmd/blob/master/cmd/wasmd/main.go

var EnabledProposals = ""

func getEnabledProposals() []string {
  if len(EnabledProposals) == 0 {
    return []string{}
  }
  return strings.Split(EnabledProposals, ",")
}

Then we set a linker flag in the Makefile, like

-X github.com/CosmWasm/wasmd/cmd/wasmd.EnabledProposals=StoreCode,InstantiateContract

And build two different binaries from the same cmd/wasmd directory, just using a different build flag


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
zemyblue pushed a commit to Finschia/wasmd that referenced this issue Jan 2, 2023
* update Gaia with sim refactor

* fix tests

* update to latest master
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 a pull request may close this issue.

2 participants