-
Notifications
You must be signed in to change notification settings - Fork 140
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
Memory metering #1653
Merged
Merged
Memory metering #1653
Changes from all commits
Commits
Show all changes
405 commits
Select commit
Hold shift + click to select a range
a6907a9
Merge pull request #1509 from onflow/supun/memory-metering
SupunS 2506e30
Merge pull request #1507 from onflow/remove-memorykind-block
dsainati1 9277202
Bump onflow/atree from 0.2.0 to 0.3.0
fxamacker 2e995e2
Merge pull request #1510 from onflow/supun/bump-atree-version
SupunS 14c9211
Memory metering for small types (#1442)
robert-e-davidson3 b23d45b
Robert/metering small types 2 (#1512)
robert-e-davidson3 63338ca
Meter address value before creation, whenever possible
SupunS 6e9fd12
atree string value metering
dsainati1 465e251
fix lint
dsainati1 e0ed81d
Merge pull request #1513 from onflow/supun/mem-metering-refactor
SupunS 6a06a9e
add 1 to decoded string values
dsainati1 fc89125
Add memory metering for fixed-size numbers
SupunS 8b483dd
Add fized-size number metering tests
SupunS 7bdcb9b
Refactor tests
SupunS e8112c7
Fix ufix/fix metering when constructed as supertype (FixedPoint)
SupunS 22b6d5f
Refactor fix/ufix converters
SupunS 21c6daa
meter path ids as raw strings instead of strings
dsainati1 032cbfc
Merge branch 'feature/memory-metering' of github.com:onflow/cadence i…
dsainati1 1eca9ad
fix test
dsainati1 a1f3984
Check address length before decoding
SupunS b669fa3
Refactor fix64/ufix64 converters
SupunS ca330df
Merge pull request #1514 from onflow/atreestringvalue-metering
dsainati1 8010734
Merge branch 'feature/memory-metering' of https://github.com/onflow/c…
SupunS 6103342
Merge pull request #1522 from onflow/supun/mem-metering-refactor
SupunS 682e900
memory metering for variables
dsainati1 3e402d0
fix test
dsainati1 4faabfd
Apply suggestions from code review
dsainati1 72b4c0a
add more tests
dsainati1 5fdd0da
add constructors and memorykinds for locations
dsainati1 444e2ab
address location metering
dsainati1 ddbd291
meter string locations
dsainati1 780f535
refactor from code review
dsainati1 332dbd1
Merge pull request #1531 from onflow/variable-metering
dsainati1 3b90a53
Merge branch 'feature/memory-metering' of https://github.com/onflow/c…
SupunS 8e5492b
Merge pull request #1521 from onflow/supun/fixed-numbers-metering
SupunS fb9ce86
Meter results of logical operations on number values (#1526)
SupunS 1f4f06e
Meter tokens
SupunS 8e1ab15
Merge branch 'feature/memory-metering' of https://github.com/onflow/c…
SupunS fb39941
Refactor code
SupunS faf6fac
Fix tests
SupunS ca9d62c
Merge branch 'feature/memory-metering' of github.com:onflow/cadence i…
dsainati1 010f40c
update test
dsainati1 5d1f56e
fix compile
dsainati1 d6be34c
add test for stringlocation
dsainati1 48933a9
meter transaction and script locations in decoding
dsainati1 690e6bf
add test for address location
dsainati1 6ca43c7
fix lint
dsainati1 389807e
Merge pull request #1533 from onflow/supun/meter-tokens
SupunS f2790aa
Meter identifiers
SupunS b168423
Add identifier metering tests
SupunS 271d72b
Meter identifiers created in member resolvers
SupunS bc3936e
Generate memorykind stringer
SupunS c45ec30
Meter arguments
SupunS d3ead52
Meter blocks
SupunS c092219
Meter composite and interface declarations
SupunS 84ad3a0
Meter enum-cases and field declarations
SupunS d3f81fd
Meter function and transaction declarations
SupunS f0361a2
Meter import declarations
SupunS f19bd93
Meter variable declarations
SupunS 84357fb
Meter special funcs and pragma declarations
SupunS d7ac025
Fix event decl initializer
SupunS 79e6f2d
Add metering for assignment, return, break and continue statements
SupunS c8cee47
Meter For, If, Emit and Expression statements
SupunS 5ad5c3c
Meter while, swap and switch statements
SupunS 5579638
Merge branch 'feature/memory-metering' of github.com:onflow/cadence i…
dsainati1 8b09188
respond to review
dsainati1 6c64efb
Add AST statement metering tests
SupunS 8853dd4
Refactor code
SupunS 905c579
meter container types (arrays, dictionaries, composites) based on length
dsainati1 1b6ff67
use decodeAddressBytes
dsainati1 6e1c7d9
additionally meter append and insert operations on containers
dsainati1 afb5985
Merge pull request #1535 from onflow/location-metering
dsainati1 f30e47b
Merge branch 'feature/memory-metering' of github.com:onflow/cadence i…
dsainati1 e9a1dc4
Merge branch 'feature/memory-metering' of https://github.com/onflow/c…
SupunS 008bce0
Meter boolean, nil, and string expressions
SupunS efb8a90
Meter numeric expressions
SupunS 6ad568a
Meter array, dictionary and identifier expressions
SupunS b11e7da
Meter invocation, member, and index expressions
SupunS 978e83e
Add metering for unary, binary and consitional expressions
SupunS 96d2c4f
Add metering for remaining expressions
SupunS 015fc52
Add expression metering tests
SupunS 0ee28a7
Merge pull request #1536 from onflow/supun/meter-ast-v1
SupunS 6892ee0
Merge branch 'feature/memory-metering' of https://github.com/onflow/c…
SupunS 50e6214
Cleanup code
SupunS 577b035
Incoperate element size to array/dictionary expression metering
SupunS 74a84b7
Meter function block, parameters and parameters list
SupunS 952bd69
Meter program, members, and transfers
SupunS fb0b8df
Meter AST types
SupunS 3b673b6
Merge pull request #1541 from onflow/supun/meter-ast-v2
SupunS 04be939
Merge branch 'feature/memory-metering' of https://github.com/onflow/c…
SupunS 98d5e82
Merge pull request #1545 from onflow/supun/meter-ast-v3
SupunS 91eb714
Meter AST types
SupunS d7a7ef4
Merge branch 'feature/memory-metering' of https://github.com/onflow/c…
SupunS 44dc8f9
Merge pull request #1554 from onflow/supun/meter-ast-v4
SupunS c696f6d
Merge branch 'feature/memory-metering' of https://github.com/onflow/c…
SupunS 65001f0
Meter AST position
SupunS 0f890c3
Add position metering tests
SupunS 2e963b1
Merge branch 'supun/meter-ast-v5' of https://github.com/onflow/cadenc…
SupunS 667407c
Meter remaining position creations in parser
SupunS f78423b
Meter AST range
SupunS 8b56a33
change type signatures of functions to be more usable by the FVM
dsainati1 003010d
Merge branch 'feature/memory-metering' of github.com:onflow/cadence i…
dsainati1 df11999
separate container base and size memory kinds
dsainati1 486e028
fix lint
dsainati1 ece7569
Fix lint
SupunS 84d30e0
add memory kind last
dsainati1 eb9c106
Merge pull request #1555 from onflow/supun/meter-ast-v5
SupunS f0838f4
Merge branch 'feature/memory-metering' of https://github.com/onflow/c…
SupunS b8efa6a
Merge pull request #1558 from onflow/flow-go-compatibility
dsainati1 9c47f7a
Fix lint
SupunS 99072d3
Merge branch 'feature/memory-metering' of github.com:onflow/cadence i…
dsainati1 2145b20
Merge branch 'feature/memory-metering' of github.com:onflow/cadence i…
dsainati1 2fa93bf
respond to review
dsainati1 903b8c5
Merge pull request #1560 from onflow/memory-kind-last
dsainati1 5d96c72
Merge branch 'feature/memory-metering' of github.com:onflow/cadence i…
dsainati1 3b3da2a
Meter dictionary entries
SupunS d1c8541
Merge pull request #1546 from onflow/container-length-metering
dsainati1 e660906
Merge branch 'master' into bastian/master-into-memory-metering
turbolent bb2dd6d
Merge pull request #1574 from onflow/bastian/master-into-memory-metering
turbolent 309ae7c
Merge branch 'feature/memory-metering' of https://github.com/onflow/c…
SupunS 41d7891
Merge pull request #1556 from onflow/supun/meter-ast-v6
SupunS d77e472
Merge branch 'feature/memory-metering' of https://github.com/onflow/c…
SupunS ac9d910
Improve token metering
SupunS 3d163d6
dictionary and array length metering should now be based on both how …
dsainati1 9cd2204
use logs to compute size change
dsainati1 3954ad0
Merge branch 'master' into bastian/master-into-memory-metering-2
turbolent 89f7936
meter BigNumberValue.ToBigInt
turbolent b116d4c
Update runtime/common/metering.go
dsainati1 9b58e62
fix lint
dsainati1 a21d2ac
fix test
turbolent 8513e4a
Merge pull request #1579 from onflow/variable-length-container-metering
dsainati1 58a3481
Merge pull request #1532 from onflow/bastian/improve-big-int-metering
turbolent 8cefe07
Merge pull request #1559 from onflow/supun/meter-ast-v7
SupunS cef02db
Merge branch 'feature/memory-metering' of https://github.com/onflow/c…
SupunS 8cda3e6
Merge pull request #1564 from onflow/supun/meter-ast-v8
SupunS f0c934e
Merge branch 'feature/memory-metering' of https://github.com/onflow/c…
SupunS 859a582
Merge pull request #1575 from onflow/supun/token-metering
SupunS 2f9c66f
refactor log computation
dsainati1 a629d6e
add metering for elaborations
dsainati1 2e9742b
Merge branch 'feature/memory-metering' of github.com:onflow/cadence i…
dsainati1 de4b76b
properly include gauge in new checker
dsainati1 c8eaa32
add test for deploying and importing multiple contracts
dsainati1 c698592
fix contract deployement and imports
turbolent 0a0d731
fix test expectations
dsainati1 2000da7
fix test
dsainati1 63656ca
fix test
dsainati1 5111926
fix memory race
dsainati1 769685e
Merge pull request #1580 from onflow/bastian/master-into-memory-meter…
turbolent 9347dfe
Merge branch 'master' into bastian/master-into-memory-metering-3
turbolent bd50a44
Merge branch 'feature/memory-metering' of github.com:onflow/cadence i…
dsainati1 2b47860
Memory metering for primitive StaticType (#1538)
robert-e-davidson3 c961663
adjust formulas for calculating memory usage of arithmetic operations…
turbolent f7f1e58
Merge pull request #1588 from onflow/bastian/master-into-memory-meter…
turbolent 268a3fe
Meter memory for more static types (#1563)
robert-e-davidson3 d5202c1
Meter the rest of the static types (#1567)
robert-e-davidson3 9781d73
Merge branch 'feature/memory-metering' of github.com:onflow/cadence i…
dsainati1 eff676a
Merge branch 'feature/memory-metering' of github.com:onflow/cadence i…
dsainati1 1e5fd93
meter arrays on update, and add tests
dsainati1 601d262
fix formatting
dsainati1 f601547
fix test
dsainati1 c094707
fix and comment formulas
turbolent be06794
fix tests
turbolent eab1954
Merge pull request #1590 from onflow/bastian/adjust-big-int-memory-me…
turbolent 9d390c5
Do not double count memory for primitive (#1593)
robert-e-davidson3 6b4e106
Merge branch 'master' of https://github.com/onflow/cadence into supun…
SupunS 8c7443e
Update memory metering tests
SupunS 3ce13a0
Merge pull request #1584 from onflow/elaboration-metering
dsainati1 852eb02
Merge pull request #1595 from onflow/supun/memory-metering-sync-master
SupunS 86d0f44
compute atree data and metadata slabs distinctly
dsainati1 2fd24ab
add elementSizes to static types
dsainati1 f1f3f78
update tests
dsainati1 f49273c
Merge branch 'feature/memory-metering' of github.com:onflow/cadence i…
dsainati1 bc70524
use ceiling of count to compute leaf nodes
dsainati1 5ba7ff3
revert "Remove addPublicKey and removePublicKey" (#1604)
robert-e-davidson3 371b92d
add new memory kind for simple composites, and use it instead of Comp…
dsainati1 467a9d1
Merge branch 'improve-container-length' of github.com:onflow/cadence …
dsainati1 d27f592
split slab kinds into separate kinds for array and map
dsainati1 3fa8d8c
Update runtime/common/metering.go
dsainati1 5025bbf
Merge branch 'improve-container-length' of github.com:onflow/cadence …
dsainati1 5c9362b
fix imprecise sizes in elementSize
dsainati1 03c0110
cache elementSize in dictionary and array values
dsainati1 ea4ace0
no additional metering on array update
dsainati1 75879bd
Merge branch 'feature/memory-metering' of github.com:onflow/cadence i…
dsainati1 678ed02
respond to review
dsainati1 e3a7f3b
Merge branch 'improve-container-length' of github.com:onflow/cadence …
dsainati1 d905826
fix test
dsainati1 3edb81a
Merge branch 'improve-container-length' of github.com:onflow/cadence …
dsainati1 b168562
don't remeter elements less than the maximum historical size of a tree
dsainati1 455af0d
Revert "don't remeter elements less than the maximum historical size …
dsainati1 083476a
use 20-ary branching factor to compute branch nodes for atree
dsainati1 adb04ef
Merge pull request #1605 from onflow/simple-composite-metering
dsainati1 5042298
Meter variable activation
SupunS af6619c
add overhead memory kind
dsainati1 8f4ab1f
Add activation metering tests
SupunS d3503c4
Update generated code
SupunS 2e7bcca
meter atree before actually allocating
dsainati1 8da341b
fix lint
dsainati1 381727f
Update runtime/tests/interpreter/memory_metering_test.go
dsainati1 32241f6
Apply suggestions from code review
dsainati1 3e406a9
add clarifying comment
dsainati1 ad2f6fd
add cbor tag size to elements
dsainati1 096bfde
Merge pull request #1591 from onflow/improve-container-length
dsainati1 fcb2ec6
Improve comment
SupunS a6b1144
Merge branch 'feature/memory-metering' of https://github.com/onflow/c…
SupunS 220288a
Merge pull request #1616 from onflow/supun/activation-metering
SupunS c30dd4c
Meter atree map's pre-allocated element memory
SupunS c6e9ad6
Add element overhead to atree metering
SupunS 4b1ed09
Adjust tests
SupunS c554731
Meter static type to sema type conversion
SupunS 95267aa
Meter restrictions set of restricted semaType
SupunS 78e4900
Meter typeID generation
SupunS 81d994b
Meter location ID generation
SupunS 4192fab
Merge pull request #1624 from onflow/supun/improve-array-metering
SupunS 2bc2f13
Update the dictionary pre-allocated elements formula
SupunS c4b65ed
Merge branch 'feature/memory-metering' of https://github.com/onflow/c…
SupunS 72ccb84
Fix test
SupunS f5324b1
Merge branch 'feature/memory-metering' of https://github.com/onflow/c…
SupunS 37cac8e
Add static type to sematype conversion tests
SupunS ca61392
Merge branch 'feature/memory-metering' of https://github.com/onflow/c…
SupunS 6c582ba
Merge pull request #1623 from onflow/supun/improve-composite-metering
SupunS 76539aa
meter cadence.Value string. languageserver fails
7cb1f67
lint
4b35426
Merge branch 'feature/memory-metering' of https://github.com/onflow/c…
SupunS 522ea92
Merge branch 'feature/memory-metering' of https://github.com/onflow/c…
SupunS a16a826
Merge branch 'master' of https://github.com/onflow/cadence into supun…
SupunS 33cd9e0
Merge pull request #1632 from onflow/supun/memory-metering-sync-master
SupunS 9c7913f
cadence.Value.Type method back to original param list; add MeteredTyp…
8c3c249
wip
24d36f1
revert NewU?Fix functions; lint
2ae7d1c
adjust big int metering minor errors
756fba6
Merge branch 'master' of https://github.com/onflow/cadence into supun…
SupunS 7708076
Fix test
SupunS 9a1afbe
Merge pull request #1637 from onflow/supun/mermory-metering-sync-master
j1010001 85911e3
Merge pull request #1635 from onflow/tarak/minor-big-int-fixes
tarakby b95fe8d
Merge pull request #1631 from onflow/supun/sematype-conversion-metering
SupunS 5f352ad
Merge branch 'master' into bastian/merge-master
turbolent 01565ef
Merge branch 'master' into bastian/merge-master
turbolent 5f7141d
fix merge
turbolent 86986a4
Meter composite typeinfo
SupunS 1186612
Merge pull request #1646 from onflow/bastian/merge-master
turbolent 0ecebfb
Meter composite field
SupunS fd6d376
Meter invocation
SupunS 2eaeb43
Metere storage map
SupunS 30f82e4
Meter storage key
SupunS a2207b8
Merge branch 'feature/memory-metering' of https://github.com/onflow/c…
SupunS 98ed308
Refactor
SupunS 808fe14
Merge pull request #1647 from onflow/supun/improve-metering
SupunS fcded44
Merge branch 'master' of github.com:onflow/cadence into merge-master-…
dsainati1 41927f8
Merge pull request #1648 from onflow/merge-master-metering
dsainati1 08b93d4
Merge pull request #1626 from onflow/supun/meter-id-generation
turbolent File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this supposed to include the public key API changes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR just reverts the removal of the deprecated functions. This documentation should have been added back to master already before, but it seems like it wasn't