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

Check manifest permissions at compile-time #2025

Merged
merged 3 commits into from
Jun 28, 2021
Merged

Conversation

fyrchik
Copy link
Contributor

@fyrchik fyrchik commented Jun 25, 2021

Do our best.

Close #2022.

@codecov
Copy link

codecov bot commented Jun 25, 2021

Codecov Report

Merging #2025 (0c1c88b) into master (16a8eda) will increase coverage by 0.00%.
The diff coverage is 94.20%.

❗ Current head 0c1c88b differs from pull request most recent head d019c0f. Consider uploading reports for the commit d019c0f to get more accurate results
Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2025   +/-   ##
=======================================
  Coverage   83.14%   83.15%           
=======================================
  Files         287      287           
  Lines       23250    23295   +45     
=======================================
+ Hits        19331    19370   +39     
- Misses       2719     2723    +4     
- Partials     1200     1202    +2     
Impacted Files Coverage Δ
pkg/compiler/inline.go 96.72% <91.48%> (-3.28%) ⬇️
cli/smartcontract/smart_contract.go 87.47% <100.00%> (+0.09%) ⬆️
pkg/compiler/codegen.go 92.70% <100.00%> (+<0.01%) ⬆️
pkg/compiler/compiler.go 71.11% <100.00%> (+2.81%) ⬆️
pkg/compiler/debug.go 92.95% <100.00%> (+0.03%) ⬆️
pkg/services/oracle/request.go 46.89% <0.00%> (-1.38%) ⬇️

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 16a8eda...d019c0f. Read the comment docs.

pkg/compiler/inline.go Outdated Show resolved Hide resolved
pkg/compiler/compiler_test.go Show resolved Hide resolved
fyrchik added 3 commits June 28, 2021 11:49
On many occassions we can determine at compile-time if contract config lacks
some properties it needs. This includes all native contract invocations
through stdlib, as both hashes and methods are known at compile-time
there.

Signed-off-by: Evgeniy Stratonikov <[email protected]>
If a method is known at compile time we can still check
if it is present in the list of methods of at least one contract.

Signed-off-by: Evgeniy Stratonikov <[email protected]>
For `nft-nd-nns` example only `namestate.go` file was compiled which is
certainly not what we want.

Signed-off-by: Evgeniy Stratonikov <[email protected]>
@roman-khimov roman-khimov merged commit eecb952 into master Jun 28, 2021
@roman-khimov roman-khimov deleted the compiler-check-calls branch June 28, 2021 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler Go smart contract compiler
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Check permissions of native contract calls at compile time
3 participants