Skip to content
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

Problem: don't support native action in statedb #333

Merged
merged 7 commits into from
Sep 7, 2023

Conversation

yihuang
Copy link
Collaborator

@yihuang yihuang commented Sep 7, 2023

Closes: #XXX

Description


For contributor use:

  • Targeted PR against correct branch (see CONTRIBUTING.md)
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the module structure standards.
  • Wrote unit and integration tests
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/)
  • Added relevant godoc comments.
  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer

For admin use:

  • Added appropriate labels to PR (ex. WIP, R4R, docs, etc)
  • Reviewers assigned
  • Squashed all commits, uses message "Merge pull request #XYZ: [title]" (coding standards)

@yihuang yihuang requested a review from mmsqe September 7, 2023 07:56
CHANGELOG.md Outdated Show resolved Hide resolved
Comment on lines +128 to +130
for key, store := range cms.stores {
stores[key] = store.Clone()
}

Check failure

Code scanning / gosec

the value in the range statement should be _ unless copying a map: want: for key := range m Error

the value in the range statement should be _ unless copying a map: want: for key := range m
Comment on lines +119 to +121
for _, store := range cms.stores {
store.Write()
}

Check failure

Code scanning / gosec

the value in the range statement should be _ unless copying a map: want: for key := range m Error

the value in the range statement should be _ unless copying a map: want: for key := range m
Comment on lines +64 to +66
for _, key := range keys {
stores[key] = parent.GetKVStore(key)
}

Check failure

Code scanning / gosec

the value in the range statement should be _ unless copying a map: want: for key := range m Error

the value in the range statement should be _ unless copying a map: want: for key := range m
Comment on lines +142 to +148
for key, store := range cms.stores {
otherStore, ok := ms.stores[key]
if !ok {
panic("Invariant violation: Restore should only be called on a store cloned from itself")
}
store.Restore(otherStore)
}

Check failure

Code scanning / gosec

the value in the range statement should be _ unless copying a map: want: for key := range m Error

expected exactly 1 statement (either append, delete, or copying to another map) in a range with a map, got 3
Comment on lines +45 to +54
for key, store := range stores {
if cms.TracingEnabled() {
tctx := cms.traceContext.Clone().Merge(types.TraceContext{
storeNameCtxKey: key.Name(),
})

store = tracekv.NewStore(store, cms.traceWriter, tctx)
}
cms.stores[key] = cachekv.NewStore(store)
}

Check failure

Code scanning / gosec

the value in the range statement should be _ unless copying a map: want: for key := range m Error

expected exactly 1 statement (either append, delete, or copying to another map) in a range with a map, got 2
Copy link
Collaborator

@mmsqe mmsqe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

might need add store to default.nix

@yihuang yihuang merged commit c12fa3b into crypto-org-chain:develop Sep 7, 2023
23 of 27 checks passed
@yihuang yihuang deleted the cache-store branch September 7, 2023 10:04
dongsam added a commit to b-harvest/ethermint that referenced this pull request Jun 4, 2024
- (evm) crypto-org-chain#328 Support precompile interface.
- (statedb) crypto-org-chain#333 Support native action in statedb, prepare for precompiles.
- (precompile) crypto-org-chain#338 Fix simulation of precompile using context.
- (precompile) crypto-org-chain#342 Problem: native action don't support mem keys
- (precompile) crypto-org-chain#343 Problem: no api to convert native events to logs
- (precompile) crypto-org-chain#344 Fix error handling in precompile context.
- (precompile) crypto-org-chain#346 Add support for new precompile context.
- (precompile) crypto-org-chain#347 Problem: miss contract in ExtStateDB interface
- (precompile) crypto-org-chain#359 Problem: no efficient way to execute read-only native actions
- (precompile) crypto-org-chain#371 Add StateDB itself into native context for precompiles to emit evm logs directly.
- (precompile) crypto-org-chain#380 Allow init precompiled contract with rules when new evm.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants