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

chore(Ledger-Suite): FI-1502 move icp and icrc ledger suites #1682

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

NikolasHai
Copy link
Contributor

@NikolasHai NikolasHai commented Sep 25, 2024

This MR proposes the following changes:

  1. Move the ledger suite of icp to its designated subdirectory

  2. Move the ledger suite for icrc1 to its designated subdirectory

This MR is part of an effort to restructe the subdirectory rs/rosetta-api into two logically separate subdirectories:

  • rs/rosetta-api: Rosetta related code
  • rs/ledger_suite: ICP and ICRC1 ledger related code.
    This MR only moves code into a new directory and changes dependencies accordingly.

Copy link
Member

@mbjorkqvist mbjorkqvist left a comment

Choose a reason for hiding this comment

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

Thanks a lot for taking on this task, @NikolasHai! This looks very good, although the sheer amount of changes is causing the github webui to be quite slow! I left comments mainly around the following:

  • Changes to archived proposal .md files from the cross-chain team should be reverted
  • Dependencies in BUILD.bazel files need to be re-sorted (I commented on a few only, but the CI buildifier job should anyway catch them)
  • A few unrelated rosetta-changes seem to have snuck in
  • Some guides that give an example git commit, plus a command related to a soon-to-be-changed path, will need to be changed in a follow-up PR once this PR has been merged and we know of a valid git commit that could be set in those guides
  • A couple of rosetta-related directories are now under rs/ledger_suites, is that on purpose? I didn't dig into it, but they would seem to fit better under rs/rosetta-api

.github/workflows/rosetta-release.yml Show resolved Hide resolved
Copy link
Member

Choose a reason for hiding this comment

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

Most of the changes in this file are due to formatting (which does make sense, it makes the file much more readable!), but it makes it more difficult to review related to the refactoring in this PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I would assume they are due to automatic reformatting. I did not actively touch them.

rs/bitcoin/ckbtc/mainnet/ckbtc_index_upgrade_2024_08_23.md Outdated Show resolved Hide resolved
rs/rosetta-api/tests/system_tests/common/utils.rs Outdated Show resolved Hide resolved
rs/rosetta-api/tests/system_tests/test_cases/mod.rs Outdated Show resolved Hide resolved
rs/ledger_suite/icp/rosetta-integration-tests/BUILD.bazel Outdated Show resolved Hide resolved
rs/ledger_suite/icrc1/rosetta/BUILD.bazel Outdated Show resolved Hide resolved
@NikolasHai
Copy link
Contributor Author

Thanks a lot for taking on this task, @NikolasHai! This looks very good, although the sheer amount of changes is causing the github webui to be quite slow! I left comments mainly around the following:

* Changes to archived proposal `.md` files from the cross-chain team should be reverted

* Dependencies in `BUILD.bazel` files need to be re-sorted (I commented on a few only, but the CI `buildifier` job should anyway catch them)

* A few unrelated rosetta-changes seem to have snuck in

* Some guides that give an example git commit, plus a command related to a soon-to-be-changed path, will need to be changed in a follow-up PR once this PR has been merged and we know of a valid git commit that could be set in those guides

* A couple of rosetta-related directories are now under `rs/ledger_suites`, is that on purpose? I didn't dig into it, but they would seem to fit better under `rs/rosetta-api`

Thanks for taking a look.

  1. Thanks for catching that, I'll revert that
  2. I'll run the buildifier, I believe sorting should be done with the tool you sent me the other day. WDYT?
  3. I wanted to base this branch on the one for neuron management change so I would not have to resolve the MR conflicts again once I merged that one, but I think it does not really matter. I will have MR conflicts no matter what. I will revert those changes.
  4. Do you know which guides those would be?
  5. Yes that is on purpose because I will move ICRC rosetta in a follow up MR. I wanted to make two, one for the ledgers and one for rosetta.

@NikolasHai NikolasHai marked this pull request as ready for review September 26, 2024 19:52
@NikolasHai NikolasHai requested review from a team as code owners September 26, 2024 19:52
@tmu0
Copy link
Contributor

tmu0 commented Sep 27, 2024

@NikolasHai I think you can revert the changes under ci/src/dependencies. This is just some test data that was generated out of an earlier version of the repo. It must not be kept up-to-date.

@@ -46,13 +46,13 @@ impl TargetCanister {
pub fn candid_file(&self) -> PathBuf {
match &self {
TargetCanister::CkBtcArchive | TargetCanister::CkEthArchive => {
PathBuf::from("rs/rosetta-api/icrc1/archive/archive.did")
PathBuf::from("rs/ledger_suite/icrc1/archive/archive.did")
Copy link
Member

Choose a reason for hiding this comment

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

@mbjorkqvist @NikolasHai : One drawback here is that if one were to try to make a proposal for a commit that pre-dates this moving, then this will fail because the tool will look for a file rs/ledger_suite/icrc1/archive/archive.did which is actually at rs/rosetta-api/icrc1/archive/archive.did. Solving this would require a bit more work (one would need to determine if the target commit is before or after this move) but I have the impression that it's not worth it ( we usually make upgrade proposals for new versions, not commit that are a lot in the past). In the worst case, one would need to use this tool at the same commit one wants to upgrade the canister to. WDYT?

Copy link
Member

Choose a reason for hiding this comment

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

Good catch, thanks @gregorydemay! Another issue is with the git log command in the proposal cli that would for the next version(s) probably need to look in both places?

Copy link
Member

Choose a reason for hiding this comment

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

Another issue is with the git log command in the proposal cli that would for the next version(s) probably need to look in both places?

yes, that's also a good point. Also here I have the impression that this would be a one-off issue so doing the proper solution here might not be worth it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants