Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

abci: Add domain types #862

Closed

Commits on Nov 16, 2021

  1. Configuration menu
    Copy the full SHA
    3fa00dc View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    69f0082 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c43a78e View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    57dd21b View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    d6c8395 View commit details
    Browse the repository at this point in the history
  6. Update imports to reflect protobuf movements.

    The BlockParams and ConsensusParams structs moved out of the ABCI
    protos.
    hdevalence committed Nov 16, 2021
    Configuration menu
    Copy the full SHA
    39a9bd4 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    6e48efa View commit details
    Browse the repository at this point in the history
  8. p2p: treat all non-Ed25519 keys as unsupported

    This fixes a compile error introduced by upstream proto changes that add
    an Sr25519 variant.
    hdevalence committed Nov 16, 2021
    Configuration menu
    Copy the full SHA
    ee4c84a View commit details
    Browse the repository at this point in the history
  9. Improve ABCI response code modeling with NonZeroU32

    The previous data modeling allowed a user to construct an `Err(0)` value that
    would be serialized and deserialized as `Ok`.
    hdevalence committed Nov 16, 2021
    Configuration menu
    Copy the full SHA
    d9ed69a View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    4f47712 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    156cce9 View commit details
    Browse the repository at this point in the history
  12. tendermint: define Serde for Block in terms of RawBlock

    This changes the Serialize/Deserialize implementations for Block to convert
    to/from the proto-generated `RawBlock`, and use the derived serialization for
    that type.
    
    This is much cleaner and more maintainable than keeping Serde annotations for
    each sub-member of the data structure, because all of the serialization code is
    kept in one place, and there's only one validation path (the TryFrom conversion
    from RawBlock to Block) that applies to both kinds of serialization.
    hdevalence committed Nov 16, 2021
    Configuration menu
    Copy the full SHA
    89e6659 View commit details
    Browse the repository at this point in the history
  13. tendermint: simpler transaction modeling in Block

    This changes the Block type to hold the transactions as a plain
    `Vec<Vec<u8>>`, rather than as a custom `abci::transaction::Data` type
    (which is itself a wrapper for an `Option<Vec<Transaction>>`, the
    `Transaction` type being a wrapper for a `Vec<u8>`).
    
    This also updates the `Block` getter functions; it's not clear (to me)
    why they're there, since they access the public fields and aren't used
    anywhere else.
    hdevalence committed Nov 16, 2021
    Configuration menu
    Copy the full SHA
    9beadce View commit details
    Browse the repository at this point in the history
  14. rpc: take over tendermint::abci

    The existing contents of the `tendermint::abci` module note that they're
    only for the purpose of implementing the RPC endpoints, not a general
    ABCI implementation.
    
    Moving that code from the `tendermint` crate to the `tendermint-rpc`
    crate decouples the RPC interface from improvements to the ABCI domain
    modeling. Eventually, it would be good to eliminate this code and align
    it with the new ABCI domain types.
    hdevalence committed Nov 16, 2021
    Configuration menu
    Copy the full SHA
    ecc309d View commit details
    Browse the repository at this point in the history
  15. tendermint: add ABCI domain types.

    These types mirror the generated types in tendermint_proto, but have better
    naming.
    
    The documentation for each request type is adapted from the ABCI Methods and
    Types spec document. However, the same logical request may appear three
    times, as a struct with the request data, as a Request variant, and as a
    CategoryRequest variant.
    
    To avoid duplication, this PR uses the `#[doc = include_str!(...)]`
    functionality stabilized in Rust 1.54 to keep common definitions of the
    documentation.
    hdevalence committed Nov 16, 2021
    Configuration menu
    Copy the full SHA
    28682cd View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    0dcdc6f View commit details
    Browse the repository at this point in the history
  17. Merge abci::params::ConsensusParams with consensus::Params.

    The code in the `abci` module had more complete documentation from the ABCI
    docs, so I copied it onto the existing structure.
    hdevalence committed Nov 16, 2021
    Configuration menu
    Copy the full SHA
    4dbbbd0 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    3c5eff5 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    1f1a4c8 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    9660feb View commit details
    Browse the repository at this point in the history