-
Notifications
You must be signed in to change notification settings - Fork 746
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
Append overlay optimization. #1223
Merged
Merged
Changes from 49 commits
Commits
Show all changes
59 commits
Select commit
Hold shift + click to select a range
0466d8c
append overlay optimization.
cheme 341987f
Merge branch 'master' into append
cheme ac2b72c
update lock
cheme 1fdd3c6
no more companion
cheme c94dde4
clippy
cheme a022d9b
fmt
cheme d8f21a0
Merge branch 'master' into append
cheme e261624
license
cheme 31eebd3
Merge branch 'master' into append
cheme 0c9aedc
lock update
cheme 5c44ad3
trying prdoc
cheme 9541b33
mut
cheme 70b94cc
mut
cheme b28527f
fuzzing in its own file.
cheme bd3c28e
trying to return error
cheme 7b9face
Revert "trying to return error" not too sure about this direction
cheme 3bdd2f0
minor enhance
cheme 066a8c2
fix
cheme 0fba977
fix
cheme a105d3d
code change from review
cheme 94c262c
renamings and comment
cheme eaf89f4
Merge branch 'master' into append
cheme c0e2da7
update lock
cheme e8f5a21
test of restore lower append size.
cheme 3fe1c9f
Bump node version to 1.11.0 in polkadot-cli
EgorPopelyaev 168bccb
Bump crate versions in: cumulus/polkadot-parachain/Cargo.toml
EgorPopelyaev a85bdb5
Bump spec_version
EgorPopelyaev 0d65b3f
Move prdocs to the release folder
EgorPopelyaev 082e23e
Update Cargo.lock
EgorPopelyaev 49b27c7
add environment var to the matrix job
EgorPopelyaev 0bb6249
Bump transaction_version
EgorPopelyaev 9b12bab
Litep2p version 0.5.0 backport to 1.11.0 (#4605)
lexnv 9db7629
`CheckMetadataHash` extension backport to 1.11.0 (#4584)
bkchr 320cea6
Add omni bencher & chain-spec-builder bins to release (#4557)
EgorPopelyaev fc127b7
fix the release draft flow
EgorPopelyaev 503aee6
Merge remote-tracking branch 'origin/release-polkadot-v1.11.0' into a…
bkchr 310efa0
Fixes
bkchr 8d2256f
Merge remote-tracking branch 'origin/master' into append
bkchr df03d26
Fixes
bkchr 36bf1dc
Fixes
bkchr d45a374
Fixes
bkchr 4305573
Some optimizations
bkchr 03432c3
Try some stuff
bkchr 5d9386a
Some small fixes
bkchr 9287edd
Improve docs and naming
bkchr 7ddc302
More renamings
bkchr 11ff0c7
Docs
bkchr 711bb1c
Remove the warning
bkchr d03e9e5
Fixes
bkchr 4a84215
FMT
bkchr 5505a0f
Fix
bkchr 4f968fb
PRDOC
bkchr 58013c9
Merge remote-tracking branch 'origin/master' into append
bkchr 6fdfec0
Add test and comment about append merge on commit
skunert adc8c83
Update substrate/primitives/state-machine/src/fuzzing.rs
bkchr 4561991
Update substrate/primitives/state-machine/src/overlayed_changes/chang…
bkchr 078e116
Merge branch 'master' into append
bkchr 318dc62
Update substrate/primitives/state-machine/src/overlayed_changes/chang…
bkchr 18513b3
Update substrate/primitives/state-machine/src/overlayed_changes/chang…
bkchr 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Schema: Polkadot SDK PRDoc Schema (prdoc) v1.0.0 | ||
# See doc at https://raw.githubusercontent.com/paritytech/polkadot-sdk/master/prdoc/schema_user.json | ||
|
||
title: Append overlay optimization. | ||
|
||
author: cheme | ||
doc: | ||
- audience: Node Dev | ||
description: | | ||
Optimize change overlay to avoid cloning full value when appending | ||
content to a change. | ||
Different append operation can be stored in the overlay. | ||
Only when reading the appending value do we need to merge these operation. | ||
For value with append only operation, this makes it possible to avoid any | ||
major cost related to transaction (before this pr the full value was cloned | ||
on every append in a new transaction). | ||
|
||
crates: | ||
- name: sp-state-machine |
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
[package] | ||
name = "sp-state-machine-fuzz" | ||
version = "0.0.0" | ||
publish = false | ||
license = "Apache-2.0" | ||
edition = "2021" | ||
|
||
[package.metadata] | ||
cargo-fuzz = true | ||
|
||
[dependencies] | ||
libfuzzer-sys = "0.4" | ||
sp-runtime = { path = "../../runtime" } | ||
|
||
[dependencies.sp-state-machine] | ||
path = ".." | ||
features = ["fuzzing"] | ||
|
||
# Prevent this from interfering with workspaces | ||
[workspace] | ||
members = ["."] | ||
|
||
[profile.release] | ||
debug = 1 | ||
|
||
[[bin]] | ||
name = "fuzz_append" | ||
path = "fuzz_targets/fuzz_append.rs" | ||
test = false | ||
doc = false |
26 changes: 26 additions & 0 deletions
26
substrate/primitives/state-machine/fuzz/fuzz_targets/fuzz_append.rs
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// 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_main] | ||
|
||
use libfuzzer_sys::fuzz_target; | ||
use sp_state_machine::fuzzing::{fuzz_append, FuzzAppendPayload}; | ||
use sp_runtime::traits::BlakeTwo256; | ||
|
||
fuzz_target!(|data: FuzzAppendPayload| { | ||
fuzz_append::<BlakeTwo256>(data); | ||
}); |
Oops, something went wrong.
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.
How does it interfere with it? Do we not want to run it from the top level?