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

feat!: change tar address to use base58 and not hex #6372

Merged
merged 9 commits into from
Jun 25, 2024

Conversation

SWvheerden
Copy link
Collaborator

Description

Remove hex display from tari address
Use Base 58 encoding instead.
Keeps the network and features human readable

Motivation and Context

reduces the display size from 134 chars, down to 92

How Has This Been Tested?

unit tests and manual

Copy link

github-actions bot commented Jun 18, 2024

Test Results (CI)

    3 files    120 suites   45m 16s ⏱️
1 295 tests 1 295 ✅ 0 💤 0 ❌
3 877 runs  3 877 ✅ 0 💤 0 ❌

Results for commit 3538e6f.

♻️ This comment has been updated with latest results.

@ghpbot-tari-project ghpbot-tari-project added P-acks_required Process - Requires more ACKs or utACKs P-reviews_required Process - Requires a review from a lead maintainer to be merged labels Jun 18, 2024
Copy link

github-actions bot commented Jun 18, 2024

Test Results (Integration tests)

 2 files  11 suites   33m 15s ⏱️
35 tests 34 ✅ 0 💤 1 ❌
37 runs  35 ✅ 0 💤 2 ❌

For more details on these failures, see this check.

Results for commit 3538e6f.

♻️ This comment has been updated with latest results.

@SWvheerden SWvheerden requested a review from a team as a code owner June 20, 2024 08:57
@hansieodendaal
Copy link
Contributor

Some clippy and compile issues?

hansieodendaal
hansieodendaal previously approved these changes Jun 20, 2024
Copy link
Contributor

@hansieodendaal hansieodendaal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK

Comment on lines +183 to +188
let bytes = self.to_bytes();
let mut network = bs58::encode(&bytes[0..1]).into_string();
let features = bs58::encode(&bytes[1..2].to_vec()).into_string();
let rest = bs58::encode(&bytes[2..]).into_string();
network.push_str(&features);
network.push_str(&rest);
network
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NIT: I still think this reads better

Suggested change
let bytes = self.to_bytes();
let mut network = bs58::encode(&bytes[0..1]).into_string();
let features = bs58::encode(&bytes[1..2].to_vec()).into_string();
let rest = bs58::encode(&bytes[2..]).into_string();
network.push_str(&features);
network.push_str(&rest);
network
let bytes = self.to_bytes();
let network = bs58::encode(&bytes[0..1]).into_string();
let features = bs58::encode(&bytes[1..2].to_vec()).into_string();
let rest = bs58::encode(&bytes[2..]).into_string();
let mut address = "".into_string();
address.push_str(&network);
address.push_str(&features);
address.push_str(&rest);
address

@ghpbot-tari-project ghpbot-tari-project removed P-reviews_required Process - Requires a review from a lead maintainer to be merged labels Jun 20, 2024
@SWvheerden SWvheerden changed the title feat: change tar address to use base58 and not hex feat!: change tar address to use base58 and not hex Jun 20, 2024
@ghpbot-tari-project ghpbot-tari-project added the P-reviews_required Process - Requires a review from a lead maintainer to be merged label Jun 20, 2024
@hansieodendaal
Copy link
Contributor

Some cucumber tests are still failing

hansieodendaal
hansieodendaal previously approved these changes Jun 24, 2024
Copy link
Contributor

@hansieodendaal hansieodendaal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK

@ghpbot-tari-project ghpbot-tari-project removed the P-reviews_required Process - Requires a review from a lead maintainer to be merged label Jun 24, 2024
@ghpbot-tari-project ghpbot-tari-project added the P-reviews_required Process - Requires a review from a lead maintainer to be merged label Jun 24, 2024
@SWvheerden SWvheerden merged commit f42a838 into tari-project:development Jun 25, 2024
14 of 16 checks passed
@SWvheerden SWvheerden deleted the sw_change_base58 branch June 25, 2024 06:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P-acks_required Process - Requires more ACKs or utACKs P-reviews_required Process - Requires a review from a lead maintainer to be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants