Code Monkey home page Code Monkey logo

cita-common's Introduction

Libraries for CITA

CircleCI codecov

This repository is a collection of crates used by microservices in CITA.

Crates below are extracted from Parity:

  • rlp

License FOSSA Status

Same as CITA

cita-common's People

Contributors

a186r avatar ashchan avatar bcdevhz avatar boundless-forest avatar classicalliu avatar dependabot-support avatar dependabot[bot] avatar driftluo avatar eighteenzi avatar jerry-sl avatar jerry-yu avatar jjyr avatar kaikai1024 avatar kayryu avatar keroro520 avatar leeyr338 avatar luqz avatar pencil-yao avatar rainchen avatar rink1969 avatar suyanlong avatar thewawar avatar u2 avatar vinberm avatar volzkzg avatar wzf2020 avatar yangby-cryptape avatar zeroqn avatar zhangsoledad avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cita-common's Issues

Upgrade `ethereum-types`

Used by cita-types:

  • 0.3.2 -> 0.5.2
warning: use of deprecated item 'ethereum_types::clean_0x': out of scope for fixed-hash

#266

Fix allow clippy

Fix clippy large_enum_variant

Description

Fix all large_enum_variant lint code in cita-common.

  • jsonrpc-types

Message Refactor: flattening message

  • Remove redundant data and worthless functions.
    • Remove redundant enum MsgType and worthless functions (topic_to_string, id_to_key, de_cmd_id, display_cmd).
    • Remove cmd_id (submodules and topics) from communication messages.
  • Make code more readable.
    • Change global functions for communication message to be class functions.
    • Use the same name for same thing in different places.
    • Standardize routing keys (Use the format as PublisherSubModule.ClassType).
  • Reduce uncompress and deserialize.
    • Use routing keys to distribute messages and detect types.
    • Use fixed-length format messages for communication (Set or get Origin and OperateType directly).
    • Parse SignedProposal directly.
  • Others.
    • Implement convert traits for protos.
    • Lots traits or functions will be generated automatically by a script.
    • Move all generated source codes into a separated directory.
    • Add some unit tests.

Add clippy support

  • cita-common-benches
  • cita-types
  • logger
  • panic_hook
  • worker
  • error
  • snappy
  • cita-directories
  • cita-crypto-trait
  • ethcore-bloom-journal
  • rlp
  • rlp_derive
  • authority_manage
  • pubsub_rabbitmq
  • pubsub_zeromq
  • pubsub_kafka
  • pubsub
  • blake2b
  • util
  • jsonrpc-types
  • cita-web3
  • hashable
  • cita-merklehash
  • db
  • cita-secp256k1
  • cita-ed25519
  • cita-sm2
  • cita-crypto
  • libproto
  • proof
  • tx_pool
  • jsonrpc-proto
  • engine

Upgrade `sodiumoxide`

to 0.2.2

error[E0432]: unresolved import `self::hashable::HASH_NULL_RLP`
  --> /home/kaikai/.cargo/git/checkouts/cita-common-1aad419f3e80ba17/6e6ac14/cita-merklehash/src/lib.rs:27:9
   |
27 | pub use self::hashable::HASH_NULL_RLP as HASH_NULL;
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `HASH_NULL_RLP` in the root

error[E0599]: no method named `crypt_hash` found for type `std::vec::Vec<u8>` in the current scope
  --> /home/kaikai/.cargo/git/checkouts/cita-common-1aad419f3e80ba17/6e6ac14/cita-merklehash/src/lib.rs:43:18
   |
43 |     stream.out().crypt_hash()
   |                  ^^^^^^^^^^

Failed to run the cita-web3 example

Env

  • Ubuntu 18.04
$ cargo version
cargo 1.38.0-nightly (677a180f4 2019-07-08)

$ rustc --version
rustc 1.38.0-nightly (69656fa4c 2019-07-13)
     
$ rustup --version
rustup 1.19.0 (2af131cf9 2019-09-08)

command

cargo run --example query_height http://MY_ADDR:PORT

Error info:

Compiling futures-cpupool v0.1.8 (registry `https://mirrors.ustc.edu.cn/crates.io-index/`)
error: failed to run custom build command for `openssl v0.9.24 (registry `https://mirrors.ustc.edu.cn/crates.io-index/`)`

Caused by:
  process didn't exit successfully: `/home/flyq/workspaces/cita/cita-common/target/debug/build/openssl-aa083da41679e6c3/build-script-build` (exit code: 101)
--- stderr
thread 'main' panicked at 'Unable to detect OpenSSL version', /home/flyq/.cargo/registry/src/mirrors.ustc.edu.cn-b63e9dae659fc205/openssl-0.9.24/build.rs:16:14
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

warning: build failed, waiting for other jobs to finish...
error: build failed

relate

paritytech/substrate#800
paritytech/substrate#886

Upgrade rust toolchain to stable

Since we put lots of crates in this repository, and we update this repository too often recently, so it will be a hard job.

I think we should split this big job into several jobs:

  • Remove some unstable #![feature] and #![rustfmt_skip]. (#196)
  • Remove the features which still are unstable, such as TryInto and TryFrom, write code to replace them. (#197)
  • Upgrade the rust to stable. (#198)
    Some features was stable, now, for example: proc-macro.

Split crates

I consider we could move kvdb in a separate crate. What about removing the avl or moving to another repo firstly, because it is written base on the trie, it's not well designed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.