This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
contracts: Make Origin information available #13708
Merged
Merged
Changes from 65 commits
Commits
Show all changes
70 commits
Select commit
Hold shift + click to select a range
7fe7728
contracts: allow root calls
juangirini 8fda4a6
contracts: update ContractOrigin
juangirini f52ba84
contracts: test allow root calls
juangirini 3705212
contracts: rustfmt
juangirini 92a2322
contracts: resolve merge conflicts
juangirini e25d27b
contracts: test root caller traps
juangirini 04f0b31
contracts: add Caller enum
juangirini b3a1ac7
contracts: improve some comments
juangirini 0fc1c1d
contracts: improve some comments
juangirini e4aeec9
contracts: format code with +nightly
juangirini 197efe9
Merge branch 'master' into jg/make-origin-available
juangirini f31b50d
contracts: fix failing tests
juangirini 2936439
contracts: improve charte instantiate call when root origin
juangirini aa91b3b
contract: refactor common, call and instantiate inputs
juangirini 99bfe7c
contracts: fix some failing test
juangirini 4566e2c
contracts: trap caller when there is no account id
juangirini 79317cb
Merge remote-tracking branch 'origin/master' into jg/make-origin-avai…
ed9550e
Update frame/contracts/src/lib.rs
juangirini 1421819
Update frame/contracts/src/exec.rs
juangirini 8fb4971
contracts: make `into_deposit` return zero when the origin is root
juangirini d954a09
Merge branch 'master' into jg/make-origin-available
juangirini 0eaaebd
contracts: cargo fmt
juangirini 05f00ac
contracts: charging and terminating tests refactored
juangirini 7a8a058
contracts: merge master
juangirini 2e16ef8
contracts: improved errors
juangirini 308b2ff
contracts: refactor & merge ContractOrigin cand Caller enums
juangirini 7b9979c
Merge remote-tracking branch 'origin/master' into jg/make-origin-avai…
da14bd0
Update frame/contracts/src/lib.rs
juangirini d36d70e
contracts: apply suggested pr changes
juangirini 9f85d5f
contracts: merge master and resolve conflicts
juangirini bf55a33
contracts: rename Caller to Origin
juangirini 5208f67
contracts: refactor run fn
juangirini e3e1a48
contracts: cr improvements
juangirini d756cf1
contracts: resolve master conflicts
juangirini 6158374
contracts: allow root to use delegate call
juangirini 86c38ab
contracts: add caller_is_root weight
juangirini baeb20e
".git/.scripts/commands/bench/bench.sh" pallet dev pallet_contracts
33531bf
contracts: add caller_is_root benchmarking
juangirini 2e746b7
Merge branch 'master' of https://github.com/paritytech/substrate into…
e615c54
".git/.scripts/commands/bench/bench.sh" pallet dev pallet_contracts
54540dd
contracts: add caller_is_root benchmarking
juangirini 837cb64
Merge branch 'master' of https://github.com/paritytech/substrate into…
f7bd9fe
".git/.scripts/commands/bench/bench.sh" pallet dev pallet_contracts
d03987d
contracts: add some minor improvements
juangirini af14ee6
contracts: make caller_is_root runtime fn unstable
juangirini e656220
Merge branch 'master' into jg/make-origin-available
juangirini c6cd8d9
contracts: fix failing wasm test
juangirini 2357c5c
contracts: update benchmarking for origin_is_root
juangirini 99a42b1
contracts: improve seal_caller_is_root benchmarking
juangirini 3165558
Merge branch 'master' of https://github.com/paritytech/substrate into…
5dc6092
".git/.scripts/commands/bench/bench.sh" pallet dev pallet_contracts
1b85d3a
contracts: add small pr improvements
juangirini 6865b75
Merge remote-tracking branch 'origin/master' into jg/make-origin-avai…
juangirini f224bfc
contracts: fix merge conflicts
juangirini 086fa30
Merge remote-tracking branch 'origin/master' into jg/make-origin-avai…
juangirini 87d42b9
contracts: fix broken tests after master merge
juangirini e8f4af2
contracts: acknowledge the default storage deposit limit
juangirini aecd9f7
".git/.scripts/commands/bench/bench.sh" pallet dev pallet_contracts
80b103f
contracts: move origin to CommonInput
juangirini 28fba03
contracts: add some extra tests
juangirini 0630f4a
contracts: move ensure origin logic inside invokable::run_guarded
juangirini 0d36126
contracts: add minor improvements
juangirini 5dc9796
contracts: merge master and fix conflicts
juangirini 25235f6
contracts: fix caller_is_root benchmarking
juangirini a2e76f7
contracts: improve function description
juangirini 32de518
Update frame/contracts/src/lib.rs
juangirini da9d6d8
Update frame/contracts/src/lib.rs
juangirini 225c8d4
Update frame/contracts/src/wasm/runtime.rs
juangirini b3c8445
contracts: improve function description
juangirini fe39e1f
Merge remote-tracking branch 'origin/master' into jg/make-origin-avai…
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.
@athei @agryaznov I am not too familiarised with benchmarking, so not sure if this is the right approach. This is pretty much a copy-pasta from
seal_caller_is_origin
with a few adaptationsThere 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 can be simplified by using
WasmModule::getter
. Look at theseal_address
benchmark.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.
I tried to use
WasmModule::getter
but it wouldn't work as thegetter
function would requires that "The imported function is expected to have the "getter signature" of (out_ptr: u32, len_ptr: u32) -> ()."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.
Yes you are right. Getters copy to memory not return on stack. Forgot about that. So you need to roll this back.