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

*: natives update #2417

Merged
merged 13 commits into from
Apr 5, 2022
Merged

*: natives update #2417

merged 13 commits into from
Apr 5, 2022

Conversation

AnnaShaleva
Copy link
Member

@AnnaShaleva AnnaShaleva commented Apr 4, 2022

Close #2343, close #2415.

@codecov
Copy link

codecov bot commented Apr 4, 2022

Codecov Report

Merging #2417 (d41f711) into master (c12a3b7) will decrease coverage by 0.05%.
The diff coverage is 83.62%.

❗ Current head d41f711 differs from pull request most recent head 72ec354. Consider uploading reports for the commit 72ec354 to get more accurate results

@@            Coverage Diff             @@
##           master    #2417      +/-   ##
==========================================
- Coverage   85.14%   85.08%   -0.06%     
==========================================
  Files         290      289       -1     
  Lines       36139    36099      -40     
==========================================
- Hits        30770    30716      -54     
- Misses       4088     4097       +9     
- Partials     1281     1286       +5     
Impacted Files Coverage Δ
cli/smartcontract/generate.go 83.33% <ø> (ø)
pkg/vm/state.go 92.85% <ø> (ø)
pkg/core/blockchain.go 83.02% <50.00%> (ø)
pkg/core/dao/dao.go 79.76% <53.33%> (-3.08%) ⬇️
pkg/core/native/oracle.go 72.19% <71.42%> (ø)
pkg/neotest/basic.go 94.09% <92.00%> (ø)
pkg/neotest/client.go 90.00% <92.30%> (ø)
pkg/core/native/ledger.go 95.33% <95.65%> (+1.39%) ⬆️
pkg/core/native/crypto.go 100.00% <100.00%> (ø)
pkg/core/native/interop.go 63.23% <100.00%> (ø)
... and 19 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4c80de3...72ec354. Read the comment docs.

pkg/vm/state.go Show resolved Hide resolved
if err != nil || !isTraceableBlock(ic.Chain, h) {
return stackitem.Make(vm.NoneState)
}
aer, err := ic.DAO.GetAppExecResults(tx.Hash(), trigger.Application)
Copy link
Member

Choose a reason for hiding this comment

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

Not very efficient since we have to go to the DB again with the same request.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, that's because (dao *Simple) GetAppExecResults doesn't return the transaction height. The problem is that (dao *Simple) GetAppExecResults can return both block and transaction+height, so do we need to split it into two separate methods?

Or maybe it's even better to create some (dao *Simple) GetTxExecResult (uint32, *transaction.Transaction, state.AppExecResult) method?

Copy link
Member

Choose a reason for hiding this comment

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

I had an idea for creating it way back when I'd changed the DB format, but there was no real use case. Now it looks like we have it. There are cases where we only need transaction/height and we don't want to spend time on execution result decoding, but if we have to decode everything then it's worth returning everything from some method.

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed. Let's first come up to the final decision about GetTxExecResult, and after that I'll update gomods.

@roman-khimov roman-khimov merged commit 017326d into master Apr 5, 2022
@roman-khimov roman-khimov deleted the interop-update branch April 5, 2022 16:03
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.

Murmur32 in cryptolib Add GetTransactionVMState call
2 participants