-
Notifications
You must be signed in to change notification settings - Fork 8
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: Port x/wasm module #92
Conversation
return err | ||
} | ||
|
||
endpoint.ClientID, err = ibctesting.ParseClientIDFromEvents(res.GetEvents()) |
Check warning
Code scanning / Semgrep
Should `$X` be modified when an error could be returned?
return err | ||
} | ||
|
||
endpoint.ConnectionID, err = ibctesting.ParseConnectionIDFromEvents(res.GetEvents()) |
Check warning
Code scanning / Semgrep
Should `$X` be modified when an error could be returned?
} | ||
|
||
if endpoint.ConnectionID == "" { | ||
endpoint.ConnectionID, err = ibctesting.ParseConnectionIDFromEvents(res.GetEvents()) |
Check warning
Code scanning / Semgrep
Should `$X` be modified when an error could be returned?
return err | ||
} | ||
|
||
endpoint.ChannelID, err = ibctesting.ParseChannelIDFromEvents(res.GetEvents()) |
Check warning
Code scanning / Semgrep
Should `$X` be modified when an error could be returned?
} | ||
|
||
if endpoint.ChannelID == "" { | ||
endpoint.ChannelID, err = ibctesting.ParseChannelIDFromEvents(res.GetEvents()) |
Check warning
Code scanning / Semgrep
Should `$X` be modified when an error could be returned?
proposalTitle, err := cmd.Flags().GetString(cli.FlagTitle) | ||
if err != nil { | ||
return clientCtx, proposalTitle, "", nil, err | ||
} |
Check warning
Code scanning / Semgrep
Variable `$X` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
proposalDescr, err := cmd.Flags().GetString(cli.FlagDescription) | ||
if err != nil { | ||
return client.Context{}, proposalTitle, proposalDescr, nil, err | ||
} |
Check warning
Code scanning / Semgrep
Variable `$X` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
deposit, err := sdk.ParseCoinsNormalized(depositArg) | ||
if err != nil { | ||
return client.Context{}, proposalTitle, proposalDescr, deposit, err | ||
} |
Check warning
Code scanning / Semgrep
Variable `$X` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
checksum, err = k.wasmVM.Create(wasmCode) | ||
if err != nil { | ||
return 0, checksum, sdkerrors.Wrap(types.ErrCreateFailed, err.Error()) | ||
} |
Check warning
Code scanning / Semgrep
Variable `$X` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
for _, chain := range coord.Chains { | ||
coord.UpdateTimeForChain(chain) | ||
} |
Check warning
Code scanning / CodeQL
Iteration over map
if err != nil { | ||
return nil, err | ||
} | ||
if rsp == nil || reflect.ValueOf(rsp).IsNil() { |
Check warning
Code scanning / CodeQL
Impossible interface nil check
"encoding/hex" | ||
"fmt" | ||
"math" | ||
"reflect" |
Check notice
Code scanning / CodeQL
Sensitive package import
|
||
import ( | ||
"encoding/json" | ||
"reflect" |
Check notice
Code scanning / CodeQL
Sensitive package import
|
||
import ( | ||
"fmt" | ||
"reflect" |
Check notice
Code scanning / CodeQL
Sensitive package import
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @aleem1314! I am wondering if we can get away with using WASM tooling as dependencies rather than internalizing a stateful module for them.
Background here is relevant here too. WASM execution environment is another piece necessary to fulfill the goal of "On-chain watcher fraud proof evaluation", it is this environment that we will need to provide access to the Postgres IPLD blockstore through the package discussed there.
Tagging @AFDudley here to discuss too.
Based on my current understanding the WASM execution environment we will use in laconicd will not need to write state into the Tendermint/Cosmos state commitment (IAVL). Service providers will usually run watcher WASM "off-chain", in watcher groups, and only when someone submits a fraud proof to Laconic does the laconicd state machine execute WASM to evaluate the fraud proof by re-running the challenged watcher state transitions to see if the result matches the result provided. But, are the state changes affected during this evaluation committed back to Tendermint? Or are they executed in a sort of speculative manner and the only thing committed is a signed attestation to the result of the evaluation?
I think the result needs to be written to the chain, but we will need to use IPLD and probably make some other changes so that it's efficient to store. |
The CosmWasmVM |
Ref: #25
Description
For contributor use:
docs/
) or specification (x/<module>/spec/
)godoc
comments.Unreleased
section inCHANGELOG.md
Files changed
in the Github PR explorerFor admin use:
WIP
,R4R
,docs
, etc)