-
Notifications
You must be signed in to change notification settings - Fork 128
Upgrade CosmWasm to beta5 #215
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
Changes from all commits
084c70f
e8a36dd
c0b8874
c3c6243
1e4cc2c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -101,6 +101,11 @@ func (vm *VM) AnalyzeCode(checksum Checksum) (*types.AnalysisReport, error) { | |
return api.AnalyzeCode(vm.cache, checksum) | ||
} | ||
|
||
// GetMetrics some internal metrics for monitoring purposes. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And this for @alpe |
||
func (vm *VM) GetMetrics() (*types.Metrics, error) { | ||
return api.GetMetrics(vm.cache) | ||
} | ||
|
||
// Instantiate will create a new contract based on the given Checksum. | ||
// We can set the initMsg (contract "genesis") here, and it then receives | ||
// an account and address and can be invoked (Execute) many times. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,18 +41,30 @@ func (t IBCTimeoutBlock) IsZero() bool { | |
return t.Revision == 0 && t.Height == 0 | ||
} | ||
|
||
type IBCTimeoutBoth struct { | ||
Block IBCTimeoutBlock `json:"block"` | ||
Timestamp uint64 `json:"timestamp_nanos"` // TODO: simplify to just "timestamp" in Rust | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Simpler field name coming with CosmWasm/cosmwasm#902. Timestamps are always nanoseconds in IBC and we have it documented right in the enum case. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Let's discuss this in CosmWasm/cosmwasm#902 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Happy for simpler name in Go There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Okay, we can stick to it if helps. No rush here. I just felt it was overly long when writing the glue code. |
||
} | ||
|
||
// IBCTimeout is the timeout for an IBC packet. At least one of block and timestamp is required. | ||
// | ||
// This is an enum, i.e. only one of the three fields must be set. | ||
type IBCTimeout struct { | ||
// Nanoseconds since UNIX epoch | ||
// See https://golang.org/pkg/time/#Time.UnixNano | ||
Timestamp *uint64 `json:"timestamp_nanos,omitempty"` // TODO: simplify to just "timestamp" in Rust | ||
// Block after which the packet times out. | ||
Block *IBCTimeoutBlock `json:"block,omitempty"` | ||
// Block and time after which the packet times out. | ||
Both *IBCTimeoutBoth `json:"both,omitempty"` | ||
} | ||
|
||
type IBCPacket struct { | ||
Data []byte `json:"data"` | ||
Src IBCEndpoint `json:"src"` | ||
Dest IBCEndpoint `json:"dest"` | ||
Sequence uint64 `json:"sequence"` | ||
// block after which the packet times out. | ||
// at least one of timeout_block, timeout_timestamp is required | ||
TimeoutBlock *IBCTimeoutBlock `json:"timeout_block,omitempty"` | ||
// Nanoseconds since UNIX epoch | ||
// See https://golang.org/pkg/time/#Time.UnixNano | ||
// at least one of timeout_block, timeout_timestamp is required | ||
TimeoutTimestamp *uint64 `json:"timeout_timestamp,omitempty"` | ||
Timeout IBCTimeout `json:"timeout"` | ||
webmaster128 marked this conversation as resolved.
Show resolved
Hide resolved
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This line introduces a bug because in cosmwasm-std the |
||
} | ||
|
||
type IBCAcknowledgement struct { | ||
|
Uh oh!
There was an error while loading. Please reload this page.