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

extracted max gas limit for vm query to config #4057

Merged
merged 4 commits into from
May 5, 2022

Conversation

bogdan-rosianu
Copy link
Contributor

extracted the maximum gas limit to be used for vm queries inside config.toml

@bogdan-rosianu bogdan-rosianu added the type:feature New feature or request label May 4, 2022
@bogdan-rosianu bogdan-rosianu self-assigned this May 4, 2022
AdoAdoAdo
AdoAdoAdo previously approved these changes May 4, 2022
sasurobert
sasurobert previously approved these changes May 4, 2022
require.True(t, runSCWasCalled)
})

t.Run("custom gas defined, should use max uint64", func(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

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

should not use

Copy link
Contributor Author

Choose a reason for hiding this comment

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

changed

@bogdan-rosianu bogdan-rosianu dismissed stale reviews from sasurobert and AdoAdoAdo via c6e7b03 May 4, 2022 09:42
AdoAdoAdo
AdoAdoAdo previously approved these changes May 4, 2022
@codecov
Copy link

codecov bot commented May 4, 2022

Codecov Report

Merging #4057 (706ba45) into master (668938b) will decrease coverage by 0.00%.
The diff coverage is 80.00%.

❗ Current head 706ba45 differs from pull request most recent head 5fdf992. Consider uploading reports for the commit 5fdf992 to get more accurate results

@@            Coverage Diff             @@
##           master    #4057      +/-   ##
==========================================
- Coverage   74.79%   74.79%   -0.01%     
==========================================
  Files         609      609              
  Lines       80935    80939       +4     
==========================================
+ Hits        60536    60537       +1     
- Misses      15764    15766       +2     
- Partials     4635     4636       +1     
Impacted Files Coverage Δ
factory/apiResolverFactory.go 0.00% <0.00%> (ø)
process/smartContract/scQueryService.go 87.50% <100.00%> (+0.29%) ⬆️
storage/txcache/txListBySenderMap.go 97.50% <0.00%> (-2.50%) ⬇️
p2p/libp2p/netMessenger.go 74.72% <0.00%> (-0.28%) ⬇️
process/block/baseProcess.go 69.01% <0.00%> (+0.18%) ⬆️

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 668938b...5fdf992. Read the comment docs.

gabi-vuls
gabi-vuls previously approved these changes May 4, 2022
Copy link
Collaborator

@gabi-vuls gabi-vuls left a comment

Choose a reason for hiding this comment

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

System test passed .
@@ Log scanner @@

max-gas-limit-vmquery-config-value

================================================================================

  • Known Warnings 10
  • New Warnings 2
  • Known Errors 0
  • New Errors 0
  • Panics 0
    ================================================================================

sasurobert
sasurobert previously approved these changes May 4, 2022
@@ -588,6 +588,9 @@
SameSourceRequests = 10000
# SameSourceResetIntervalInSec time frame between counter reset, in seconds
SameSourceResetIntervalInSec = 1
# MaxGasPerVmQuery defines the maximum amount of gas to be allocated for VM Queries comming from API
# If set to 0, then MaxUInt64 will be used
MaxGasPerVmQuery = 1500000000 #1.5b
Copy link
Contributor

Choose a reason for hiding this comment

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

This has nothing to do with the antiflood param. Please move it in the vm queries configs from api

Copy link
Contributor Author

Choose a reason for hiding this comment

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

moved

Copy link
Collaborator

@gabi-vuls gabi-vuls left a comment

Choose a reason for hiding this comment

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

System test passed.
Warnings are present before the upgrade.

@@ Log scanner @@

max-gas-limit-vmquery-config-value

================================================================================

  • Known Warnings 17
  • New Warnings 3
  • Known Errors 0
  • New Errors 0
  • Panics 0
    ================================================================================

@iulianpascalau iulianpascalau merged commit 4365190 into master May 5, 2022
@iulianpascalau iulianpascalau deleted the max-gas-limit-vmquery-config-value branch May 5, 2022 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants