geth_fine_tune

If we’re a full node on mainnet without –cache specified, bump default cache allowancectx.Set(utils.CacheFlag.Name, strconv.Itoa(4096))

Read article
rust

rust reflect and macro

reflecttrait objectRust provides dynamic dispatch through a feature called trait objects. Trait objects, like &Foo or Box, are normal values that store a value of any type that implements t…

Read article
rust

rust frequently used crates

tokio-trace -> tracing contexts, multi threadscausality -structured diagnostics ( no grep) tracing is part of tokio, tokio not requied spans: a perido of time, entered and exitedevents: sin…

Read article
rust

rust cargo all in one

useful cmd specifying dependencies specifying dependencies from crates.io specifying dependencies from other registries specifying dependencies form git repositories path dependencies platf…

Read article

how to use hexo

Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on Gi…

Read article
rust

rust similar concepts comparison

ref vs &ref annotates pattern bindings to make them borrow rather than move. It is not a part of the pattern as far as matching is concerned: it does not affect whether a value is matched, …

Read article
rust

rust tools

tools cargo-editThis tool extends Cargo to allow you to add, remove, and upgrade dependencies by modifying your Cargo.toml file from the command line cargo whatfeatures ${crate} eg: cargo w…

Read article
rust

rust sugar

formatted print reference syntax attributes memoryThe compiler will not rearrange the memory layout ptr

Read article
rust

cargo doc

文档注释用于生成文档 使用 /// 支持 Markdown 放置在被说没条目之前 例子 命令 常用章节 # Examples Panics: 可能panic的场景 Errors: 如果fn返回Result, 描述可能的错误种类, 以及导致错误的条件 Safety: 如果fn出入unsafe调用, 解释unsafe的原因, 以及调用者确保的使用前提…

Read article
blockchain

rpc

overviewpackage rpc implements bi-directional JSON-RPC 2.0 on multiple transports (http, ws, ipc). After creating a server or client instance, objects can be registered to make them visible…

Read article