Skip to content

Conversation

afck
Copy link
Contributor

@afck afck commented Sep 24, 2025

Backport of #4642.

Motivation

It's hard to tell from wallet show which chain is the admin chain. The table layout uses a lot of horizontal space.

Proposal

Improve the wallet show output:

WALLET (4 chains in total)

Child Chain [DEFAULT]
  Chain ID:     a08244c18c828b7b89289f7164428e0b861fb462042416f6c2cfb1f4b53c8621
  Owner:        0x86843df3f162b0a820724d37612ecde13c9a022d0cc96b765be127d34cec2d19
  Timestamp:    2025-09-24 12:54:53.051239
  Blocks:       0

Admin Chain
  Chain ID:     82fc0ff002b793c66db0c57e657c05a30a98cd49d335f8125d0c3bdc4997ffa1
  Owner:        No owner key
  Timestamp:    2025-09-24 12:53:29.841442
  Blocks:       0

Root Chain 1
  Chain ID:     0b67f224ab915776d170eeb7d497e8d1ed831126f22eaf9138de48e3c47c8639
  Owner:        No owner key
  Timestamp:    2025-09-24 12:55:04.030389
  Blocks:       2
  Latest Block: f67e7ee881b6f9235f1a4cc6f2515d9ce4afccb1bd799f8780987901a581ac03

Child Chain
  Chain ID:     87c4ef0bfc8d6581529dc32c98d05ba99be9e9202f8f788f9c0c2a872c02fdf6
  Owner:        0x9010b58faf7b4908de3069aa7aa042ba4f2eb0de13724059960aaa5be33aa6a6
  Timestamp:    2025-09-24 12:55:04.030389
  Blocks:       0

Test Plan

  • Discuss the new layout!
  • CI
  • I ran the README tests locally.

Release Plan

  • These changes could be backported to testnet_conway, and
  • released in a new SDK.

Links

It's hard to tell from `wallet show` which chain is the admin chain. The
table layout uses a lot of horizontal space.

Improve the `wallet show` output:

```
WALLET (4 chains in total)

Child Chain [DEFAULT]
  Chain ID:     a08244c18c828b7b89289f7164428e0b861fb462042416f6c2cfb1f4b53c8621
  Owner:        0x86843df3f162b0a820724d37612ecde13c9a022d0cc96b765be127d34cec2d19
  Timestamp:    2025-09-24 12:54:53.051239
  Blocks:       0
  Epoch:        0

Admin Chain
  Chain ID:     82fc0ff002b793c66db0c57e657c05a30a98cd49d335f8125d0c3bdc4997ffa1
  Owner:        No owner key
  Timestamp:    2025-09-24 12:53:29.841442
  Blocks:       0
  Epoch:        0

Root Chain 1
  Chain ID:     0b67f224ab915776d170eeb7d497e8d1ed831126f22eaf9138de48e3c47c8639
  Owner:        No owner key
  Timestamp:    2025-09-24 12:55:04.030389
  Blocks:       2
  Epoch:        0
  Latest Block: f67e7ee881b6f9235f1a4cc6f2515d9ce4afccb1bd799f8780987901a581ac03

Child Chain
  Chain ID:     87c4ef0bfc8d6581529dc32c98d05ba99be9e9202f8f788f9c0c2a872c02fdf6
  Owner:        0x9010b58faf7b4908de3069aa7aa042ba4f2eb0de13724059960aaa5be33aa6a6
  Timestamp:    2025-09-24 12:55:04.030389
  Blocks:       0
  Epoch:        0
```

* Discuss the new layout!
* CI
* I ran the README tests locally.

- These changes _could_ be backported to `testnet_conway`, and
- released in a new SDK.

- Original attempt:
linera-io#4541
- [reviewer
checklist](https://github.com/linera-io/linera-protocol/blob/main/CONTRIBUTING.md#reviewer-checklist)
Copy link
Contributor

@MathieuDutSik MathieuDutSik left a comment

Choose a reason for hiding this comment

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

Thanks for the better first line.
But I do not like that some information were removed.
Maybe allow users to add some additional arguments to linera wallet show?

@afck
Copy link
Contributor Author

afck commented Sep 25, 2025

Yes, I'd like a --verbose option in the future.

But: What information was removed?
(Compared to the main branch, I only removed the epoch, because on testnet_conway that isn't in the wallet.)

@ma2bd
Copy link
Contributor

ma2bd commented Sep 25, 2025

I'm not super fond of making "Child chain" an official concept, even for developers.

@ma2bd
Copy link
Contributor

ma2bd commented Sep 25, 2025

Let's finish iterating on this on main first.

@MathieuDutSik
Copy link
Contributor

But: What information was removed? (Compared to the main branch, I only removed the epoch, because on testnet_conway that isn't in the wallet.)

Ok, I see the reason why epoch is removed from the printing. So, approved from my side.

Copy link
Contributor

@MathieuDutSik MathieuDutSik left a comment

Choose a reason for hiding this comment

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

I understand that epoch cannot be shown on the TestNet Conway, which is why it was removed.

There is merit to having enhanced functionality on the TestNet and therefore I approve the PR.

@afck afck marked this pull request as draft September 25, 2025 10:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants