profile
viewpoint
Qinxuan Chen koushiro Earth https://t.me/koushiro Rustacean 15XuanNimo5951s3RjFTPX1AvYVnCwfr3SDhb3AV4fQF3LpK

koushiro/async-jsonrpc 13

An async JSON-RPC 2.0 crate written in Rust.

koushiro/bip0039 9

Another Rust implementation of BIP-0039 standard.

koushiro/flvparse 6

A FLV format parsing library written in Rust with nom.

koushiro/pbar 4

A terminal progress bar written in Rust.

koushiro/resume-deprecated 3

:space_invader: My resume / 我的简历

koushiro/usql 2

[WIP] Universal SQL Lexer and Parser, written in Rust.

koushiro/xlib 1

a lightweight and generic C99 library.

koushiro/arrow-datafusion 0

Apache Arrow DataFusion and Ballista query engines

koushiro/async-raft 0

An implementation of the Raft distributed consensus protocol using the Tokio framework.

koushiro/cargo 0

The Rust package manager

push eventkoushiro/substrate

Nazar Mokrynskyi

commit sha 823c2533612e9bab7ac5e4f57a7c5daa762c00a5

Relax types on `DigestItemRef`, such that byte slices can be used in addition to vector references (#10536) * Relax types on `DigestItemRef`, such that byte slices can be used in addition to vector references * Apply clippy suggestions

view details

Oliver Tale-Yazdi

commit sha f318350b6410ef47e438aae24c0b4779373d0a7b

Require `MaxEncodedLen` per default (#10662) * Remove generate_storage_info Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Add without_storage_info where needed Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Update doc tests Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Add more without_storage_info Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * fix TryBuild Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * fix TryBuild tests Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

view details

Shawn Tabrizi

commit sha 48e0b415b94d8ce14e0ebbbdb813263afa27f02e

dont increase the allocated size of vec (#10701)

view details

koushiro

commit sha b4d8a9e8daf9852e66c3267334674c39800ecd96

Merge remote-tracking branch 'upstream/master' into use-clap3

view details

push time in 2 days

push eventkoushiro/polkadot

Sergei Shulepov

commit sha dee0681cccc650d7b2ba5face7f15eb49bdc9b98

paras: do not allow PVF vote submission if disabled (#4684) if the PVF pre-checking is disabled the runtime dispatchable will reject any attempts of submission. This is also concern the unsigned tx validation. Right now, the `include_pvf_check_statement` dispatchable is effectively uncallable because of the weight set to the maximum value. If we were to benchmark it, it would become includable in a block, but since there will be no active votes, the dispatchable won't do anything. However, it will execute some code, like signature validation and querying some storage entries. To be completely safe, we can bail out early if the `pvf_checking_enabled` config is disabled. That's what this PR does.

view details

zqhxuyuan

commit sha 9ce5f7ef5abb1a4291454e8c9911b304d80679f9

make xcm_config public (#4731)

view details

Bastian Köcher

commit sha d9a65e5bda48e56540e6a61a711ba568bd760679

Check that `try-runtime` compiles in CI (#4736) It also moves some simple scripts directly into the .gitlab.yaml file.

view details

Alexander Theißen

commit sha d2a156deafab68237d88c1dd8e2979915e521421

Fix `pallet_xcm::execute` (#4490) * Make `pallet_xcm::execute` supply the proper weight credit * Use weight correction Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>

view details

Sergei Shulepov

commit sha cff29a327ab67092c621019da46b136af25ec6fc

pvf-checker-subsystem: metrics (#4741) * pvf-checker-subsystem: metrics This commits adds metrics to the PVF pre-checking subsystem. * Apply suggestions from code review Co-authored-by: sandreim <54316454+sandreim@users.noreply.github.com> Co-authored-by: sandreim <54316454+sandreim@users.noreply.github.com>

view details

Robert Klotzner

commit sha e8ee462b0f205718af77b791f4990ed88eaa9a2a

Bump substrate. (#4747)

view details

Gavin Wood

commit sha 840e04b0943cb5ac3bb2c95f793b2580321f34f6

Mainnets have upper bound on treasury bond required (companion for #10689) (#4739) * Mainnets have upper bound on treasury bond required * Update runtime/common/src/impls.rs * Update runtime/polkadot/src/lib.rs Co-authored-by: Keith Yeung <kungfukeith11@gmail.com> * Bump * Update Substrate Co-authored-by: RRTTI <raul@justopensource.io> Co-authored-by: Keith Yeung <kungfukeith11@gmail.com> Co-authored-by: Bastian Köcher <info@kchr.de>

view details

Javier Viola

commit sha bb03acb52e474accbfdc92e30f872ddbed9322b2

[Zombienet] add dummy upgrade test (#4660)

view details

Bernhard Schuster

commit sha 68d1e6088895057fed073d4c697b74f6867a83c8

[runtime] follow up relay chain cleanups (#4657) * fix miscalculation of remaining weight * rename a var * move out enforcing filtering by dropping inherents * prepare for dispute statement validity check being split off * refactor * refactor, only check disputes we actually want to include * more refactor and documentation * refactor and minimize inherent checks * chore: warnings * fix a few tests * fix dedup regression * fix * more asserts in tests * remove some asserts * chore: fmt * skip signatures checks, some more * undo unwatend changes * Update runtime/parachains/src/paras_inherent/mod.rs Co-authored-by: sandreim <54316454+sandreim@users.noreply.github.com> * cleanups, checking CheckedDisputeStatments makes no sense * integrity, if called create_inherent_inner, it shall do the checks, and not rely on enter_inner * review comments * use from impl rather than into * remove outdated comment * adjust tests accordingly * assure no weight is lost * address review comments * remove unused import * split error into two and document * use assurance, O(n) * Revert "adjust tests accordingly" This reverts commit 3cc9a3c449f82db38cea22c48f4a21876603374b. * fix comment * fix sorting * comment Co-authored-by: sandreim <54316454+sandreim@users.noreply.github.com>

view details

Oliver Tale-Yazdi

commit sha d96d3bea85a650f48e9011aaec7d2ab9c9e7b2c0

co #10662: Require `MaxEncodedLen` per default (#4746) * Add `without_storage_info` The MaxEncodedLen trait is now enforced by default in Substrate. All pallets missing an implementation need to be marked with `without_storage_info` now. Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Remove `generate_storage_info` Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Add more `without_storage_info` Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * update lockfile for {"substrate"} Co-authored-by: parity-processbot <>

view details

koushiro

commit sha 1524e984edfeef8878b4e9e4fe9db194aab1fa61

Merge remote-tracking branch 'upstream/master' into use-clap3

view details

push time in 2 days

push eventkoushiro/substrate

koushiro

commit sha 38f7b7c654e9fd55dfddcefbc556d26f9abcc95a

cargo fmt Signed-off-by: koushiro <koushiro.cqx@gmail.com>

view details

push time in 2 days

push eventkoushiro/substrate

dharjeezy

commit sha 787bb8711a031bb5a38a9deb82416d8ed14d69a0

bench/cli: extend --extrinsic name filtering (#10677) * implement benchmarking multiple extrinsics * ran cargo +nightly fmt * remove contains check and made it an equals check

view details

Sacha Lansky

commit sha 4cd2cc958f5a078d87e4eae877167c40cf2ebf9e

Minor syntax and typo edits (#10693)

view details

Pierre Krieger

commit sha 104c2cd917b84cf3499c14a4ffa5fee8d8c5c7b5

Split peer slots between full and light nodes (#10688) * Split peer slots between full and light nodes * Rustfmt * Oops, accidentally removed a comma * Remove else

view details

Gavin Wood

commit sha fed456fbd73253686f965f4d426776037420637e

Allow the treasury to have a maximum bound on the bond (#10689) * Allow the treasury to have a maximum bound on the bond * Update frame/treasury/src/lib.rs Co-authored-by: Keith Yeung <kungfukeith11@gmail.com> Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>

view details

Oliver Tale-Yazdi

commit sha bea8f32e7807233ab53045fe8214427e0f136230

Improve usability of `add`+`list_benchmark!` (#10592) * Improve usability of add_benchmark and list_benchmark. Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * node-template: use new define_benchmarks syntax Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * make CI happy Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * remove old imports Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * fix TryBuild tests Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Revert "fix TryBuild tests" This reverts commit 82ea52fd25c0ef5efa46669217694835a7404d4e. * review: remove blank lines Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

view details

Kian Paimani

commit sha 33c518ebbe43d38228ac47e793e4d1c76738a56d

Remove all stale `on_runtime_upgrade` hooks in the runtime (#10650) * Remove all stale on_runtime_upgrade hooks in the runtime * add docs * cleanup * fix warn * fix more warnings * fix offence test * overwrite the damn UItest

view details

koushiro

commit sha fe24463b7aab229eac221d6401b66ccf143eec61

Merge remote-tracking branch 'upstream/master' into use-clap3

view details

push time in 3 days

Pull request review commentparitytech/substrate

use clap3 instead of structopt

 // along with this program. If not, see <https://www.gnu.org/licenses/>.  use crate::arg_enums::Database;+use clap::Args; use sc_service::TransactionStorageMode;-use structopt::StructOpt;  /// Parameters for block import.-#[derive(Debug, StructOpt, Clone)]+#[derive(Debug, Clone, Args)] pub struct DatabaseParams { 	/// Select database backend to use.-	#[structopt(+	#[clap( 		long, 		alias = "db", 		value_name = "DB",-		case_insensitive = true,-		possible_values = &Database::variants(),+		ignore_case = true,+		possible_values = Database::variants(),

Because the variants method of other enums are generated by structopt, but the Database::variants and WasmExecutionMethod::variants are implemented manually.

koushiro

comment created time in 3 days

PullRequestReviewEvent

startedprometheus/client_rust

started time in 3 days

startedrisinglightdb/risinglight

started time in 3 days

pull request commentparitytech/frontier

use `thiserror` instead of `derive_more` for error handling

derive_more is a good toolkit that provides derive macros of many standard library traits, but thiserror is more focused on error handling (although the usage here is not much different), and as far as I know, thiserror is the most commonly used error handling library in the current Rust community.

koushiro

comment created time in 3 days

PR opened paritytech/substrate

use `thiserror` instead of `derive_more` for error handling

Description

use thiserror instead of derive_more for error handling


Polkadot address: 15XuanNimo5951s3RjFTPX1AvYVnCwfr3SDhb3AV4fQF3LpK

+386 -354

0 comment

47 changed files

pr created time in 3 days

create barnchkoushiro/substrate

branch : use-thiserror

created branch time in 3 days

PR opened paritytech/frontier

Reviewers
use `thiserror` instead of `derive_more` for error handling

Signed-off-by: koushiro koushiro.cqx@gmail.com

+9 -9

0 comment

5 changed files

pr created time in 3 days

create barnchkoushiro/frontier

branch : use-thiserror

created branch time in 3 days

fork koushiro/frontier

Ethereum compatibility layer for Substrate.

fork in 3 days

push eventkoushiro/substrate

koushiro

commit sha 88e374097cfb0325751d4bc8a6189603aae9a11a

remove useless option long name Signed-off-by: koushiro <koushiro.cqx@gmail.com>

view details

push time in 4 days

push eventkoushiro/substrate

Shawn Tabrizi

commit sha fe3f379a105d4be72963a0f2fbe654b86e92a5ec

Improve BoundedVec API (extracted from #10195) (#10656) * Gav wrote this code in pull #10195. Extracting to simplify that PR. * fix potential panics * prevent panics in slide * update doc * fmt * Update frame/support/src/storage/bounded_vec.rs Co-authored-by: Keith Yeung <kungfukeith11@gmail.com> Co-authored-by: Gav Wood <gavin@parity.io> Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>

view details

Joey

commit sha 9d1790636e55a3456bdab91ff2d0e059878d3c42

the report mod and REPORTING keyType is no longer used (#10679)

view details

Alexander Theißen

commit sha 02bdc57655d18ea24b7a9bda6377bd0f134f7d8e

contracts: Get rid of the dreaded `Other` error (#10595) * Print more detailed error when instrumentation fails * Apply suggestions from code review Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com> * Check contents of debug buffer * Fix test Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>

view details

James Wilson

commit sha 08d2ed16ecfe35ab44214112ebc911aa6fed6c1e

Bump sp-keyring to 4.1.0-dev (#10681)

view details

Nazar Mokrynskyi

commit sha 249dbbba6a1a277a3098c2a5b302645da16451ad

Update wasmtime to 0.33.0 (#10674) Also disable memory64 support in wasmtime

view details

Alexander Theißen

commit sha e2d1f1823796cb767b40d9003ac2ee145e0837a4

Switch from `pwasm-utils` to `wasm-instrument` (#10680) * Switch executor to wasm-instrument * Switch pallet-contracts to wasm-instrument

view details

Guillaume Thiolliere

commit sha 963ee8a37130f6d76b2859e76164a01607a306cf

Add feature: `no-metadata-doc` which removes doc from metadata and `full-metadata` which build metadata with all doc (#10493) * add features to remove or add doc * fmt * add test for event/error/call * fmt

view details

Zeke Mostov

commit sha 7e87c08b71ce2247b504fb2ea7d1f979f98705a2

Migration for over locked accounts in phgragmen elections (#10649) * use free balance rather than total balance * Docs * Migration for over-locked phrag voters * New line * comment * Update frame/elections-phragmen/src/migrations/v5.rs Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> * Only set lock, don't remove it * delete commented out * docs * Update migration to just take a set of accounts Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com> Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>

view details

koushiro

commit sha d33a6c0484c5443cdef29fc6b01f9068e77a38ee

Merge remote-tracking branch 'upstream/master' into use-clap3

view details

push time in 4 days

Pull request review commentparitytech/substrate

use clap3 instead of structopt

 // along with this program. If not, see <https://www.gnu.org/licenses/>.  use crate::arg_enums::Database;+use clap::Args; use sc_service::TransactionStorageMode;-use structopt::StructOpt;  /// Parameters for block import.-#[derive(Debug, StructOpt, Clone)]+#[derive(Debug, Clone, Args)] pub struct DatabaseParams { 	/// Select database backend to use.-	#[structopt(+	#[clap( 		long, 		alias = "db", 		value_name = "DB",-		case_insensitive = true,-		possible_values = &Database::variants(),+		ignore_case = true,+		possible_values = Database::variants(),

if I use arg_enum here, do I need to remove the variants method of Database and impl std::str::FromStr for Database?

koushiro

comment created time in 5 days

PullRequestReviewEvent

Pull request review commentparitytech/substrate

use clap3 instead of structopt

 fn parse_pallet_name(pallet: &str) -> String { }  /// The `benchmark` command used to benchmark FRAME Pallets.-#[derive(Debug, structopt::StructOpt)]+#[derive(Debug, clap::Parser)] pub struct BenchmarkCmd { 	/// Select a FRAME Pallet to benchmark, or `*` for all (in which case `extrinsic` must be `*`).-	#[structopt(short, long, parse(from_str = parse_pallet_name), required_unless = "list")]+	#[clap(short, long, parse(from_str = parse_pallet_name), required_unless_present = "list")] 	pub pallet: Option<String>,  	/// Select an extrinsic inside the pallet to benchmark, or `*` for all.-	#[structopt(short, long, required_unless = "list")]+	#[clap(short, long, required_unless_present = "list")] 	pub extrinsic: Option<String>,  	/// Select how many samples we should take across the variable components.-	#[structopt(short, long, default_value = "1")]+	#[clap(short, long, default_value = "1")] 	pub steps: u32,  	/// Indicates lowest values for each of the component ranges.-	#[structopt(long = "low", use_delimiter = true)]+	#[clap(long = "low", use_delimiter = true)] 	pub lowest_range_values: Vec<u32>,  	/// Indicates highest values for each of the component ranges.-	#[structopt(long = "high", use_delimiter = true)]+	#[clap(long = "high", use_delimiter = true)] 	pub highest_range_values: Vec<u32>,  	/// Select how many repetitions of this benchmark should run from within the wasm.-	#[structopt(short, long, default_value = "1")]+	#[clap(short, long, default_value = "1")] 	pub repeat: u32,  	/// Select how many repetitions of this benchmark should run from the client. 	/// 	/// NOTE: Using this alone may give slower results, but will afford you maximum Wasm memory.-	#[structopt(long, default_value = "1")]+	#[clap(long, default_value = "1")] 	pub external_repeat: u32,  	/// Print the raw results.-	#[structopt(long = "raw")]+	#[clap(long = "raw")] 	pub raw_data: bool,  	/// Don't print the median-slopes linear regression analysis.-	#[structopt(long)]+	#[clap(long)] 	pub no_median_slopes: bool,  	/// Don't print the min-squares linear regression analysis.-	#[structopt(long)]+	#[clap(long)] 	pub no_min_squares: bool,  	/// Output the benchmarks to a Rust file at the given path.-	#[structopt(long)]+	#[clap(long)] 	pub output: Option<std::path::PathBuf>,  	/// Add a header file to your outputted benchmarks-	#[structopt(long)]+	#[clap(long)] 	pub header: Option<std::path::PathBuf>,  	/// Path to Handlebars template file used for outputting benchmark results. (Optional)-	#[structopt(long)]+	#[clap(long)] 	pub template: Option<std::path::PathBuf>,  	/// Which analysis function to use when outputting benchmarks: 	/// * min-squares (default) 	/// * median-slopes 	/// * max (max of min squares and median slopes for each value)-	#[structopt(long)]+	#[clap(long)] 	pub output_analysis: Option<String>,  	/// Set the heap pages while running benchmarks. If not set, the default value from the client 	/// is used.-	#[structopt(long)]+	#[clap(long)] 	pub heap_pages: Option<u64>,  	/// Disable verification logic when running benchmarks.-	#[structopt(long)]+	#[clap(long)] 	pub no_verify: bool,  	/// Display and run extra benchmarks that would otherwise not be needed for weight 	/// construction.-	#[structopt(long)]+	#[clap(long)] 	pub extra: bool,  	/// Estimate PoV size.-	#[structopt(long)]+	#[clap(long)] 	pub record_proof: bool,  	#[allow(missing_docs)]-	#[structopt(flatten)]+	#[clap(flatten)] 	pub shared_params: sc_cli::SharedParams,  	/// The execution strategy that should be used for benchmarks-	#[structopt(-		long = "execution",-		value_name = "STRATEGY",-		possible_values = &ExecutionStrategy::variants(),-		case_insensitive = true,-	)]+	#[clap(long, value_name = "STRATEGY", arg_enum, ignore_case = true)] 	pub execution: Option<ExecutionStrategy>,  	/// Method for executing Wasm runtime code.-	#[structopt(+	#[clap( 		long = "wasm-execution", 		value_name = "METHOD",-		possible_values = &WasmExecutionMethod::variants(),-		case_insensitive = true,+		possible_values = WasmExecutionMethod::variants(),

Same as Database argument

koushiro

comment created time in 5 days

PullRequestReviewEvent

Pull request review commentparitytech/substrate

use clap3 instead of structopt

 targets = ["x86_64-unknown-linux-gnu"]  [dependencies] ansi_term = "0.12.1"+clap = { version = "3.0", features = ["derive"] }+rand = "0.8"

I'll revert it if you mind

koushiro

comment created time in 5 days

PullRequestReviewEvent

Pull request review commentparitytech/substrate

use clap3 instead of structopt

  //! Implementation of the `palletid` subcommand +use clap::Parser; use frame_support::PalletId; use sc_cli::{ 	utils::print_from_uri, with_crypto_scheme, CryptoSchemeFlag, Error, KeystoreParams, 	OutputTypeFlag, }; use sp_core::crypto::{unwrap_or_default_ss58_version, Ss58AddressFormat, Ss58Codec}; use sp_runtime::traits::AccountIdConversion;-use structopt::StructOpt;  /// The `palletid` command-#[derive(Debug, StructOpt)]-#[structopt(name = "palletid", about = "Inspect a module ID address")]+#[derive(Debug, Parser)]+#[clap(name = "palletid", about = "Inspect a module ID address")] pub struct PalletIdCmd { 	/// The module ID used to derive the account 	id: String,  	/// network address format-	#[structopt(+	#[clap( 		long, 		value_name = "NETWORK", 		possible_values = &Ss58AddressFormat::all_names()[..],

Ss58AddressFormat (from ss58-registry):

/// A custom address format. See also [`Ss58AddressFormatRegistry`]
#[derive(Copy, Clone, PartialEq, Eq, Debug)]
pub struct Ss58AddressFormat {
	prefix: u16,
}

if we use arg_enum attribute here, Ss58AddressFormat should be like:

enum Ss58AddressFormat { ... }
koushiro

comment created time in 5 days

PullRequestReviewEvent

Pull request review commentparitytech/substrate

use clap3 instead of structopt

 hex = { version = "0.4", default-features = false, optional = true } twox-hash = { version = "1.6.2", default-features = false, optional = true } libsecp256k1 = { version = "0.7", default-features = false, features = ["hmac", "static-context"], optional = true } merlin = { version = "2.0", default-features = false, optional = true }-ss58-registry = { version = "1.10.0", default-features = false }+ss58-registry = { version = "1.11.0", default-features = false }

ss58-registry need to be updated the latest version (see paritytech/ss58-registry#67) for parse(try_from_str = Ss58AddressFormat::try_from)

koushiro

comment created time in 5 days

PullRequestReviewEvent

Pull request review commentparitytech/substrate

use clap3 instead of structopt

 sp-std = { path = "../../../primitives/std", version = "4.0.0" } remote-externalities = { path = "../../../utils/frame/remote-externalities", version = "0.10.0-dev" }  # others-tokio = { version = "1", features = ["macros"] } log = "0.4.14"-structopt = "0.3.25"-clap = "2.34.0"

yes

koushiro

comment created time in 5 days

PullRequestReviewEvent

Pull request review commentparitytech/cumulus

Companion for substrate#10632

 pub enum Subcommand { 	Revert(sc_cli::RevertCmd),  	/// The custom benchmark subcommmand benchmarking runtime pallets.-	#[structopt(name = "benchmark", about = "Benchmark runtime pallets.")]+	#[clap(name = "benchmark", about = "Benchmark runtime pallets.")] 	Benchmark(frame_benchmarking_cli::BenchmarkCmd),  	/// Try some testing command against a specified runtime state. 	TryRuntime(try_runtime_cli::TryRuntimeCmd),  	/// Key management CLI utilities+	#[clap(subcommand)]

yeah, it will be fail at compile time

koushiro

comment created time in 5 days

PullRequestReviewEvent
more