Commit Graph

2383 Commits

Author SHA1 Message Date
Qinxuan Chen e8e2048b88 chore: update some deps to prune duplicated deps (#14515)
* chore: update some deps to prune duplicated deps

- array-bytes: 4.1.0 => 6.1.0
- cid: 0.8.6 => 0.9.0

* fix
2023-07-06 16:46:44 +02:00
Liam Aharon 9c3ca04781 emit warn log on bad state (#14513) 2023-07-05 14:44:56 +00:00
Jegor Sidorenko 032aa05221 Use set_balance() instead of write_balance() in benchmark (#14497)
* Use set_balance instead of write_balance in benchmark

* Another approach

* Use BalanceOf::<T>::max_value() / 1000

* use a regular div instead of a checked one
2023-07-05 10:04:31 +00:00
Jegor Sidorenko f5776f6897 Improve NFT locking (#14510)
* Update docs

* Prevent locking of the same NFT twice

* Validate item is not locked on burn

* Cover with tests

* chore
2023-07-05 09:17:08 +00:00
Sasha Gryaznov f83fdeab53 contracts: switch from parity-wasm-based to wasmi-based module validation (#14449)
* upgrade to wasmi 0.29

* prepare cleanup

* sync ref_time w engine from the stack frame

* proc_macro: sync gas in host funcs

save: compiles, only gas pushing left to macro

WIP proc macro

proc macro: done

* clean benchmarks & schedule: w_base = w_i64const

* scale gas values btw engine and gas meter

* (re)instrumentation & code_cache removed

* remove gas() host fn, continue clean-up

save

* address review comments

* move from CodeStorage&PrefabWasmModule to PristineCode&WasmBlob

* refactor: no reftime_limit&schedule passes, no CodeStorage

* bugs fixing

* fix tests: expected deposit amount

* fix prepare::tests

* update tests and fix bugs

tests::run_out_of_gas_engine, need 2 more

save: 2 bugs with gas syncs: 1 of 2 tests done

gas_syncs_no_overcharge bug fixed, test passes!

cleaned out debug prints

second bug is not a bug

disabled_chain_extension test fix (err msg)

tests run_out_of_fuel_host, chain_extension pass

all tests pass

* update docs

* bump wasmi 0.30.0

* benchmarks updated, tests pass

* refactoring

* s/OwnerInfo/CodeInfo/g;

* migration: draft, compiles

* migration: draft, runs

* migration: draft, runs (fixing)

* deposits repaid non pro rata

* deposits repaid pro rata

* better try-runtime output

* even better try-runtime output

* benchmark migration

* fix merge leftover

* add forgotten fixtures, fix docs

* address review comments

* ci fixes

* cleanup

* benchmarks::prepare to return DispatchError

* ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_contracts

* store memory limits to CodeInfo

* ci: roll back weights

* ".git/.scripts/commands/bench-vm/bench-vm.sh" pallet dev pallet_contracts

* drive-by: update Readme and pallet rustdoc

* ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_contracts

* ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_contracts

* use wasmi 0.29

* ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_contracts

* use wasmi 0.30 again

* query memory limits from wasmi

* save: scan_exports ported, compiles

* save (wip, not compiles)

* query memory limits from wasmi

* better migration types

* ci: pull weights from master

* refactoring

* ".git/.scripts/commands/bench-vm/bench-vm.sh" pallet dev pallet_contracts

* scan_imports ported

* scan_export ported, other checks removed

* tests fixed

tests fixed

* drop wasmparser and parity-wasm dependencies

* typo fix

* addressing review comments

* refactor

* address review comments

* optimize migration

* ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_contracts

* another review round comments addressed

* ci fix one

* clippy fix

* ci fix two

* allow stored modules to have no memory imports

* rollback: allow stored modules to have no memory imports

* ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_contracts

* address review comments

---------

Co-authored-by: command-bot <>
2023-07-04 21:38:47 +00:00
Bastian Köcher 79f600db70 Revert k256 removal (#14499)
* Revert "Remove k256 crate from frame-support dependencies (#14452)"

This reverts commit 4d426214af.

* Keep the test
2023-07-03 23:38:51 +02:00
Ross Bulat fc36e04dfa Nomination pools: disallow setting above global max commission (#14496)
* add CommissionExceedsGlobalMaximum

* rename test

* amend set_commission_max_works_with_error_tests

* fmt
2023-07-03 21:22:12 +00:00
Hugo Trentesaux 7a2a1b93cb Fix typo (#14479) (#14480) 2023-07-03 17:09:29 +00:00
Sasha Gryaznov fda86dd501 contracts: switch to wasmi gas metering (#14084)
* upgrade to wasmi 0.29

* prepare cleanup

* sync ref_time w engine from the stack frame

* proc_macro: sync gas in host funcs

save: compiles, only gas pushing left to macro

WIP proc macro

proc macro: done

* clean benchmarks & schedule: w_base = w_i64const

* scale gas values btw engine and gas meter

* (re)instrumentation & code_cache removed

* remove gas() host fn, continue clean-up

save

* address review comments

* move from CodeStorage&PrefabWasmModule to PristineCode&WasmBlob

* refactor: no reftime_limit&schedule passes, no CodeStorage

* bugs fixing

* fix tests: expected deposit amount

* fix prepare::tests

* update tests and fix bugs

tests::run_out_of_gas_engine, need 2 more

save: 2 bugs with gas syncs: 1 of 2 tests done

gas_syncs_no_overcharge bug fixed, test passes!

cleaned out debug prints

second bug is not a bug

disabled_chain_extension test fix (err msg)

tests run_out_of_fuel_host, chain_extension pass

all tests pass

* update docs

* bump wasmi 0.30.0

* benchmarks updated, tests pass

* refactoring

* s/OwnerInfo/CodeInfo/g;

* migration: draft, compiles

* migration: draft, runs

* migration: draft, runs (fixing)

* deposits repaid non pro rata

* deposits repaid pro rata

* better try-runtime output

* even better try-runtime output

* benchmark migration

* fix merge leftover

* add forgotten fixtures, fix docs

* address review comments

* ci fixes

* cleanup

* benchmarks::prepare to return DispatchError

* ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_contracts

* store memory limits to CodeInfo

* ci: roll back weights

* ".git/.scripts/commands/bench-vm/bench-vm.sh" pallet dev pallet_contracts

* drive-by: update Readme and pallet rustdoc

* ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_contracts

* ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_contracts

* use wasmi 0.29

* ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_contracts

* use wasmi 0.30 again

* query memory limits from wasmi

* better migration types

* ci: pull weights from master

* refactoring

* ".git/.scripts/commands/bench-vm/bench-vm.sh" pallet dev pallet_contracts

* addressing review comments

* refactor

* address review comments

* optimize migration

* ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_contracts

* another review round comments addressed

* ci fix one

* clippy fix

* ci fix two

---------

Co-authored-by: command-bot <>
2023-07-03 11:04:10 +00:00
gupnik e42768ea34 Removes pallet::call_index from dev_mode example (#14492)
* Removes call_index

* Adds UI test and updates doc

* Update frame/examples/dev-mode/src/lib.rs

Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Update frame/examples/dev-mode/src/lib.rs

Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

---------

Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
2023-07-03 10:00:44 +00:00
Bastian Köcher 698a6d1aa8 sp-api: Put frame-metadata behind some feature (#14398)
* sp-api: Put `frame-metadata` behind some feature

Closes: https://github.com/paritytech/substrate/issues/14296

* ".git/.scripts/commands/fmt/fmt.sh"

* Review feedback

---------

Co-authored-by: command-bot <>
2023-07-03 11:54:28 +02:00
Cyrill Leutwiler 6005d19905 stabilize instantiation_nonce (#14493)
Signed-off-by: Cyrill Leutwiler <bigcyrill@hotmail.com>
2023-07-03 09:25:17 +00:00
Oliver Tale-Yazdi 234ceca1cc Whitelist 'intrablock_entropy' (#14489)
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
2023-07-02 14:18:10 +00:00
Liam Aharon 4137aa687d migrations: VersionedRuntimeUpgrade (#14311)
* VersionedRuntimeUpgrade

* only require one version and add a pre-upgrade check

* add docs

* improve warning log

* improve comments

* fix log

* use associated constants

* allow passing from and to versions

* test versioned_runtime_upgrade

* fix typo

* improve docs

* docs

* docs

* remove event from dummy pallet

* remove pre_upgrade current storage version check

* derive_impl

* skip pre/post checks if the actual migration will not run

* improve variable naming

* docs

* fix post_upgrade 'should run' logic

* fix comments

* pre and post hook tests

* feature gate try-runtime stuff

* remove deprecated macro

* Update frame/support/src/migrations.rs

Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* decode_all

* make experimental

* use rust generics

* add info log when running

* simplify tests

* improve log

* improve log

* cleaner pre_upgrade encoding

* Update frame/support/src/migrations.rs

Co-authored-by: Gonçalo Pestana <g6pestana@gmail.com>

* Update frame/support/src/migrations.rs

Co-authored-by: Gonçalo Pestana <g6pestana@gmail.com>

* Update frame/support/src/migrations.rs

Co-authored-by: Gonçalo Pestana <g6pestana@gmail.com>

* Update frame/support/src/migrations.rs

Co-authored-by: Gonçalo Pestana <g6pestana@gmail.com>

* Update frame/support/src/migrations.rs

Co-authored-by: Gonçalo Pestana <g6pestana@gmail.com>

* VersionedPostUpgradeData enum

* move versioned runtime upgrade tests to test/tests

* fix rust doc

* clarify comment

---------

Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: Gonçalo Pestana <g6pestana@gmail.com>
2023-07-02 08:36:14 +00:00
Muharem Ismailov 2f98b56393 Pallets: Assets destroy_accounts releases the deposit (#14443)
* assset accounts destroy releases the deposit

* enumerate

* Update frame/assets/src/functions.rs

Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>

* import defensive from frame_support

---------

Co-authored-by: Gavin Wood <gavin@parity.io>
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
Co-authored-by: parity-processbot <>
2023-07-01 15:48:53 +00:00
Alexandru Vasile de52e76d52 Stabilize V15 Metadata (#14481)
* Update frame-metadata to latest branch

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* Stabilize V15

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* Update frame-metadata

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* Use frame-metadata from crates.io

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* Adjust testing

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* test: Adjust frame-support metadata docs

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* Update primitives/metadata-ir/src/lib.rs

Co-authored-by: James Wilson <james@jsdw.me>

---------

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Co-authored-by: James Wilson <james@jsdw.me>
Co-authored-by: parity-processbot <>
2023-06-30 12:33:35 +03:00
Bastian Köcher 83caca85b6 frame-benchmarking-cli: Remove native dispatch requirement (#14474)
* frame-benchmarking-cli: Remove native dispatch requirement

No need for this, we can just use the `WasmExecutor` directly.

* Fixes

* Pass benchmarking host functions

* Ensure we can pass custom host functions
2023-06-29 17:56:25 +02:00
Alexandru Vasile 943697fa69 Metadata V15: Enrich extrinsic type info for decoding (#14123)
* metadata-ir: Add extrinsic type info to decode address, call, sig

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* frame-metadata: Point to unreleased branch

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* metadata-ir: Include addrees, call, signature in V15 conversion

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* metadata-ir: Include extra ty

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* construct_runtime: Extract address,call,sig,extra ty from tx type

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* frame/tests: Check metadata populates xt types correctly

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* metadata-ir/tests: Add extra fields on ExtrinsicMetadataIR

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* primitives/traits: Expand the `Extrinsic::SignaturePayload`

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* primitives: Adjust to new `Extrinsic` associated types

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* frame/metadata: Simplify metadata generation

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* frame/example: Adjust to new interface

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* frame/tests: Adjust `extrinsic_metadata_ir_types`

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* Revert the additional Extrinsic' associated types

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* primitives: Add `SignaturePayload` marker trait

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* primitives: Implement SignaturePayload for empty tuple

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* Adjust to new SignaturePayload trait

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* tests: Adjust `extrinsic_metadata_ir_types` to new interface

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* frame/support: Adjust pallet test

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* frame: Add Extrinsic length prefix to the metadata

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* primitives: Populate `ExtrinsicMetadataIR` with `len_ty`

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* Update primitives/runtime/src/traits.rs

Co-authored-by: Bastian Köcher <git@kchr.de>

* Apply cargo fmt

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* v15: Remove len type of the extrinsic

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* cargo: Update frame-metadata

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

---------

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Co-authored-by: Bastian Köcher <git@kchr.de>
Co-authored-by: parity-processbot <>
2023-06-28 12:44:20 +00:00
Alexandru Vasile 73a368c2e4 Metadata V15: Expose types for the overarching Call, Event, Error enums (#14143)
* frame-metadata: Point to unreleased branch

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* frame: Generalize outer enum generation for events and errors

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* frame: Remove individual generation of outer enum events

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* primitives/traits: Add marker trait for outer runtime enums

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* frame: Derive Clone, PartialEq, Eq for RuntimeEvents only

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* frame/pallet: Include `#[pallet::error]` enum into pallet parts

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* metadata-ir: Include call, event, error types

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* frame/metadata: Include outer enum types in V15 metadata

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* frame/tests: Ensure `RuntimeError` includes `#[pallet::error]` parts

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* frame/support: Document the reserved name for `RuntimeError`

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* frame: Use self-generated `RuntimeEvent` for `GetRuntimeOuterEnumTypes`

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* frame/ui: Fix UI tests

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* frame/support: Remove unused system path

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* frame/ui: Unexpected field and reintroduce frame_system::Config for RuntimeCall

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* frame/support: Remove `GetRuntimeOuterEnumTypes` marker trait

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* frame/support: Remove `;` from macro

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* Update frame-metadata to point to unreleased branch

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* Rename error_enum_ty to module_error_enum_ty

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* Update module_error_ty documentation

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* frame: Implement from_dispatch_error

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* frame/support: Adjust test to ModuleErrorType

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* Fix clippy

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* Improve documentation

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* frame/tests: Check `from_dispatch_error` impl

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* Update frame-metadata

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* Remove the module_error_ty

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* Apply fmt

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* Revert unneeded parts

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* Revert "Revert unneeded parts"

This reverts commit b94bbd16078a025775a48da1095edec1705e6a4d.

Revert "Apply fmt"

This reverts commit 9b1c3e7b4ef27d32e10b35054a99916067e0397b.

Revert "Remove the module_error_ty"

This reverts commit 98de5b24653f9f9ec6ee842b749401b18a01758a.

* Update frame-metadata to origin/master

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* Add outerEnums to the metadata

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* Add tests

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* Keep backwards compatibility for explicit pallet parts

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* Rename tt_error_part to be more generic

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* Increase recursion_limit to 1k

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* Rename `fully_expanded` to `expanded`

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* Improve documentation

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* Adjust UI tests

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* Update UI tests

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* Update undefined_validate_unsigned_part.stderr UI test

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* Adjust yet again

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* Optimise macro expansions

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* Use latest frame-metadata and rename `moduleErrorType` to `RuntimeError`

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* Fix comment

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* Apply fmt

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* Update frame/support/procedural/src/construct_runtime/parse.rs

Co-authored-by: Bastian Köcher <git@kchr.de>

* Update frame/support/procedural/src/construct_runtime/parse.rs

Co-authored-by: Bastian Köcher <git@kchr.de>

* Update frame-metadata PR

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* Remove `expanded` from error messages and fix typo

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* Move docs to the function

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* ui: Use the intermed syntax for pallet parts

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* Update frame-metadata with latest release

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* frame: Address feedback for `from_dispatch_error`

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

---------

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Co-authored-by: Bastian Köcher <git@kchr.de>
2023-06-28 09:44:05 +00:00
Oliver Tale-Yazdi 4249643df2 pallet-message-queue: add queue pausing (#14318)
* pallet-message-queue: add queue pausing

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Fix build

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Remove check

Otherwise it would not start servicing queues that started paused
and became unpaused afterwards.

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

---------

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
2023-06-28 08:58:31 +00:00
gupnik 5d8774016c [FRAME Core] Adds ability to split a pallet across multiple files (#13950)
* Initial setup

* Updates macro_magic version and refactors accordingly

* Removes unwrap from macro

* Splits into multiple sections

* Uses call_site to fix macro hygiene issue

* Initial setup

* Removes unnecessary changes

* Moves template palet back

* Updates cargo.lock

* Moves BagsList inside mod

* Comments access to internal functions for now

* Updates tests

* Uncomments code

* Fixes test

* Moves bags-list to separate crate

* Initial setup

* Removes bags-list changes

* Fix structure

* Minor update

* Addresses review comment

* Adds a couple of UI tests. More to be added

* Adds err files

* Adds test for no pallet

* Adds doc

* Updates versions

* Adds benchmarking

* Updates doc link

* ".git/.scripts/commands/fmt/fmt.sh"

* Minor update

* Adds missing changes

* ".git/.scripts/commands/fmt/fmt.sh"

* Update frame/support/procedural/src/lib.rs

Co-authored-by: Sam Johnson <sam@durosoft.com>

* Addresses review comments

* Addresses review comments

* ".git/.scripts/commands/fmt/fmt.sh"

* Update frame/support/procedural/src/lib.rs

Co-authored-by: Sam Johnson <sam@durosoft.com>

* Update frame/support/procedural/src/lib.rs

Co-authored-by: Sam Johnson <sam@durosoft.com>

* Update frame/support/procedural/src/lib.rs

Co-authored-by: Sam Johnson <sam@durosoft.com>

* Adds UI test for disambiguation

* ".git/.scripts/commands/fmt/fmt.sh"

* Makes clippy happy

* ".git/.scripts/commands/fmt/fmt.sh"

* Fixes frame support test

* Fixes frame support test

* Split items other than storage

* Updates versions

* Fixes some review comments

* Addresses review comments

* ".git/.scripts/commands/fmt/fmt.sh"

* Updates docs

* Adds experimental disclaimer

* ".git/.scripts/commands/fmt/fmt.sh"

* Update frame/support/test/tests/split_ui/no_section_found.rs

Co-authored-by: Sam Johnson <sam@durosoft.com>

* Addresses review comments

* Fixes test

---------

Co-authored-by: command-bot <>
Co-authored-by: command-bot <ci@gitlab.parity.io>
Co-authored-by: Sam Johnson <sam@durosoft.com>
2023-06-27 12:12:03 +00:00
Jeeyong Um 4d426214af Remove k256 crate from frame-support dependencies (#14452)
* Add test for to_eth_address

* Replace k256 with secp256k1

* Bump Cargo.lock

* Reformat
2023-06-25 21:40:03 +02:00
Sergej Sakac 15bd9e6fa7 try-runtime-cli: execute-block & create-snapshot tests (#14343)
* execute-block test

* test create-snapshot

* oops

* Update utils/frame/try-runtime/cli/tests/create_snapshot.rs

Co-authored-by: Liam Aharon <liam.aharon@hotmail.com>

* Update utils/frame/try-runtime/cli/tests/create_snapshot.rs

Co-authored-by: Liam Aharon <liam.aharon@hotmail.com>

* Update utils/frame/try-runtime/cli/tests/create_snapshot.rs

Co-authored-by: Liam Aharon <liam.aharon@hotmail.com>

* remove snapshot

* execute block: new log

* use prefix & make tempfile a dev dependencie

* Update utils/frame/try-runtime/cli/tests/execute_block.rs

Co-authored-by: Liam Aharon <liam.aharon@hotmail.com>

* Update utils/frame/try-runtime/cli/tests/create_snapshot.rs

Co-authored-by: Liam Aharon <liam.aharon@hotmail.com>

* ".git/.scripts/commands/fmt/fmt.sh"

* --at option in execute-block test

* fixes & use --at option in create-snapshot test

* hmm

* fmt

* remove nonsense

* Update utils/frame/try-runtime/cli/tests/create_snapshot.rs

Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Update utils/frame/try-runtime/cli/tests/execute_block.rs

Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* remove unnecessary test modules

* try to load snapshot file

* fix

---------

Co-authored-by: Liam Aharon <liam.aharon@hotmail.com>
Co-authored-by: command-bot <>
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
2023-06-24 09:36:15 +00:00
Squirrel 0750b03300 once_cell in std from 1.70 (#14402)
* once_cell now stable

* cargo fmt

---------

Co-authored-by: parity-processbot <>
2023-06-24 06:45:28 +00:00
Jegor Sidorenko be7c654c42 Pay tx fee with assets by using the asset conversion pallet (#14340)
* Pay tx by swapping the assets

* Change liquidity structure

* Uncomment the event

* Update frame/transaction-payment/asset-tx-payment/src/payment.rs

Co-authored-by: Squirrel <gilescope@gmail.com>

* New approach

* Fix bounds

* Clearer version

* Change IsType with Into and From

* Enable event

* Check ED + fix the logic

* Add temp comments

* Rework the refund

* Clean up

* Improve readability

* Getting closer

* fix

* Use fungible instead of Currency

* Test account without ed

* Final push

* Fixed

* Rename to pallet-asset-conversion-tx-payment

* Bring back the old pallet

* Update versions

* Update docs

* Update readme

* Wrong readme updated

* Revert back doc change

* Fix import

* Fix kitchensink

* Fix

* One more time..

* Wait pls

* Update frame/asset-conversion/src/lib.rs

Co-authored-by: Squirrel <gilescope@gmail.com>

* Update frame/support/src/traits/tokens/fungibles/regular.rs

Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>

* Update docs/comments

* Docs improvement

* Update frame/transaction-payment/asset-conversion-tx-payment/src/lib.rs

Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>

* Update frame/transaction-payment/asset-conversion-tx-payment/src/lib.rs

Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>

* Update frame/transaction-payment/asset-conversion-tx-payment/src/lib.rs

Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>

* Update frame/transaction-payment/asset-conversion-tx-payment/src/lib.rs

Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>

* Update frame/transaction-payment/asset-conversion-tx-payment/src/lib.rs

Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>

* Payed -> paid

* Docs

* Update frame/transaction-payment/asset-conversion-tx-payment/README.md

Co-authored-by: Muharem Ismailov <ismailov.m.h@gmail.com>

* Rewrite docs

* Try to clean the deps

* Add debug assert

* Return back frame-benchmarking

* Update cargo

* Update frame/transaction-payment/asset-conversion-tx-payment/src/mock.rs

Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>

* Rename

* clearer error message

* Docs for Pay by Swap (#14445)

* docs

* better error name

* more comments

* more docs on swap trait

* Fix compile errors

* Another fix

* Refactoring

* Update frame/transaction-payment/asset-conversion-tx-payment/src/payment.rs

Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>

* Emit an error if we fail to swap the refund back

* Add integrity_test

* Update frame/asset-conversion/src/lib.rs

Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>

* Fmt

* Use defensive_ok_or

* child PR: Tidy swap event (#14441)

* Dedup raising swap event

* use expect rather than unwrap

* Additional checks for future defence.

* cargo fmt

* Update frame/asset-conversion/src/lib.rs

Co-authored-by: Jegor Sidorenko <5252494+jsidorenko@users.noreply.github.com>

---------

Co-authored-by: Jegor Sidorenko <5252494+jsidorenko@users.noreply.github.com>

---------

Co-authored-by: Squirrel <gilescope@gmail.com>
Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>
Co-authored-by: Muharem Ismailov <ismailov.m.h@gmail.com>
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
2023-06-23 19:17:52 +00:00
Branislav Kontur 3e2c73dfad Adds ability to prepare/initialize before running set_code benchmark (#14435)
* Adds ability to prepare/initialize before running `set_code` benchmark

* Fix

* ".git/.scripts/commands/bench/bench.sh" pallet dev frame-system

* Replaced BenchmarkHelper with function

* Fix

* Introduced `set_code_data` for benchmark with default value

* ".git/.scripts/commands/bench/bench.sh" pallet dev frame-system

* (Hope) Final adjustment (because system parachains generates ValidationFunctionStored instead of CodeUpdated)

* ".git/.scripts/commands/bench/bench.sh" pallet dev frame-system

* ".git/.scripts/commands/bench-vm/bench-vm.sh" pallet dev frame-system

---------

Co-authored-by: command-bot <>
2023-06-23 12:02:13 +00:00
Stefan 4abb6025e3 inspect role for nonfungibles_v2 (#14341)
* inspect role

* Update frame/nfts/src/impl_nonfungibles.rs

Co-authored-by: Jegor Sidorenko <5252494+jsidorenko@users.noreply.github.com>

* Update frame/support/src/traits/tokens/nonfungibles_v2.rs

Co-authored-by: Jegor Sidorenko <5252494+jsidorenko@users.noreply.github.com>

* Update as suggested

* Update frame/nfts/src/impl_nonfungibles.rs

Co-authored-by: Jegor Sidorenko <5252494+jsidorenko@users.noreply.github.com>

* Update frame/nfts/src/impl_nonfungibles.rs

Co-authored-by: Jegor Sidorenko <5252494+jsidorenko@users.noreply.github.com>

* Update frame/nfts/src/impl_nonfungibles.rs

Co-authored-by: Jegor Sidorenko <5252494+jsidorenko@users.noreply.github.com>

---------

Co-authored-by: Jegor Sidorenko <5252494+jsidorenko@users.noreply.github.com>
2023-06-22 12:07:23 +00:00
Sam Johnson e783d98437 suppress unused warning in kitchensink example (#14417)
* suppress unused warning in kitchensink example

* Adds test

* ".git/.scripts/commands/fmt/fmt.sh"

---------

Co-authored-by: Nikhil Gupta <17176722+gupnik@users.noreply.github.com>
Co-authored-by: command-bot <>
2023-06-22 00:13:50 +02:00
Bastian Köcher 321a52bb27 Remove clippy workaround (#14424) 2023-06-21 12:06:09 +00:00
Koute 9d1741eb3c Bump parity-scale-codec to 3.6.1 (#14428) 2023-06-21 11:37:11 +00:00
PG Herveou 6ac8537436 Update contract multi-block migration (#14313)
* move migrate sequence to config

* remove commented out code

* Update frame/contracts/src/lib.rs

Co-authored-by: PG Herveou <pgherveou@gmail.com>

* remove Migrations generic

* make runtime use noop migrations

* restrict is_upgrade_supported

* Update contract multi-block migration

Ensure that we do as many steps as possible given the weight limit passed to on_idle

* undo is_upgrade_supported change

* Update bin/node/runtime/src/lib.rs

Co-authored-by: PG Herveou <pgherveou@gmail.com>

* wip

* fix comment (#14316)

* fix test

* fix

* Update frame/contracts/src/migration.rs

Co-authored-by: Juan <juangirini@gmail.com>

* fix test doc

* Apply suggestions from code review

Co-authored-by: Sasha Gryaznov <hi@agryaznov.com>

* Fix compilation with feature runtime-benchmarks

* fix example

* fix  cargo doc --document-private-items

* private links

* Remove dup comment

* add doc for MigrationInProgress

* PR review remove duplicate asserts

* simplify upper bound

* fix link

* typo

* typo

* no unwrap()

* correct log message

* missing

* fix typo

* PR comment

* Add example with single element tuple

* Improve migration message

* Update frame/contracts/src/benchmarking/mod.rs

Co-authored-by: Sasha Gryaznov <hi@agryaznov.com>

* Update frame/contracts/src/migration.rs

Co-authored-by: Sasha Gryaznov <hi@agryaznov.com>

* Update frame/contracts/src/migration.rs

Co-authored-by: Sasha Gryaznov <hi@agryaznov.com>

* use saturating_accrue instead of +=

* add more doc

* Contracts: Better migration types (#14418)

* Add explicit error, if try-runtime runs a noop migration

* use mut remaining_weight

---------

Co-authored-by: Juan Girini <juangirini@gmail.com>
Co-authored-by: Sasha Gryaznov <hi@agryaznov.com>
2023-06-20 13:16:28 +00:00
Mira Ressel 6ea3736004 ci: bump ci image for rust 1.70 (#14399)
* ci: bump ci image for rust 1.70

* ".git/.scripts/commands/update-ui/update-ui.sh" 1.70

* chore: ignore the new let_with_type_underscore lint

---------

Co-authored-by: command-bot <>
2023-06-20 13:26:03 +02:00
Oleg Plakida 0aa79f87ca ".git/.scripts/commands/bench-vm/bench-vm.sh" all (#13933)
Co-authored-by: command-bot <>
2023-06-19 14:31:20 +01:00
Gavin Wood 33a6536299 Society v2 (#11324)
* New Society

* More logic drafting

* More work

* Building

* Some tests

* Fixes

* Improvements to the voting process

* More tests

* Test number 20

* Tests

* 30 tests

* Another test]

* All tests enabled

* Minor stuff

* generate_storage_alias: Rewrite as proc macro attribute

This rewrites the `generate_storage_alias!` declarative macro as proc-macro attribute. While doing
this the name is changed to `storage_alias`. The prefix can now also be the name of a pallet. This
makes storage aliases work in migrations for all kind of chains and not just for the ones that use
predefined prefixes.

* Maintenance operations don't pay fee

* Fix compilation and FMT

* Moare fixes

* Migrations

* Fix tests and add migration testing

* Introduce lazy-cleanup and avoid unbounded prefix removal

* Fixes

* Fixes

* [WIP][Society] Adding benchmarking to the v2. (#11776)

* [Society] Adding benchmarking to the v2.

* [Society] Code review.

* [Society] Better code.

* Using clear() + clear_prefix() and adding more tests.

* Benchmarking again...

* Fix Cargo

* Fixes

* Fixes

* Spelling

* Fix benchmarks

* Another fix

* Remove println

---------

Co-authored-by: Bastian Köcher <info@kchr.de>
Co-authored-by: Artur Gontijo <arturgontijo@users.noreply.github.com>
2023-06-18 17:22:17 +01:00
wangjj9219 d8b18417a0 expose the fields of Dust type to public (#14388) 2023-06-18 09:14:08 +00:00
Sam Johnson 18df38a4b6 update macro_magic to 0.4.1 (#14356)
* update to macro_magic 0.4.0

* remove deprecated syntax and related doc comments

* upgrade to macro_magic v0.4.1

* fix import issue

* fix UI tests

* resolve frame_support path properly

* add docs note about importing

* fix typo

* Update frame/support/procedural/src/lib.rs

Co-authored-by: Guillaume Yu Thiolliere <gui.thiolliere@gmail.com>

* revert UI tests changes because we can't use rust 1.70

* fix UI tests

* fix another UI test

* use simplified import style

* switch back import since tests are written expecting it that way

---------

Co-authored-by: Guillaume Yu Thiolliere <gui.thiolliere@gmail.com>
2023-06-16 13:06:28 +00:00
Anton 1453bc9a2d [frame/im-online] remove ensure from pre_upgrade (#14401)
* [frame/im-online] remove ensure from pre_upgrade

modify ensure in post_upgrade to allow for future upgrades
refs https://github.com/paritytech/substrate/pull/14251#discussion_r1230973672

* cargo fmt
2023-06-16 12:17:01 +00:00
Oliver Tale-Yazdi 0895f4904f Delete 1D weight ctors and set explicit deprecation dates (#14397)
* Delete old weight functions

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Add explicit removal dates

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Upate UI tests

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

---------

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
2023-06-16 12:09:28 +00:00
Juan 6673f836ea Add a deprecation warning to the old runtime GenesisConfig (#14224)
* soft deprecate genesisconfig

* temporarily add a deprecation attr

* update tests

* update mocks

* update genesis config

* update genesis config

* update genesis config

* update genesis config

* remove deprecation warning

* add a deprecation warning to the old runtime GenesisConfig

* add a date to the deprecation message

---------

Co-authored-by: parity-processbot <>
2023-06-16 10:54:21 +00:00
Bastian Köcher 53f4b4df76 Run all tests with try-runtime feature enabled (#14396)
* Run all tests with `try-runtime` feature enabled

There are some tests that are guarded behind the `try-runtime` feature which are currently not being
executed. This pull requests changes this and enables the feature for the test run.

* Add some docs

* Rename variable
2023-06-16 12:16:19 +02:00
Anton 6cd2c8b395 [frame/im-online] remove network state from heartbeats (#14251)
* [frame/im-online] remove `external_addresses` from heartbeats

Users should use DHT for discovering new nodes. The reason for adding external addresses was
unstable work of authority discovery (see https://github.com/paritytech/substrate/issues/2719),
which is now stable. Hence we can safely remove `external_addresses`.

Refs https://github.com/paritytech/polkadot/issues/7181

* remove unused import

* run benchmark

* remove external_addresses from offchain NetworkState

* add missing fn to TestNetwork

* Revert "run benchmark"

This reverts commit a282042c2d6bf8bae2c383f6e2699c3fe2970a3d.

* update weights

* address @bkchr comments

* remove duplicate fn

* cleanup benchmarking.rs

* fix executor tests

* remove peer_id from hearbeat as well

https://github.com/paritytech/substrate/pull/14251#discussion_r1210887220

* remove MaxPeerDataEncodingSize

* change storage value type to `()`

https://github.com/paritytech/substrate/pull/14251#discussion_r1214268931

* scaffold storage migration

* no need to check the type actually

* remove unnecessary types from v0 mod

* add a test for migration

* expose Config types

+ pre_upgrade and post_upgrade working fn

* fix test

* replace dummy type with ConstU32

* add some comments to migration test

* fix comment

* respond to @bkchr comments

* use BoundedOpaqueNetworkState::default

intead of using default for each field
2023-06-15 09:42:36 +00:00
Branislav Kontur 4057ef1554 Fix for pallet_assets::create benchmark (#14384)
* Fix for `pallet_assets::create` benchmark

* ".git/.scripts/commands/bench/bench.sh" pallet dev pallet-assets

---------

Co-authored-by: command-bot <>
2023-06-14 20:03:37 +00:00
Michal Kucharczyk 52a0910c71 construct_runtime: support for expanding the macro code (#14379)
* construct_runtime: support for expanding the macro code

* Update frame/support/procedural/src/construct_runtime/mod.rs

Co-authored-by: Bastian Köcher <git@kchr.de>

* Update frame/support/procedural/Cargo.toml

Co-authored-by: Bastian Köcher <git@kchr.de>

* fmt added

* fmt removed

---------

Co-authored-by: Bastian Köcher <git@kchr.de>
2023-06-14 18:49:48 +00:00
kostekIV e9bb5e737a Expose ExtraFlags struct (#14376) 2023-06-14 16:44:47 +00:00
Guillaume Yu Thiolliere 7db4d74c43 Restructure macro-related exports into private mods for frame (#14375)
* minor refactor

* Update frame/election-provider-support/src/lib.rs

* Update frame/election-provider-support/solution-type/src/lib.rs

Co-authored-by: Bastian Köcher <git@kchr.de>

* ".git/.scripts/commands/fmt/fmt.sh"

---------

Co-authored-by: Bastian Köcher <git@kchr.de>
Co-authored-by: command-bot <>
2023-06-14 12:44:01 +00:00
Liam Aharon 72046c2830 migration(elections-phragmen): unreserve deposits and clear locks (#14218)
* pre_upgrade hook wip

* working pre_upgrade

* simplify code

* cleanup and document

* return reads from get_account_deposited_and_staked_sums

* improve comment

* on_runtime_upgrade comment

* post upgrade comment

* use saturating_add

* clippy

* clean up balances

* add tests

* fix comment

* oops

* actually fix comment

* fix std build

* address pr comments

* remove redundant comment

* update comment

* add comment

* oliver comments from tips pallet pr

* lint

* remove need for do_pre/do_post runtime functions

* generic dbweight

* Update frame/elections-phragmen/src/migrations/unlock_and_unreserve_all_funds.rs

Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Update frame/elections-phragmen/src/migrations/unlock_and_unreserve_all_funds.rs

Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* pr comments

* remove useless check

* feature gate log target

* lint

* Update frame/elections-phragmen/src/migrations/unlock_and_unreserve_all_funds.rs

Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* add log for unexpected amounts

---------

Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
2023-06-13 16:07:13 +00:00
Liam Aharon 93dea08420 migration(democracy): unreserve deposits and clear locks (#14226)
* unlock and unreserve all migration

* log total amount to unlock

* clippy

* clippy

* simplify balance types

* add tests

* fix comment

* fix std features

* remove redundant dev-dep

* address comments

* remove redundant std

* estimate weights

* fix comments

* fix tests

* clippy

* track democracy bugged deposits

* improve pre_migration logs

* oliver comments from tips pr

* run pre and post hooks in tests

* flexible dbweight type

* Update frame/democracy/src/migrations/unlock_and_unreserve_all_funds.rs

Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Update frame/democracy/src/migrations/unlock_and_unreserve_all_funds.rs

Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>

* Update frame/democracy/src/migrations/unlock_and_unreserve_all_funds.rs

Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* docs

* Update frame/democracy/src/lib.rs

Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Update frame/democracy/src/migrations/unlock_and_unreserve_all_funds.rs

Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* add log target

* fix visibility

* lint

* use log target

---------

Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
2023-06-13 16:06:35 +00:00
Oliver Tale-Yazdi 3b6d31f03d pallet-glutton: over-unity consumption (#14338)
* pallet-glutton: over-unity consumption

* Add hard limit

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Tests

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Cleanup

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Highlight warning

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Fix docs

* Review test fixes

Co-authored-by: Guillaume Yu Thiolliere <gui.thiolliere@gmail.com>

* ".git/.scripts/commands/bench/bench.sh" pallet dev pallet-glutton

* ".git/.scripts/commands/bench/bench.sh" pallet dev pallet-glutton

---------

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: Guillaume Yu Thiolliere <gui.thiolliere@gmail.com>
Co-authored-by: command-bot <>
2023-06-13 15:57:04 +00:00
Ankan 2c7166eb9c Take into account proof size for transaction payment and priority (#13958)
* use both proof size and weight

* old tests pass, todo: add tests for weight proof size

* refactor priority calculation

* refactor

* normalize dimensions

* refactor

* update comments

* use higher resolution

* test multiplier can grow

* restore ref time test cases

* fix hacky test

* fmt

* update tests

* revert to original error rate

* update targetedFeeAdjustment doc

* Update frame/transaction-payment/src/lib.rs

Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* import defensive

---------

Co-authored-by: parity-processbot <>
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
2023-06-13 15:53:38 +02:00
Jegor Sidorenko d767d748d3 Use Incrementable from frame_support::traits (#14367)
* Use Incrementable from frame_support::traits

* Chore
2023-06-13 13:46:19 +00:00