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

Refactor: binary-sv2::no-serde-sv2::codec crate #1132

Open
rrybarczyk opened this issue Aug 21, 2024 · 1 comment
Open

Refactor: binary-sv2::no-serde-sv2::codec crate #1132

rrybarczyk opened this issue Aug 21, 2024 · 1 comment
Labels
binary-sv2 protocols Lowest level protocol logic refactor Implies refactoring code

Comments

@rrybarczyk
Copy link
Collaborator

Background

This task is an outcome of the protocols Rust docs issues tracked in #845.

While documenting protocols::v2::binary-sv2::no-serde-sv2::codec in #1009, areas of potential code debt were identified. This issue servers as a place to list out these items to then be addressed in an organized manner. The initial Rust documentation effort was an immediate action, while a refactoring (which implies breaking API changes) is not so urgent priority, so for now we should leave this in the backlog for an appropriate moment in the future.

Identified Potential Code Debt

TODO

@rrybarczyk rrybarczyk added refactor Implies refactoring code protocols Lowest level protocol logic binary-sv2 labels Aug 21, 2024
@rrybarczyk rrybarczyk changed the title Refactor: binary-sv2/no-serde-sv2/codec crate Refactor: binary-sv2::no-serde-sv2::codec crate Aug 21, 2024
@Shourya742
Copy link
Contributor

Remove unused trait Variable

pub trait Variable {
    const HEADER_SIZE: usize;
    //const ELEMENT_SIZE: usize;
    const MAX_SIZE: usize;

    fn inner_size(&self) -> usize;

    // That could be [u8; Self::HEADER_SIZE] but rust do not allow it
    fn get_header(&self) -> Vec<u8>;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
binary-sv2 protocols Lowest level protocol logic refactor Implies refactoring code
Projects
None yet
Development

No branches or pull requests

2 participants