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

Strong typing for socket addresses #1786

Closed
appetrosyan opened this issue Jan 10, 2022 · 3 comments
Closed

Strong typing for socket addresses #1786

appetrosyan opened this issue Jan 10, 2022 · 3 comments
Assignees
Labels
Chore This is a small task that can be done at any point in time and is easier than others good first issue Good for newcomers iroha2-dev The re-implementation of a BFT hyperledger in RUST Refactor Improvement to overall code quality

Comments

@appetrosyan
Copy link
Contributor

Currently all socket addresses are stored as strings. This is not ideal, because we don't know if the configuration files should contain the protocol specifier or not. For example, there are many instances in the code, where a string check for presence of http:// is done, and a format pre-pend.

We should probably either use one of the std::net types, or (better), a custom type that can be converted into the types that we need.

@appetrosyan appetrosyan added good first issue Good for newcomers iroha2-dev The re-implementation of a BFT hyperledger in RUST labels Jan 10, 2022
@appetrosyan appetrosyan self-assigned this Jan 13, 2022
@appetrosyan appetrosyan removed the good first issue Good for newcomers label Jan 13, 2022
@appetrosyan
Copy link
Contributor Author

Could benefit from rust-lang/rust#82485

@appetrosyan appetrosyan added the Refactor Improvement to overall code quality label Feb 20, 2022
@appetrosyan appetrosyan added the good first issue Good for newcomers label Apr 19, 2022
@appetrosyan appetrosyan removed their assignment May 8, 2022
@appetrosyan appetrosyan added the Chore This is a small task that can be done at any point in time and is easier than others label Jun 8, 2022
@s8sato
Copy link
Contributor

s8sato commented Aug 30, 2022

I remember I reverted use of std::net::SocketAddr::V4 because it was not SCALE compatible

@appetrosyan
Copy link
Contributor Author

I remember I reverted use of std::net::SocketAddr::V4 because it was not SCALE compatible

True. There's also the question of #[no_std].

The current best solution is to replace the OS-specific implementations of std::net::SocketAddr which remain binary-compatible with standard OS-specific networking libraries, with easily convertible replacements, which also reflect the use inside Iroha.

@QuentinI QuentinI self-assigned this Nov 14, 2022
QuentinI pushed a commit to QuentinI/iroha that referenced this issue Apr 13, 2023
…ddresses

Signed-off-by: Artemii Gerasimovich <gerasimovich@soramitsu.co.jp>
QuentinI pushed a commit to QuentinI/iroha that referenced this issue Apr 13, 2023
…ddresses

Signed-off-by: Artemii Gerasimovich <gerasimovich@soramitsu.co.jp>
QuentinI pushed a commit to QuentinI/iroha that referenced this issue Apr 17, 2023
…ddresses

Signed-off-by: Artemii Gerasimovich <gerasimovich@soramitsu.co.jp>
QuentinI pushed a commit to QuentinI/iroha that referenced this issue Apr 17, 2023
…ddresses

Signed-off-by: Artemii Gerasimovich <gerasimovich@soramitsu.co.jp>
QuentinI pushed a commit to QuentinI/iroha that referenced this issue Apr 17, 2023
…ddresses

Signed-off-by: Artemii Gerasimovich <gerasimovich@soramitsu.co.jp>
QuentinI pushed a commit to QuentinI/iroha that referenced this issue Apr 17, 2023
…ddresses

Signed-off-by: Artemii Gerasimovich <gerasimovich@soramitsu.co.jp>
QuentinI pushed a commit to QuentinI/iroha that referenced this issue Apr 17, 2023
…ddresses

Signed-off-by: Artemii Gerasimovich <gerasimovich@soramitsu.co.jp>
QuentinI pushed a commit to QuentinI/iroha that referenced this issue Apr 17, 2023
…ddresses

Signed-off-by: Artemii Gerasimovich <gerasimovich@soramitsu.co.jp>
QuentinI pushed a commit to QuentinI/iroha that referenced this issue Apr 17, 2023
…ddresses

Signed-off-by: Artemii Gerasimovich <gerasimovich@soramitsu.co.jp>
QuentinI pushed a commit to QuentinI/iroha that referenced this issue Apr 17, 2023
…ddresses

Signed-off-by: Artemii Gerasimovich <gerasimovich@soramitsu.co.jp>
QuentinI pushed a commit to QuentinI/iroha that referenced this issue Apr 17, 2023
…ddresses

Signed-off-by: Artemii Gerasimovich <gerasimovich@soramitsu.co.jp>
QuentinI pushed a commit to QuentinI/iroha that referenced this issue Apr 17, 2023
…ddresses

Signed-off-by: Artemii Gerasimovich <gerasimovich@soramitsu.co.jp>
QuentinI pushed a commit to QuentinI/iroha that referenced this issue Apr 17, 2023
…ddresses

Signed-off-by: Artemii Gerasimovich <gerasimovich@soramitsu.co.jp>
QuentinI pushed a commit to QuentinI/iroha that referenced this issue Apr 17, 2023
…ddresses

Signed-off-by: Artemii Gerasimovich <gerasimovich@soramitsu.co.jp>
QuentinI pushed a commit to QuentinI/iroha that referenced this issue Apr 17, 2023
…ddresses

Signed-off-by: Artemii Gerasimovich <gerasimovich@soramitsu.co.jp>
QuentinI pushed a commit to QuentinI/iroha that referenced this issue Apr 17, 2023
…ddresses

Signed-off-by: Artemii Gerasimovich <gerasimovich@soramitsu.co.jp>
QuentinI pushed a commit to QuentinI/iroha that referenced this issue Apr 20, 2023
…ddresses

Signed-off-by: Artemii Gerasimovich <gerasimovich@soramitsu.co.jp>
QuentinI pushed a commit to QuentinI/iroha that referenced this issue Apr 20, 2023
…ddresses

Signed-off-by: Artemii Gerasimovich <gerasimovich@soramitsu.co.jp>
QuentinI pushed a commit to QuentinI/iroha that referenced this issue Apr 20, 2023
…ddresses

Signed-off-by: Artemii Gerasimovich <gerasimovich@soramitsu.co.jp>
QuentinI pushed a commit to QuentinI/iroha that referenced this issue Apr 20, 2023
…ddresses

Signed-off-by: Artemii Gerasimovich <gerasimovich@soramitsu.co.jp>
QuentinI pushed a commit to QuentinI/iroha that referenced this issue Apr 27, 2023
…ddresses

Signed-off-by: Artemii Gerasimovich <gerasimovich@soramitsu.co.jp>
QuentinI pushed a commit to QuentinI/iroha that referenced this issue Apr 27, 2023
…ddresses

Signed-off-by: Artemii Gerasimovich <gerasimovich@soramitsu.co.jp>
QuentinI pushed a commit to QuentinI/iroha that referenced this issue Apr 27, 2023
…ddresses

Signed-off-by: Artemii Gerasimovich <gerasimovich@soramitsu.co.jp>
QuentinI pushed a commit to QuentinI/iroha that referenced this issue May 17, 2023
…ddresses

Signed-off-by: Artemii Gerasimovich <gerasimovich@soramitsu.co.jp>
QuentinI pushed a commit to QuentinI/iroha that referenced this issue May 17, 2023
…ddresses

Signed-off-by: Artemii Gerasimovich <gerasimovich@soramitsu.co.jp>
QuentinI pushed a commit to QuentinI/iroha that referenced this issue May 17, 2023
…ddresses

Signed-off-by: Artemii Gerasimovich <gerasimovich@soramitsu.co.jp>
QuentinI pushed a commit to QuentinI/iroha that referenced this issue May 17, 2023
…ddresses

Signed-off-by: Artemii Gerasimovich <gerasimovich@soramitsu.co.jp>
QuentinI pushed a commit to QuentinI/iroha that referenced this issue May 17, 2023
…ddresses

Signed-off-by: Artemii Gerasimovich <gerasimovich@soramitsu.co.jp>
QuentinI pushed a commit to QuentinI/iroha that referenced this issue May 17, 2023
…ddresses

Signed-off-by: Artemii Gerasimovich <gerasimovich@soramitsu.co.jp>
QuentinI pushed a commit to QuentinI/iroha that referenced this issue May 17, 2023
…ddresses

Signed-off-by: Artemii Gerasimovich <gerasimovich@soramitsu.co.jp>
QuentinI pushed a commit that referenced this issue May 17, 2023
Signed-off-by: Artemii Gerasimovich <gerasimovich@soramitsu.co.jp>
mversic pushed a commit to mversic/iroha that referenced this issue May 18, 2023
…ddresses

Signed-off-by: Artemii Gerasimovich <gerasimovich@soramitsu.co.jp>
mversic pushed a commit to mversic/iroha that referenced this issue May 18, 2023
…ddresses

Signed-off-by: Artemii Gerasimovich <gerasimovich@soramitsu.co.jp>
mversic pushed a commit to mversic/iroha that referenced this issue May 18, 2023
…ddresses

Signed-off-by: Artemii Gerasimovich <gerasimovich@soramitsu.co.jp>
mversic pushed a commit to mversic/iroha that referenced this issue May 18, 2023
…ddresses

Signed-off-by: Artemii Gerasimovich <gerasimovich@soramitsu.co.jp>
mversic pushed a commit to mversic/iroha that referenced this issue May 18, 2023
…ddresses

Signed-off-by: Artemii Gerasimovich <gerasimovich@soramitsu.co.jp>
appetrosyan pushed a commit that referenced this issue Jun 5, 2023
Signed-off-by: Artemii Gerasimovich <gerasimovich@soramitsu.co.jp>
mversic pushed a commit that referenced this issue Oct 17, 2023
Signed-off-by: Artemii Gerasimovich <gerasimovich@soramitsu.co.jp>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Chore This is a small task that can be done at any point in time and is easier than others good first issue Good for newcomers iroha2-dev The re-implementation of a BFT hyperledger in RUST Refactor Improvement to overall code quality
Projects
None yet
Development

No branches or pull requests

3 participants