I think in the next major release we should fix the module names for the consensus encodable/decodable traits. Specifically I propose removing the serialize, encodable and consensus_params modules
network::encodable::VarInt -> consensus::encode::VarInt and expose it at the crate level
network::encodable::VarInt -> consensus::encode::CheckedData
network::consensus_params -> consensus::params
network::consensus_params::ConsensusParams -> consensus::params::Params
network::encodable::ConsensusEncodable -> consensus::encode::Encodable but expose it as consensus::Encodable
network::encodable::ConsensusDecodable -> consensus::encode::Decodable but expose it as consensus::Decodable
network::seriailize::Error -> consensus::encode::Error
network::serialize::BitcoinHash -> util::hash::BitcoinHash and expose it at crate level
network::serialize::RawEncoder -> consensus::encode::RawEncoder and expose it as consensus::RawEncoder
network::serialize::RawDecoder -> consensus::encode::RawDecoder and expose it as consensus::RawDecoder
network::serialize::SimpleEncoder -> consensus::encode::Encoder and expose it as consensus::Encoder
network::serialize::SimpleDecoder -> consensus::encode::Decoder and expose it as consensus::Decoder
Finally, we should deprecate everything in network::socket and network::listener because low-level networking is out of scope for this library. That leaves only p2p network messages under network, which is good. (Though we should also rename/restructure the modules there - I'll open yet another issue about that.)
Unrelatedly, we should also delete nu_select from macros.rs because this is horribly bitrotted and I doubt it even compiles anymore.
I think in the next major release we should fix the module names for the consensus encodable/decodable traits. Specifically I propose removing the
serialize,encodableandconsensus_paramsmodulesnetwork::encodable::VarInt->consensus::encode::VarIntand expose it at the crate levelnetwork::encodable::VarInt->consensus::encode::CheckedDatanetwork::consensus_params->consensus::paramsnetwork::consensus_params::ConsensusParams->consensus::params::Paramsnetwork::encodable::ConsensusEncodable->consensus::encode::Encodablebut expose it asconsensus::Encodablenetwork::encodable::ConsensusDecodable->consensus::encode::Decodablebut expose it asconsensus::Decodablenetwork::seriailize::Error->consensus::encode::Errornetwork::serialize::BitcoinHash->util::hash::BitcoinHashand expose it at crate levelnetwork::serialize::RawEncoder->consensus::encode::RawEncoderand expose it asconsensus::RawEncodernetwork::serialize::RawDecoder->consensus::encode::RawDecoderand expose it asconsensus::RawDecodernetwork::serialize::SimpleEncoder->consensus::encode::Encoderand expose it asconsensus::Encodernetwork::serialize::SimpleDecoder->consensus::encode::Decoderand expose it asconsensus::DecoderFinally, we should deprecate everything in
network::socketandnetwork::listenerbecause low-level networking is out of scope for this library. That leaves only p2p network messages undernetwork, which is good. (Though we should also rename/restructure the modules there - I'll open yet another issue about that.)Unrelatedly, we should also delete
nu_selectfrommacros.rsbecause this is horribly bitrotted and I doubt it even compiles anymore.