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: extend forest-cli chain head #4952

Merged
merged 2 commits into from
Oct 30, 2024
Merged

feat: extend forest-cli chain head #4952

merged 2 commits into from
Oct 30, 2024

Conversation

LesnyRumcajs
Copy link
Member

@LesnyRumcajs LesnyRumcajs commented Oct 29, 2024

Summary of changes

Changes introduced in this pull request:

  • adds forest-cli chain head --tipsets [and -n] option, which allows for printing multiple last tipsets
  • breaking change as I added epoch label
❯ forest-cli chain head
[2097089]
bafy2bzaceajfbzlhuwudsdu3swuhgys2govtyel46akjdbarq2752w7cz7gde
bafy2bzaceapu74bbaxoftc76qbez7vr5a3hmkjcxjfk5pofufwv3wnlk36b3w
bafy2bzaceb2372awzqenvkdgpnkt34ssz64redtf4qb2ewugzbbpekl4kfftq
bafy2bzacebzh3llwhllzxsremaop4u37kbm4quu5bpjiwuoagzgmudmmwsywo
❯ forest-cli chain head -n 5
[2097089]
bafy2bzaceajfbzlhuwudsdu3swuhgys2govtyel46akjdbarq2752w7cz7gde
bafy2bzaceapu74bbaxoftc76qbez7vr5a3hmkjcxjfk5pofufwv3wnlk36b3w
bafy2bzaceb2372awzqenvkdgpnkt34ssz64redtf4qb2ewugzbbpekl4kfftq
bafy2bzacebzh3llwhllzxsremaop4u37kbm4quu5bpjiwuoagzgmudmmwsywo
[2097088]
bafy2bzacecxn5fuwwrhanvut4sisoe6ubp64kguhjalmawt6bdqxwvde6n4pe
bafy2bzacebbcf4xzbzfge7hqri3pa2ladnk4urqmlg24nmqdw3v2dzlzu35ia
bafy2bzacebv73y7v42f6nv2rinmfkuoaubmamz5uqsrsp5xe2g6dogsl7uiei
bafy2bzacecmxda677fteaap73ot6pfugcg4ixhsy2axyfnowjxvihg5pf4jds
[2097087]
bafy2bzaceckhkuybrh5uxzubse33kpeyeddzhmt5f3p23myh75c6cr4gnq3jk
bafy2bzacebu7pg2ne3b7tssw4dlf4jmflpid735nwn3rdlqgevzal36o6v5kg
bafy2bzaceblhetqnlhrhedt4hqzypnl4s6kbyqijbklqzl5nqy7euzu4v4qxc
bafy2bzacecwmdjo4zlagcqoqrd47iudkej5z5lzjbunhobxtzyucccjoptldw
[2097086]
bafy2bzaced5nc6tiaa2sada3qee3lveu5jhh45ouec7nwn74fe4nzadkxswg6
bafy2bzacecrna54zlij2gbtzuetliselajexb2nptzqzujdzpggh5wwxwkqq4
bafy2bzacec7iysjbauybb3ooiohgrxqkibuwiqhjno4p5xfqaycc6ur4jvow6
[2097085]
bafy2bzaceae3zvxgzqukg5sznohxozvz3ykf2rnyhthc5zs3lyhy3fneofnvo
bafy2bzacedckvm74g2tsr2vyqgay6xtljwh5xgem66hvri3dy65jmv5mdp6ac
bafy2bzacedat26oxwybmxqxqhzfvn3hspvoknvmgiqr2dvpx7ijagt5ggqu2m

Reference issue to close (if applicable)

Closes

Other information and links

Change checklist

  • I have performed a self-review of my own code,
  • I have made corresponding changes to the documentation. All new code adheres to the team's documentation standards,
  • I have added tests that prove my fix is effective or that my feature works (if possible),
  • I have made sure the CHANGELOG is up-to-date. All user-facing changes should be reflected in this document.

@LesnyRumcajs LesnyRumcajs marked this pull request as ready for review October 29, 2024 22:01
@LesnyRumcajs LesnyRumcajs requested a review from a team as a code owner October 29, 2024 22:01
@LesnyRumcajs LesnyRumcajs requested review from elmattic and sudo-shashank and removed request for a team October 29, 2024 22:01
@LesnyRumcajs LesnyRumcajs force-pushed the extend-chain-head branch 2 times, most recently from 17e6db0 to 6a2ecdd Compare October 29, 2024 22:24
@LesnyRumcajs LesnyRumcajs marked this pull request as draft October 29, 2024 23:10
@hanabi1224
Copy link
Contributor

It'd be great to support --format json (Not necessarily in this PR)

@LesnyRumcajs
Copy link
Member Author

LesnyRumcajs commented Oct 30, 2024

It'd be great to support --format json (Not necessarily in this PR)

Totally agree, not only for this subcommand but also for some others.

Added with low priority here #4954. It's nice to have, but so far, nobody needs it. And even in our CI, there was a single usage of it.

@LesnyRumcajs LesnyRumcajs marked this pull request as ready for review October 30, 2024 09:03
@LesnyRumcajs
Copy link
Member Author

@hanabi1224 I removed the edge case in f5d1adb, it was an artefact from a different approach. with saturating_sub it's not needed.

@ruseinov ruseinov self-requested a review October 30, 2024 11:33
@ruseinov ruseinov added this pull request to the merge queue Oct 30, 2024
Merged via the queue into main with commit cbf0eeb Oct 30, 2024
35 checks passed
@ruseinov ruseinov deleted the extend-chain-head branch October 30, 2024 11:51
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