-
Notifications
You must be signed in to change notification settings - Fork 862
add legacy wasmvm v154 #2703
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
add legacy wasmvm v154 #2703
Conversation
|
The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).
|
Codecov Report❌ Patch coverage is ❌ Your project status has failed because the head coverage (38.19%) is below the target coverage (40.00%). You can increase the head coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## release/v6.3 #2703 +/- ##
================================================
- Coverage 43.79% 43.31% -0.48%
================================================
Files 1293 1866 +573
Lines 105129 155279 +50150
================================================
+ Hits 46036 67257 +21221
- Misses 54929 82010 +27081
- Partials 4164 6012 +1848
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
| for k, v := range balances { | ||
| dst := make([]types.Coin, len(v)) | ||
| copy(dst, v) | ||
| bal[k] = dst | ||
| } |
Check warning
Code scanning / CodeQL
Iteration over map Warning
|
|
||
| func (i *memDBIterator) assertIsValid() { | ||
| if !i.Valid() { | ||
| panic("iterator is invalid") |
Check warning
Code scanning / CodeQL
Panic in BeginBock or EndBlock consensus methods Warning test
| go func() { | ||
| if useMtx { | ||
| defer db.mtx.RUnlock() | ||
| } | ||
| // Because we use [start, end) for reverse ranges, while btree uses (start, end], we need | ||
| // the following variables to handle some reverse iteration conditions ourselves. | ||
| var ( | ||
| skipEqual []byte | ||
| abortLessThan []byte | ||
| ) | ||
| visitor := func(i btree.Item) bool { | ||
| item := i.(*item) | ||
| if skipEqual != nil && bytes.Equal(item.key, skipEqual) { | ||
| skipEqual = nil | ||
| return true | ||
| } | ||
| if abortLessThan != nil && bytes.Compare(item.key, abortLessThan) == -1 { | ||
| return false | ||
| } | ||
| select { | ||
| case <-ctx.Done(): | ||
| return false | ||
| case ch <- item: | ||
| return true | ||
| } | ||
| } | ||
| switch { | ||
| case start == nil && end == nil && !reverse: | ||
| db.btree.Ascend(visitor) | ||
| case start == nil && end == nil && reverse: | ||
| db.btree.Descend(visitor) | ||
| case end == nil && !reverse: | ||
| // must handle this specially, since nil is considered less than anything else | ||
| db.btree.AscendGreaterOrEqual(newKey(start), visitor) | ||
| case !reverse: | ||
| db.btree.AscendRange(newKey(start), newKey(end), visitor) | ||
| case end == nil: | ||
| // abort after start, since we use [start, end) while btree uses (start, end] | ||
| abortLessThan = start | ||
| db.btree.Descend(visitor) | ||
| default: | ||
| // skip end and abort after start, since we use [start, end) while btree uses (start, end] | ||
| skipEqual = end | ||
| abortLessThan = start | ||
| db.btree.DescendLessOrEqual(newKey(end), visitor) | ||
| } | ||
| close(ch) | ||
| }() |
Check notice
Code scanning / CodeQL
Spawning a Go routine Note test
## Describe your changes and provide context We will disallow unsafe tx starting v6.3.0, but unsafe txs that were sent before v6.3.0 should still be traceable ## Testing performed to validate your change tested on rpc node
Describe your changes and provide context
Add
github.com/sei-protocol/sei-wasmvm v1.5.4-sei.0.0.2as a legacy VM to be used prior to v6.3.0 (specifically for tracing where old transactions need to be executed with the old logic exactly). For transactions post v6.3.0, they will use the monorepo sei-wasmvm.Testing performed to validate your change
regression tests