-
Notifications
You must be signed in to change notification settings - Fork 1.1k
[pallet-revive] fix termination testing #10346
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
Conversation
|
/cmd prdoc --audience runtime_dev --bump patch |
…time_dev --bump patch'
Fix Ethereum transaction decoding --------- Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
- And deprecate `FastUnstake` as it is unsafe - And use the faster solver for benchmarks to speed things up - Remove hardcoded weights of westend. A step to reduce the diff size in #9925 --------- Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Improve eth-rpc tests reliability by replacing substrate-node with revive-dev-node, fixing nonce query in runtime_api_dry_run_addr, and running all tests in a single tokio test function --------- Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
… specify asset for fees (#10243) Multiple pallet-xcm calls use `u32` index as a way to specify which asset from the `assets` (also an arg of the call) is to be used for fees purposes. This PR brings **major API change (breaking change)** that proposes usage of `VersionedAssetId` instead Affected pallet-xcm calls: `teleport_assets`, `reserve_transfer_assets`, `limited_reserve_transfer_assets`, `limited_teleport_assets`, `transfer_assets` This is follow-up change to the: #9842, that aims to remove the requirement of the client to provide sorted list of Assets to the APIs (often a point failures). With the mentioned change sorting happens on the runtime side and `u32` index (provided by the client) can become invalid after sorting (this PR aims that problem) Relevant [dicussion](https://matrix.to/#/!nYxxyvMNMUaniRIokh:parity.io/$gAcAEznmQL6LhUlvGPHSaePUV4cZtxoco2I6ap8Cn3Q?via=parity.io&via=matrix.org&via=web3.foundation) on XCM public element channel --------- Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Francisco Aguirre <franciscoaguirreperez@gmail.com>
While runing some balancer v3 tests: paritytech/foundry-polkadot#287 (comment), discovered we need a way to mock up the origin as well, so add hook. --------- Signed-off-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io> Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Right now the default message processor is somewhat tied to specific `AggregateMessageOrigin` from `polkadot_runtime_parachains::inclusion`. this pr changes it so that we require a conversion from that AggregateMessageOrigin, but nothing else, the rest stays generic. In the longer run we can allow customizing the processor to some other thing, but this was a sufficiently easier change --------- Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Adrian Catangiu <adrian@parity.io>
Fix prestate diff-tracing, add missing storage diff for created contracts --------- Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Reenable the `interest-cache` for the `tracing-log` crate. It was disabled in this PR (paritytech/substrate#11854) due to this issue (paritytech/substrate#11854). More details [here](#8760 (comment)). --------- Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…exclusion list (#10300) - Added `AllExcept` variant in `Select` enum to exclude try-runtime checks for a given list of pallets - Added `TryRuntimeUpgradeConfig` struct for extensible configuration of runtime upgrade testing - Added `Executive::try_runtime_upgrade_with_config()` for control over which pallets' try_state hooks to execute - Maintained backwards compatibility: existing `Executive::try_runtime_upgrade(checks)` function continues to work unchanged - Updated Westend runtime to use the new config-based API to exclude staking-related pallets (Staking, NominationPools, FastUnstake, DelegatedStaking) - This change is fully backwards compatible - external runtimes and tools (like try-runtime-cli) do not need to update their code --------- Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Fixes #7540 Fixes #9586 We wanted to check how many smart contract calls we can include in one block using various weights. - We prepared [a zombienet test](https://github.com/paritytech/polkadot-sdk/blob/0f1c2af0be3d33d7fe3965e1ed9a8734773b9782/polkadot/zombienet-sdk-tests/tests/parachains/weights.rs#L28), where we instantiate [a contract](https://github.com/paritytech/polkadot-sdk/blob/0f1c2af0be3d33d7fe3965e1ed9a8734773b9782/polkadot/zombienet-sdk-tests/tests/parachains/contract.txt#L6) with an ERC20 token and call it from different accounts: each account mints 100 tokens per call. - To maximize throughput, we also increased the PoV size from 5 MB to 10 MB and raised the weight limit (the maximum block fill) from 75% to 95%. - ref_time of read/write for the current setup were taken from [rocksdb_weights](https://github.com/paritytech/polkadot-sdk/blob/0f1c2af0be3d33d7fe3965e1ed9a8734773b9782/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/rocksdb_weights.rs#L28), and then they were changed according to results [of updated benchmarks](#7867). - Block execution time was taken from [basic_authorship](https://github.com/paritytech/polkadot-sdk/blob/0f1c2af0be3d33d7fe3965e1ed9a8734773b9782/substrate/client/basic-authorship/src/basic_authorship.rs#L574). - Number of transaction and how block filled were taken just looking at blocks. - PoV size for 1033 extrinsics in current setup (25000 read/100000 write weights, block filled to 75%) is 289 KB. I didn’t write down PoV sizes from other cases but they’re comparable to it. - Tests were running on Macbook Pro with M2. | ref_time of read/write | Block execution time | Block filled | Extrinsics in block | |--------------------------------------|----------------------|--------------|---------------------| | **ref_time from the current setup** | | | | | 25000/100000 | 679 ms | 75% | 1033 | | **ref_time from reference hardware** | | | | | 9000/28000 | 905 ms | 94% | 2225 | | 9000/28000 | 861 ms | 94% | 2225 | | **ref_time from a local machine** | | | | | 4000/13000 | 1013 ms | 94% | 2698 | | 4000/13000 | 1077 ms | 94% | 2698 | --------- Signed-off-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io> Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io>
Re-introducing a fix, that was overwritten with one of the PR's
## Description While testing different XCM messages via xcm-emulator, I noticed that the limit of 256 for `max_upward_message_size` in `RelayStateSproofBuilder` can be reached very easily. I suggest increasing it to `1024 * 1024` so that we can have a good range for testing. --------- Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Branislav Kontur <bkontur@gmail.com>
This PR adds couple of improvements to the Check semver job for the stable branches: 1. The `validate: false` option can be set now not only on the `mojor` bumps but on the `minor` and `patch` as well, this one is useful when for the backport cases when a desired bump does not match with the one, that `parity-publish` semver check has predicted (like [here](https://github.com/paritytech/polkadot-sdk/actions/runs/19135068993/job/54685184577?pr=10221)) 2. Possibility to skip check, when it is really not needed but still fails (like on the post crates release [prs](https://github.com/paritytech/polkadot-sdk/actions/runs/18311557391/job/52141285274?pr=9951)) closes: paritytech/release-engineering#274
When running a single collator (most commonly on testnets), the block builder task is always able to claim a slot, so we're never triggering the pre-connect mechanism which happens for slots owned by other authors. Additionally I fixed some tests. --------- Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…no_std` (#10321) This fixes `cargo test -p cumulus-pallet-parachain-system --features runtime-benchmarks`
…10329) Fixes #10185 This PR is to add support for `paginationStartKey` parameter in `archive_v1_storage` JSON RPC API for query type: `descendantsValues` and `descendantsHashes` per [the latest specs](https://paritytech.github.io/json-rpc-interface-spec/api/archive_v1_storage.html). --------- Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Bastian Köcher <git@kchr.de>
This renames the `SlotSchedule` runtime api to `TargetBlockRate`. It also changes the signature to only returning the target block rate. As discussed at the retreat, we don't need the block time returned as part of this runtime api.
# Description #9724 --------- Co-authored-by: Javier Viola <363911+pepoviola@users.noreply.github.com>
Differential Tests Results (REVM)Specified Tests
Counts
FailuresThe test specifiers seen in this section have the format 'path::case_idx::compilation_mode' and they're compatible with the revive differential tests framework and can be specified to it directly in the same way that they're provided through the The failures are provided in an expandable section to ensure that the PR does not get polluted with information. Please click on the section below for more information Detailed Differential Tests Failure Information
|
Differential Tests Results (PolkaVM)Specified Tests
Counts
FailuresThe test specifiers seen in this section have the format 'path::case_idx::compilation_mode' and they're compatible with the revive differential tests framework and can be specified to it directly in the same way that they're provided through the The failures are provided in an expandable section to ensure that the PR does not get polluted with information. Please click on the section below for more information Detailed Differential Tests Failure Information
|
| let addr = H160::from_slice(&result.data[32 + 12..]); | ||
| let delegator_addr = H160::from_slice(&result.data[12..32]); |
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.
can't we decode the results from the abi (apply else where if needed)
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 did not find any abi_decode function for H160 specifically, figured this was just as easy
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 mean you can decode the return value with
let decoded = <Contract>::<method_name>Call::abi_decode_returns(&result.data).unwrap();
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.
changed it to this now:
let decoded = TerminateCaller::delegateCallTerminateCall::abi_decode_returns(&result.data).unwrap();
let addr = H160::from_slice(decoded._1.as_slice());
This is not much prettier, is there a better way to cast it to H160?
| let delegator_addr = H160::from_slice(&result.data[12..32]); | ||
|
|
||
| assert_eq!( | ||
| get_balance(&DJANGO), |
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.
nit could we use set_evm_balance evm_balance everywhere, make it's easier to follow the test without thinking about ed
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.
ED is an important part of these tests so I prefer to keep it like this
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.
it's important, but it's already reflected in the calculation if we use evm_balance
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 tihnk it is better to have the ED explicit in the test
xermicus
left a comment
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.
First round: Some of the test code doesn't seem logical to me. I thought the goal is to align with EVM. Or am I missing something fundamental?
xermicus
left a comment
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.
Thanks!
|
All GitHub workflows were cancelled due to failure one of the required jobs. |
|
We should add sol test like this one as well to test that we can still call into a terminated contract, since the code / storage is destroyed at the end, but the balance is sent away directly. |
Adding tests