-
Notifications
You must be signed in to change notification settings - Fork 108
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
Upgrade CosmWasm to beta5 #215
Conversation
29791e8
to
1e4cc2c
Compare
@@ -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 comment
The 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 comment
The reason will be displayed to describe this comment to others. Learn more.
Timestamps are always nanoseconds in IBC and we have it documented right in the enum case.
Let's discuss this in CosmWasm/cosmwasm#902
I wrote much of this code and twice returned seconds there, as there were no helpers, I just took env.block.time + 2000
or such.
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.
Happy for simpler name in Go
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.
Okay, we can stick to it if helps. No rush here. I just felt it was overly long when writing the glue code.
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.
Good stuff. Let's discuss field renames in cosmwasm.
But this is good to merge
@@ -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 comment
The reason will be displayed to describe this comment to others. Learn more.
And this for @alpe
@@ -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 comment
The reason will be displayed to describe this comment to others. Learn more.
Timestamps are always nanoseconds in IBC and we have it documented right in the enum case.
Let's discuss this in CosmWasm/cosmwasm#902
I wrote much of this code and twice returned seconds there, as there were no helpers, I just took env.block.time + 2000
or such.
@@ -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 comment
The reason will be displayed to describe this comment to others. Learn more.
Happy for simpler name in Go
// 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"` |
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.
This line introduces a bug because in cosmwasm-std the IbcPacket
still uses the old format with fields timeout_block
and timeout_timestamp
.
Admin
toWasmMsg::Instantiate
WasmMsg::UpdateAdmin
andWasmMsg::ClearAdmin