-
Notifications
You must be signed in to change notification settings - Fork 31
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: add inactive contract management in wasm #655
Merged
zemyblue
merged 18 commits into
Finschia:feat/wasm_refactor
from
zemyblue:lbm_wasm_blacklist
Sep 5, 2022
Merged
feat: add inactive contract management in wasm #655
zemyblue
merged 18 commits into
Finschia:feat/wasm_refactor
from
zemyblue:lbm_wasm_blacklist
Sep 5, 2022
+4,723
−2,005
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: zemyblue <zemyblue@gmail.com>
Signed-off-by: zemyblue <zemyblue@gmail.com>
Signed-off-by: zemyblue <zemyblue@gmail.com>
Signed-off-by: zemyblue <zemyblue@gmail.com>
Signed-off-by: zemyblue <zemyblue@gmail.com>
Signed-off-by: zemyblue <zemyblue@gmail.com>
- add inactive_contract_addresses in genesisStatus - modify Params of wasm - add custom tx and queries Signed-off-by: zemyblue <zemyblue@gmail.com>
Signed-off-by: zemyblue <zemyblue@gmail.com>
…asm.Keeper. And change to proper gas data in unittest. Signed-off-by: zemyblue <zemyblue@gmail.com>
Codecov Report
@@ Coverage Diff @@
## feat/wasm_refactor #655 +/- ##
=====================================================
Coverage ? 60.41%
=====================================================
Files ? 826
Lines ? 96088
Branches ? 0
=====================================================
Hits ? 58048
Misses ? 34563
Partials ? 3477 |
Signed-off-by: zemyblue <zemyblue@gmail.com>
0Tech
reviewed
Aug 31, 2022
Signed-off-by: zemyblue <zemyblue@gmail.com>
0Tech
reviewed
Sep 1, 2022
shiki-tak
reviewed
Sep 1, 2022
- response error if there isn't contract address in chain Signed-off-by: zemyblue <zemyblue@gmail.com>
Signed-off-by: zemyblue <zemyblue@gmail.com>
loloicci
reviewed
Sep 1, 2022
Signed-off-by: zemyblue <zemyblue@gmail.com>
Signed-off-by: zemyblue <zemyblue@gmail.com>
Signed-off-by: zemyblue <zemyblue@gmail.com>
Signed-off-by: zemyblue <zemyblue@gmail.com>
loloicci
approved these changes
Sep 2, 2022
Signed-off-by: zemyblue <zemyblue@gmail.com>
shiki-tak
approved these changes
Sep 5, 2022
0Tech
approved these changes
Sep 5, 2022
5 tasks
This was referenced May 10, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Main changes
inactive_contract_addresses
ofgenesisStatue
proto/lbm/wasm/v1
directory.Description
related: #623
This PR is the function that replacing previous contract blacklist management.
The previous contract blacklist management function was managed in the contract status of wasm genesisStatus I
But in order that we added this function in the contract status, we needed to customize original genesis proto.
So I add new lbm's genesis proto and add inactive contract list in lbm's genesisStatus without modifying original genesisStatus.
Add custom lbm protos
proto/lbm/wasm/v1/event.proto
proto/lbm/wasm/v1/proposal.proto
proto/lbm/wasm/v1/query.proto
proto/lbm/wasm/v1/tx.proto
Added
Msg.StoreCodeAndInstantiateContract
tx,InactiveContracts
query andDeactivateContractProposal
,ActivateContractProposal
proposals. And addedEventDeactivateContractProposal
andEventActivateContractProposal
eventsThese proto is converted in
x/wasm/lbmtypes
directoryTo avoide import cycle problems,
lbmtypes
is not imported fromtypes
.Change cosmwasm's protos
I didn't want to modify original proto file of cosmwasm/wasmd. But I needed to apply for the changes of our
WasmGasRegister
architecture in the wasmKeeper
. OurWasmGasRegister
architecture usegenesisStatus
instead of default configure of cosmwasm/wasmd. AndWasmGasRegister
is defined in wasm Keeper structure as private property. So we can't transfer as param or wrap the keeper. Therefore I had no choice but to correct it.The following list is modified proto list
proto/cosmwasm/v1/genesis.proto
inactive_contract_addresses
fieldproto/cosmwasm/v1/types.proto
gas_multiplier
,instance_cost
andcompile_cost
inParams
Motivation and context
How has this been tested?
Screenshots (if appropriate):
Checklist:
CHANGELOG.md
client/docs/swagger-ui/swagger.yaml