parity-common
parity-common copied to clipboard
Collection of crates used in Parity projects
Unfortunately it's more involved than #500.
[Miri](https://github.com/rust-lang/miri) can help find undefined behavior in programs which would be helpful. For example I tried it on `parity-crypto` and https://github.com/paritytech/parity-common/issues/472 was detected by Miri However, _Miri is platform-indepedent interpreter...
The correct logic should be "pull codec/std _if codec is enabled_".
If `pos` is ever zero it looks like nasty things could happen (was true before too); can you double-check it cannot be called with `pos` == 0? _Originally posted by...
I noticed the rlp library does currently not detect the following cases as errors when decoding ``` b'\x00\xab', b'\x00\x00\xff', b'\x83dogcat', b'\xc7\xc0\xc1\xc0\xc3\xc0\xc1\xc0\xff', b'\xc7\xc0\xc1\xc0\xc3\xc0\xc1' b'\x81\x02', b'\x81\x54' ``` These are [taken from pyrlp](https://github.com/ethereum/pyrlp/blob/37396698aeb949932e70a53fa10f3046b7915bf3/tests/test_invalid.py#L5-L18)...
As mentioned in https://github.com/paritytech/substrate/pull/6745, this is not future-proof and leads to runtime panics. Instead, if there is no way to compute `malloc_size_of`, we should either make it a compile-time/link-time error,...
I am struggling with primitive-types: ``` cannot use `|=` on type `primitive_types::U256` ``` Is there a work around for using these combined operators? Also is there a simple way to...
This was brought up by @bkchr in https://github.com/paritytech/substrate/pull/5658#pullrequestreview-394463785: > Can we please fix this upstream? > > The design of this crate seems somewhat broken. > > Instead of our...
Imagine the struct: ```rust struct Transaction { hash: B::Hash, } ``` `#[parity_util_mem::MallocSizeOf]` will fail miserably there, because it will add something like that: ```rust impl MallocSizeOf for Transaction where B:...
This would be suitable for a light client in the browser use-case which uses kvdb-web as it's currently loads everything into the memory on open. Here is a draft design...