-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[pallet-revive] implement the block author API #7198
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
Merged
Merged
Changes from all commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
2c8637a
the block_author API
xermicus 31217da
the benchmark
xermicus 19d5074
the runtime API method
xermicus acea813
Merge branch 'master' into cl/coinbase
xermicus 9f2e141
Update from xermicus running command 'prdoc --audience runtime_dev --…
a8e1021
the westend asset hub runtime configuration
xermicus 39a1d7c
Update from xermicus running command 'bench --runtime dev --pallet pa…
c3fd4d5
the kitchensink runtime configuration
xermicus e886ae3
Merge branch 'master' into cl/coinbase
xermicus 7542ba6
Update from xermicus running command 'bench --runtime dev --pallet pa…
8a8b0e9
populate digest
xermicus 0082fd3
Update prdoc/pr_7198.prdoc
xermicus 81a3c65
Update from xermicus running command 'bench --runtime dev --pallet pa…
470530f
fix benchmark
xermicus cd90457
Merge branch 'master' into cl/coinbase
xermicus 244a2fd
the runtime benchmark dependencies
xermicus 11f66ea
Update from xermicus running command 'fmt'
github-actions[bot] f745027
Update from xermicus running command 'bench --runtime dev --pallet pa…
github-actions[bot] 21b4c70
cleanup
xermicus 1592bc7
the std feature propagation
xermicus d131571
the Cargo.toml dependency alphanumeric sort order
xermicus 9bd6a77
typo
xermicus 6ee6664
Merge branch 'master' into cl/coinbase
xermicus 76d5a50
reset weights.rs
xermicus b62c08d
Merge branch 'master' into cl/coinbase
xermicus 1d5f4f4
the TestDefaultConfig configuration
xermicus f3f35f0
Merge branch 'master' into cl/coinbase
xermicus d4b562e
testdefaultconfig
xermicus f0f18c9
Merge branch 'master' into cl/coinbase
xermicus c3fb6c4
Merge branch 'master' into cl/coinbase
xermicus a17e58e
do not expect a block author in the benchmark
xermicus ea58762
Merge branch 'master' into cl/coinbase
xermicus bd6a010
Update from xermicus running command 'bench-omni --runtime dev --pall…
github-actions[bot] 4ee43c5
run the benchmark after genesis block
xermicus fa75fa2
fix the tests after updated weights
xermicus bf6b04b
Merge branch 'master' into cl/coinbase
xermicus 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
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| title: '[pallet-revive] implement the block author API ' | ||
| doc: | ||
| - audience: Runtime Dev | ||
| description: This PR implements the block author API method. Runtimes ought to implement | ||
| it such that it corresponds to the `coinbase` EVM opcode. | ||
| crates: | ||
| - name: pallet-revive | ||
| bump: major | ||
| - name: pallet-revive-fixtures | ||
| bump: minor | ||
| - name: pallet-revive-uapi | ||
| bump: minor |
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| // This file is part of Substrate. | ||
|
|
||
| // Copyright (C) Parity Technologies (UK) Ltd. | ||
| // SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| // Licensed under the Apache License, Version 2.0 (the "License"); | ||
| // you may not use this file except in compliance with the License. | ||
| // You may obtain a copy of the License at | ||
| // | ||
| // http://www.apache.org/licenses/LICENSE-2.0 | ||
| // | ||
| // Unless required by applicable law or agreed to in writing, software | ||
| // distributed under the License is distributed on an "AS IS" BASIS, | ||
| // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| // See the License for the specific language governing permissions and | ||
| // limitations under the License. | ||
|
|
||
| #![no_std] | ||
| #![no_main] | ||
|
|
||
| use common::input; | ||
| use uapi::{HostFn, HostFnImpl as api}; | ||
|
|
||
| #[no_mangle] | ||
| #[polkavm_derive::polkavm_export] | ||
| pub extern "C" fn deploy() {} | ||
|
|
||
| #[no_mangle] | ||
| #[polkavm_derive::polkavm_export] | ||
| pub extern "C" fn call() { | ||
| input!(expected: &[u8; 20],); | ||
|
|
||
| let mut received = [0; 20]; | ||
| api::block_author(&mut received); | ||
|
|
||
| assert_eq!(expected, &received); | ||
| } |
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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.
Uh oh!
There was an error while loading. Please reload this page.