forked from paritytech/polkadot-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Chainsafe/axay/speculative availability #6
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
Draft
timwu20
wants to merge
245
commits into
tim/axay-base
Choose a base branch
from
chainsafe/axay/speculative-availability
base: tim/axay-base
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
…e_operator --bump minor'
Before this change we did not care about parachain slots in manual-seal mode, because para slots that are smaller than their relay parents where allowed. I have changes planned that change this, so the manual-seal needs to be parameterized closer to reality. In this PR I use the `AuraConsensusDataprovider` to read the inherent timestamp provided and emit a corresponding slot digest. I also removed the `DynNodeSpecExt` and added manual seal methods directly to the `NodeSpec` trait. The assumption before was that the manual seal mode can work independently of consensus information. But this no longer holds true, as we need the proper `AuraId` and runtime APIs attached for example. This was the fastest and simplest way to get this working, and we currently only support `AuraNode` anyway. closes paritytech#7453 Prerequisite for mergine paritytech#9712, as the old way we did things now causes errors. --------- Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…tech#9936) PeerIds of some new invulnerable AH collators on Kusama and Polkadot.
# Description This PR bumps the commit hash of the revive-differential-tests framework to a version that contains a fix for the `CodeNotFound` issue we've been seeing with PolkaVM. The framework now uploads the code of all the contracts prior to running the tests. When CI runs for this PR we should observe that there's either no more `CodeNotFound` errors in PolkaVM tests or that it's greatly reduced. --------- Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
# Description Small PR that changes the DT CI to not require a PR for uploading the report to the CI job. --------- Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…X.XX.X (paritytech#10351) The PR adds a flow that will create a tag in the format polkadot-vX.XX.X automatically when `polkadot` release is published. (This action was done manually before) closes: paritytech/release-engineering#266
# Description Based on michalkucharczyk/tx-test-tool#43. ## Integration N/A ## Review Notes - added tests with future mortal txs that are dropped due to not being included in blocks within their lifetime, but also future mortal txs that have a sufficient lifetime to be included in blocks - added test which uses priorities to delay mortal txs inclusion and make them invalid --------- Signed-off-by: Iulian Barbu <[email protected]> Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Sebastian Kunert <[email protected]>
…) (paritytech#10256) Documents how to render weight files with frame-omni-bencher using:\n\n- --output (directory or file)\n- --header for a custom header\n- --template for a custom Handlebars template\n\nThis leverages existing frame_benchmarking_cli functionality exposed via omni-bencher.\n\n Co-authored-by: lone <[email protected]> Co-authored-by: Oliver Tale-Yazdi <[email protected]>
…paritytech#9685) litep2p v0.12.0 adds ability to track whether publishing a DHT record or provider was successful. This PR brings this functionality to substrate. Particularly, this fixes authority-discovery unnecessarily republishing DHT records due to litep2p not emitting `KademliaEvent::PutRecordSuccess` before v0.12.0. --------- Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…paritytech#10154) This PR adjusts the block authoring to stop producing blocks 1 second before the scheduled slot change. This introduces a safety buffer to prevent blocks from being authored too late for inclusion. - 2s blocks / 3 cores: The authoring duration of the last block is reduced from 2s to 1s. - 500ms blocks / 12 cores: The authoring duration cannot be reduced past 500ms, therefore the last two blocks are no longer authored ### Testing Done Tested on top of: - paritytech#9880 ### 3 cores 2s blocks ``` aura::cumulus: [Parachain] Adjusting authoring duration for slot. authoring_duration=2s duration=1.987s last_reported_slot=Some(Slot(293723040)) next_slot=Slot(293723040) next_duration_change=5.987s next_slot_change=Slot(293723041) aura::cumulus: [Parachain] Adjusted proposal duration. duration=Some(1.987s) aura::cumulus: [Parachain] Adjusting authoring duration for slot. authoring_duration=2s duration=1.991s last_reported_slot=Some(Slot(293723040)) next_slot=Slot(293723040) next_duration_change=3.991s next_slot_change=Slot(293723041) aura::cumulus: [Parachain] Adjusted proposal duration. duration=Some(1.991s) aura::cumulus: [Parachain] Adjusting authoring duration for slot. authoring_duration=2s duration=1.99s last_reported_slot=Some(Slot(293723040)) next_slot=Slot(293723041) next_duration_change=1.99s next_slot_change=Slot(293723041) aura::cumulus: [Parachain] Adjusted proposal duration. duration=Some(990ms) ``` ### 12 cores 500ms blocks ``` aura::cumulus: [Parachain] Adjusting authoring duration for slot. authoring_duration=2s duration=494ms last_reported_slot=Some(Slot(293724134)) next_slot=Slot(293724134) next_duration_change=1.494s next_slot_change=Slot(293724135) deadline=494ms aura::cumulus: [Parachain] Adjusted proposal duration. duration=Some(494ms) aura::cumulus: [Parachain] Adjusting authoring duration for slot. authoring_duration=2s duration=493ms last_reported_slot=Some(Slot(293724134)) next_slot=Slot(293724134) next_duration_change=993ms next_slot_change=Slot(293724135) deadline=0ns aura::cumulus: [Parachain] Not enough time left in the slot to adjust authoring duration. Skipping block production for the slot. next_duration_change=993ms next_slot_change=Slot(293724135) aura::cumulus: [Parachain] Adjusted proposal duration. duration=None aura::cumulus: [Parachain] Not building block due to insufficient authoring duration aura::cumulus: [Parachain] Adjusting authoring duration for slot. authoring_duration=2s duration=494ms last_reported_slot=Some(Slot(293724136)) next_slot=Slot(293724137) next_duration_change=494ms next_slot_change=Slot(293724137) deadline=0ns aura::cumulus: [Parachain] Not enough time left in the slot to adjust authoring duration. Skipping block production for the slot. next_duration_change=494ms next_slot_change=Slot(293724137) aura::cumulus: [Parachain] Adjusted proposal duration. duration=None aura::cumulus: [Parachain] Not building block due to insufficient authoring duration ``` Part of: paritytech#9848 --------- Signed-off-by: Alexandru Vasile <[email protected]> Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: eduardspa <[email protected]> Co-authored-by: Sebastian Kunert <[email protected]> Co-authored-by: Andrei Sandu <[email protected]>
paritytech/release-engineering#265 --------- Co-authored-by: Egor_P <[email protected]>
Recent compiler versions complain about this deprecated annotation being
useless:
```
error: `#[deprecated]` attribute cannot be used on function params
--> /home/sebastian/work/repos/polkadot-sdk/substrate/frame/executive/src/lib.rs:208:2
|
208 | / #[deprecated(
209 | | note = "`OnRuntimeUpgrade` parameter in Executive is deprecated, will be removed after September 2026. \
210 | | Use type `SingleBlockMigrations` in frame_system::Config instead."
211 | | )] OnRuntimeUpgrade = (),
| |______^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= help: `#[deprecated]` can be applied to functions, data types, modules, unions, constants, statics, macro defs, type aliases, use statements, foreign statics, struct fields, traits, associated types, associated consts, enum variants, inherent impl blocks, and crates
= note: `#[deny(useless_deprecated)]` on by default
```
So lets remove it. The deprecated warning is also present in the doc
comment above.
---------
Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Add tracing for selfdestruct --------- Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: PG Herveou <[email protected]>
Add a benchmark for the EVM CREATE instruction. We are currently reusing the `seal_instantiate` benchmark from PVM instantiation, which is incorrect because instantiating an EVM contract takes different arguments and follows a different code path than creating a PVM contract. This benchmark performs the following steps: - Generates init bytecode of size i, optionally including a balance with dust. - Executes the init code that triggers a single benchmark opcode returning a runtime code of the maximum allowed size (qrevm::primitives::eip170::MAX_CODE_SIZE`). Also fix the order of the weight function arguments, they were wrong causing the weight to be much bigger that what it should be --------- Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Benchmark opcode was using the invalid opcode instead of defining a new one. --------- Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Fixes [9119](paritytech#9119) The threshold mechanism used by the "election-provider-multi-block" verifier pallet is no longer relevant because there is no more queued solution to compare against during the initial verification and subseuquently, solutions are processed in the order of decreasing score, with the first one being chosen in all cases. --------- Signed-off-by: Andrei Trandafir <[email protected]> Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This change ensures that all types that implement `RuntimeDebug` are fully displayed in log output of the revive dev node, instead of just showing `<wasm:stripped>`. Unfortunately, the trait `RuntimeDebugNoBound`, that we also use frequently in pallet-revive, is not affected and will still output `<wasm:stripped>` (it does not check for the `force-debug` feature flag, instead it only fully outputs values when either one of the features `std` or `try_runtime` is enabled – this is something we implement as a general change). --------- Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: pgherveou <[email protected]>
…s` (paritytech#10362) While triaging the Versi-net, I've discovered that the connection between collators and validators sometimes takes less than 20ms, while at other times it takes more than 500ms. In both cases, the validators are already connected to a different protocol. Therefore, opening and negotiating substreams must be almost instant. The slot timer of the peerset artificially introduces the delay: - The `SetReservedPeers` is received by the peerset. At this step, the peerset propagated the `closedSubstream` to signal that it wants to disconnect previously reserved peers. - At the next slot allocation timer tick (after 1s), the newly added reserved peers are requested to be connected This can introduce an artificial delay of up to 1s, which is unnecessary. To mitigate this behavior, this PR: - Transforms the ` enum PeersetNotificationCommand` into a structure. Effectively, the peerset can specify directly to close some substreams and open other substreams - Upon receiving the `SetReservedPeers` command, peers are moved into the `Opening` state and the request is propagated to the litep2p to open substreams. - The behavior of the slot allocation timer remains identical. This is needed to capture the following edge cases: - The reserved peer of the `SetReservedPeers` is not disconnected, but backoff / pending closing. - The reserved peer is banned cc @paritytech/networking Detected during versi-net triaging of elastic scaling: paritytech#10310 (comment) --------- Signed-off-by: Alexandru Vasile <[email protected]> Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Bastian Köcher <[email protected]>
) Only works for contract accounts, not precompiles. This is needed so that test nodes like anvil can send transactions from contract accounts, a widely-used feature in tests Needed for paritytech/foundry-polkadot#423
…RPM and Publish docker pipelines (paritytech#10274) paritytech/devops#3830 --------- Co-authored-by: EgorPopelyaev <[email protected]>
…ytech#10396) `ExecuteBlock` exposes the `execute_block` function that is used by `validate_block` to execute a block. In case auf AuRa the block execution includes the verification of the seal and the removal of the seal. To verify the seal, the block executor needs to load the current authority set. The problem is that when we have storage proof reclaim enabled and the host function is used in `on_initialize` before `pallet_aura_ext::on_initialize` (this is where we fetch the authority set to ensure it appears in the proof) is called, it leads to `validate_block` returning a different size and thus, breaking the block. To solve this issue `ExecuteBlock` is now split into seal verification and execution of the verified block. In `validate_block` the seal verification is then run outside of the block execution, not leading to the issues of reporting different proof sizes. --------- Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Sebastian Kunert <[email protected]>
This PR fixes up termination by changing the behavior to: - The free balance (without ed) should be send away right away to the beneficiary and not be delayed like the contract deletion. - The ed and storage deposit will be send away only when terminating but to the origin (delayed). - The scheduling of the terminate needs to be reverted if the scheduling frame reverts. - `SELFDESTRUCT` should be allowed inside the constructor. The issuing contract will exist as account without code for the remainder of the transaction. - The `terminate` pre-compile should revert if delegate called or its caller was delegate called. This is just my opinion but if we are changing semantics we can might as well add some security. We are increasing the attack surface by allowing the destruction of any contract (not only created in the current tx). ## Other fixes - Storage refunds should no longer use `BestEffort`. This is necessary to fail refunds in case some other locks (due to participation in gov for example) prevent sending them away. This is in anticipation of new pre-compiles. - Moved pre-compile interfaces to sol files and made them available to fixtures - Added some Solidity written tests to exercise error cases ## Further tests needed Those should all be written in Solidity to test both backends at the same time. No more Rust fixtures. @0xRVE can you take those over as I am ooo. - Test that checks that scheduled deletions do properly roll back if a frame fails - Test that value send to a contract after scheduling for deletion is send to the beneficiary (different from Eth where this balance is lost) - Add tests that use `SELFDESTRUCT` to `Terminate.sol`. Need paritytech/devops#4508 but can be tested locally with newest `resolc`. --------- Signed-off-by: Alexandru Gheorghe <[email protected]> Signed-off-by: Andrei Sandu <[email protected]> Co-authored-by: 0xRVE <[email protected]> Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: pgherveou <[email protected]> Co-authored-by: Alin Dima <[email protected]> Co-authored-by: Bastian Köcher <[email protected]> Co-authored-by: Kian Paimani <[email protected]> Co-authored-by: Oliver Tale-Yazdi <[email protected]> Co-authored-by: Marian Radu <[email protected]> Co-authored-by: Karol Kokoszka <[email protected]> Co-authored-by: Francisco Aguirre <[email protected]> Co-authored-by: Alexandru Gheorghe <[email protected]> Co-authored-by: girazoki <[email protected]> Co-authored-by: Adrian Catangiu <[email protected]> Co-authored-by: Lukasz Rubaszewski <[email protected]> Co-authored-by: Paolo La Camera <[email protected]> Co-authored-by: Andrei Eres <[email protected]> Co-authored-by: Alexandru Gheorghe <[email protected]> Co-authored-by: Egor_P <[email protected]> Co-authored-by: Agustín Rodriguez <[email protected]> Co-authored-by: Branislav Kontur <[email protected]> Co-authored-by: Andrei Sandu <[email protected]> Co-authored-by: Thang X. Vu <[email protected]> Co-authored-by: DenzelPenzel <[email protected]> Co-authored-by: Javier Viola <[email protected]> Co-authored-by: Alexander Cyon <[email protected]> Co-authored-by: Sebastian Kunert <[email protected]> Co-authored-by: Alexander Samusev <[email protected]> Co-authored-by: Omar <[email protected]> Co-authored-by: Guillaume Thiolliere <[email protected]> Co-authored-by: BDevParity <[email protected]>
…o bytes (paritytech#10309) fixes paritytech/contract-issues#216 When an EVM contract writes an all-zero 32-byte storage word, remove the corresponding child‑trie entry so storage-deposit accounting sees bytes/items removed and a refund can be applied. --------- Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: pgherveou <[email protected]>
…s attached (for crates only releases) (paritytech#10379) This PR adjusts existing Publish Release Draft flows for the cases: 1. When we have a patch release without runtimes (only bins and docker images) 2. When we have crates only release For those two cases, the unnecessary information and artifacts won't be attached Closes: paritytech/release-engineering#275
…aritytech#10204) Edit by @skunert (edited because original test said not to merge): This adds a zombienet test that verifies that parachains running with a relay parent offset will not build on relay parents that have a session change in the descendant blocks. The reason is that candidates that were build in a past session are dropped on session boundary. --------- Co-authored-by: Sebastian Kunert <[email protected]> Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…only in case of a stable release (paritytech#10419) Closes: paritytech/devops#3831
# Description
According to assertion message and comment("at least"),
`T::MaxDebugBufferLen::get() > MIN_DEBUG_BUF_SIZE` should be changed
into `T::MaxDebugBufferLen::get() >= MIN_DEBUG_BUF_SIZE`
```rust
// Debug buffer should at least be large enough to accommodate a simple error message
const MIN_DEBUG_BUF_SIZE: u32 = 256;
assert!(
T::MaxDebugBufferLen::get() > MIN_DEBUG_BUF_SIZE,
"Debug buffer should have minimum size of {} (current setting is {})",
MIN_DEBUG_BUF_SIZE,
T::MaxDebugBufferLen::get(),
);
```
For this assertion, the assertion message indicates assertion will fail
when max_storage_size > storage_size_limit, which means it requires
max_storage_size <= storage_size_limit, but assertion predicate is
`max_storage_size < storage_size_limit`. Based on the code semantics,
assertion predicate should be changed into `max_storage_size <=
storage_size_limit`.
```rust
assert!(
max_storage_size < storage_size_limit,
"Maximal storage size {} exceeds the storage limit {}",
max_storage_size,
storage_size_limit
);
```
---------
Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This PR adds configurable control over PolkaVM logging in `pallet-revive` to address performance degradation (details: paritytech#8760 (comment)) - Upgrades PolkaVM to v0.30.0 which provides `set_imperfect_logger_filtering_workaround()` - Adds `pvm_logs` flag to `DebugSettings` to control PolkaVM interpreter logging - Disables PolkaVM logs by default (when `pvm_logs=false`), enabling them only when explicitly configured - Fixes performance issue where excessive PolkaVM logging was impacting block proposal times The logging can be re-enabled via debug settings when needed for troubleshooting. Additionally: - PolkaVM has been bumped globally across whole codebase. --------- Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
✄ -----------------------------------------------------------------------------
Thank you for your Pull Request! 🙏 Please make sure it follows the contribution guidelines outlined in this
document and fill out the
sections below. Once you're ready to submit your PR for review, please delete this section and leave only the text under
the "Description" heading.
Description
A concise description of what your PR is doing, and what potential issue it is solving. Use Github semantic
linking
to link the PR to an issue that must be closed once this is merged.
Integration
In depth notes about how this PR should be integrated by downstream projects. This part is
mandatory, and should be reviewed by reviewers, if the PR does NOT have the
R0-no-crate-publish-requiredlabel. In case of aR0-no-crate-publish-required, it can beignored.
Review Notes
In depth notes about the implementation details of your PR. This should be the main guide for reviewers to
understand your approach and effectively review it. If too long, use
<details>.Imagine that someone who is depending on the old code wants to integrate your new code and the only information that
they get is this section. It helps to include example usage and default value here, with a
diffcode-block to showpossibly integration.
Include your leftover TODOs, if any, here.
Checklist
Trequired)/cmd label <label-name>to add labelsBot Commands
You can use the following bot commands in comments to help manage your PR:
Labeling (Self-service for contributors):
/cmd label T1-FRAME- Add a single label/cmd label T1-FRAME R0-no-crate-publish-required- Add multiple labels/cmd label T6-XCM D2-substantial I5-enhancement- Add multiple labels at onceOther useful commands:
/cmd fmt- Format code (cargo +nightly fmt and taplo)/cmd prdoc- Generate PR documentation/cmd bench- Run benchmarks/cmd update-ui- Update UI tests/cmd --help- Show help for all available commandsYou can remove the "Checklist" section once all have been checked. Thank you for your contribution!
✄ -----------------------------------------------------------------------------