feat: Port x/wasm module #92
No reviewers
Labels
No Label
bug
C:CLI
C:Crypto
C:Encoding
C:Proto
C:Types
dependencies
docker
documentation
duplicate
enhancement
go
good first issue
help wanted
high priority
in progress
invalid
javascript
low priority
medium priority
question
Status: Stale
Type: ADR
Type: Build
Type: CI
Type: Docs
Type: Tests
urgent
wontfix
Copied from Github
Kind/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: cerc-io/laconicd-deprecated#92
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "aleem/25-wasmd"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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)@ -0,0 +813,4 @@
proposalTitle, err := cmd.Flags().GetString(cli.FlagTitle)
if err != nil {
return clientCtx, proposalTitle, "", nil, err
}
Variable
$X
is likely modified and later used on error. In some cases this could result in panics due to a nil dereferenceVariable
proposalTitle
is likely modified and later used on error. In some cases this could result in panics due to a nil dereferenceShow more details
@ -0,0 +818,4 @@
proposalDescr, err := cmd.Flags().GetString(cli.FlagDescription)
if err != nil {
return client.Context{}, proposalTitle, proposalDescr, nil, err
}
Variable
$X
is likely modified and later used on error. In some cases this could result in panics due to a nil dereferenceVariable
proposalDescr
is likely modified and later used on error. In some cases this could result in panics due to a nil dereferenceShow more details
@ -0,0 +828,4 @@
deposit, err := sdk.ParseCoinsNormalized(depositArg)
if err != nil {
return client.Context{}, proposalTitle, proposalDescr, deposit, err
}
Variable
$X
is likely modified and later used on error. In some cases this could result in panics due to a nil dereferenceVariable
deposit
is likely modified and later used on error. In some cases this could result in panics due to a nil dereferenceShow more details
@ -0,0 +120,4 @@
return err
}
endpoint.ClientID, err = ibctesting.ParseClientIDFromEvents(res.GetEvents())
Should
$X
be modified when an error could be returned?Should
endpoint
be modified when an error could be returned?Show more details
@ -0,0 +167,4 @@
return err
}
endpoint.ConnectionID, err = ibctesting.ParseConnectionIDFromEvents(res.GetEvents())
Should
$X
be modified when an error could be returned?Should
endpoint
be modified when an error could be returned?Show more details
@ -0,0 +194,4 @@
}
if endpoint.ConnectionID == "" {
endpoint.ConnectionID, err = ibctesting.ParseConnectionIDFromEvents(res.GetEvents())
Should
$X
be modified when an error could be returned?Should
endpoint
be modified when an error could be returned?Show more details
@ -0,0 +278,4 @@
return err
}
endpoint.ChannelID, err = ibctesting.ParseChannelIDFromEvents(res.GetEvents())
Should
$X
be modified when an error could be returned?Should
endpoint
be modified when an error could be returned?Show more details
@ -0,0 +310,4 @@
}
if endpoint.ChannelID == "" {
endpoint.ChannelID, err = ibctesting.ParseChannelIDFromEvents(res.GetEvents())
Should
$X
be modified when an error could be returned?Should
endpoint
be modified when an error could be returned?Show more details
@ -0,0 +157,4 @@
checksum, err = k.wasmVM.Create(wasmCode)
if err != nil {
return 0, checksum, sdkerrors.Wrap(types.ErrCreateFailed, err.Error())
}
Variable
$X
is likely modified and later used on error. In some cases this could result in panics due to a nil dereferenceVariable
checksum
is likely modified and later used on error. In some cases this could result in panics due to a nil dereferenceShow more details
@ -0,0 +71,4 @@
func (coord *Coordinator) UpdateTime() {
for _, chain := range coord.Chains {
coord.UpdateTimeForChain(chain)
}
Iteration over map
Iteration over map may be a possible source of non-determinism
Show more details
@ -0,0 +7,4 @@
"encoding/hex"
"fmt"
"math"
"reflect"
Sensitive package import
Certain system packages contain functions which may be a possible source of non-determinism
Show more details
@ -0,0 +2,4 @@
import (
"encoding/json"
"reflect"
Sensitive package import
Certain system packages contain functions which may be a possible source of non-determinism
Show more details
@ -0,0 +73,4 @@
if err != nil {
return nil, err
}
if rsp == nil || reflect.ValueOf(rsp).IsNil() {
Impossible interface nil check
This value can never be nil, since it is a wrapped interface value.
Show more details
@ -0,0 +2,4 @@
import (
"fmt"
"reflect"
Sensitive package import
Certain system packages contain functions which may be a possible source of non-determinism
Show more details
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
Instantiate
andExecute
ref methods requires access to theKVStore
. If we keep wasm not as a stateful module, which module store we are going to use in thewasm
?This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days-before-close if no further activity occurs.
Pull request closed