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

Adjust System.Contract.Call.* interops #1228

Merged
merged 13 commits into from
Jul 28, 2020
Merged

Adjust System.Contract.Call.* interops #1228

merged 13 commits into from
Jul 28, 2020

Conversation

fyrchik
Copy link
Contributor

@fyrchik fyrchik commented Jul 23, 2020

Close #1181.
Close #1220.

@codecov
Copy link

codecov bot commented Jul 23, 2020

Codecov Report

Merging #1228 into master will increase coverage by 4.19%.
The diff coverage is 96.42%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1228      +/-   ##
==========================================
+ Coverage   62.64%   66.83%   +4.19%     
==========================================
  Files         200      200              
  Lines       17123    17148      +25     
==========================================
+ Hits        10726    11461     +735     
+ Misses       5810     5074     -736     
- Partials      587      613      +26     
Impacted Files Coverage Δ
pkg/compiler/compiler.go 39.70% <0.00%> (-2.95%) ⬇️
pkg/core/native/interop.go 57.14% <ø> (-9.53%) ⬇️
pkg/interop/engine/engine.go 0.00% <0.00%> (ø)
pkg/smartcontract/manifest/method.go 75.00% <ø> (-6.25%) ⬇️
pkg/compiler/analysis.go 79.12% <92.30%> (-16.06%) ⬇️
pkg/compiler/debug.go 80.18% <96.00%> (+1.31%) ⬆️
pkg/compiler/codegen.go 89.86% <100.00%> (-2.08%) ⬇️
pkg/core/interop_system.go 64.58% <100.00%> (+6.83%) ⬆️
pkg/core/native/native_nep5.go 71.02% <100.00%> (ø)
pkg/core/native/policy.go 70.93% <100.00%> (ø)
... and 31 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 d2c823d...84c1485. Read the comment docs.

pkg/core/native/policy.go Show resolved Hide resolved
pkg/core/native/native_gas.go Outdated Show resolved Hide resolved
pkg/core/native/native_neo.go Outdated Show resolved Hide resolved
pkg/core/interop_system.go Show resolved Hide resolved
pkg/core/helper_test.go Show resolved Hide resolved
pkg/core/interop_system.go Show resolved Hide resolved
pkg/rpc/server/testdata/test_contract.go Outdated Show resolved Hide resolved
Generate proper manifest file too.
Exported functions should always be present in byte-code.
This will be needed later when arbitrary method calls are allowed.
Allow to invoke methods by offset:
1. Every invoked contract must have manifest.
2. Check arguments count on invocation.
3. Change AppCall to a regular syscall.
4. Add test suite for `System.Contract.Call`.
Do not require contract hash to be known at compile time.
Abstract out (*VM).Call method and use in in CALL* opcodes.
When calling contract it must be provided with a new stack containing
only it's arguments. The result is then copied back on RET.

Fix #1220.
Invoke `_initialize` method on every call if present.
In NEO3 there is no entrypoint and methods are invoked by offset,
thus `Main` function is no longer required.
We still have special `Main` method in tests to simplify them.
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.

Check popped context in RET opcode core: adjust System.Contract.Call* interops
2 participants