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

Refactor and reduce technical debt #464

Closed
Tracked by #6938
fxamacker opened this issue Nov 26, 2024 · 4 comments
Closed
Tracked by #6938

Refactor and reduce technical debt #464

fxamacker opened this issue Nov 26, 2024 · 4 comments

Comments

@fxamacker
Copy link
Member

fxamacker commented Nov 26, 2024

Refactoring and reducing technical debt increases productivity and reduces risks.

It would be good to refactor before adding new features and optimizations like Lazy Decoding (which was postponed since 2023-Q4 OKR due to higher priority projects like Crescendo migrations and Atree releases).

I had postponed some refactoring as a tradeoff due to deadlines, higher priority work, etc.

Status

Completed. 🎉 Around 26074 insertions(+), 26002 deletions in ~97 files.

We made a lot of improvements and have bigger fish to fry.

This refactoring was briefly smoke tested on my desktop with no problems detected.

Also, backward compatibility tests succeeded using:

  • 1 million mainnet blocks (on March 5, 2025).
  • 1 million testnet blocks (on March 6, 2025).

Thank you @turbolent for all the PR reviews!

Progress

Delayed start: this was postponed until Jan 22, 2025 because of higher priority urgent work from Dec 20 - Jan 22 in private repos (debug/identify/fix security bug, contribute ~9500 lines of code that got ported to 2 public repos, detailed non-public PR reviews, etc.)

Since Jan 22, first phase refactored unit tests and smoke tests.

🔍 Refactoring tests

Image

From Feb 12-14, second phase refactored non-test code.

🔍 Refactoring non-test code

Image

Next, from Feb 24 - Mar 4: resume refactoring to simplify and use newer Go programming language features, etc. Also run brief smoke tests as sanity check.

🔍 Resume and wrap up refactoring (mostly) non-test code

Image

Caveats

We should run longer smoke tests after all PRs are merged and before next release tag.

After this issue is completed, immediately starting work on Lazy Decoding (approved OKR postponed since 2023) will save time and money by avoiding re-rampup time.

@fxamacker
Copy link
Member Author

fxamacker commented Jan 14, 2025

This was postponed due to more urgent work (e.g. work with Cadence team since Friday Dec. 20, 2024).

@fxamacker fxamacker mentioned this issue Jan 22, 2025
6 tasks
@fxamacker
Copy link
Member Author

The last PR (#534) and some of the prior PRs were briefly smoke tested with no problems detected. However, longer smoke tests should be run before next Atree release tag.

fxamacker added a commit to onflow/cadence that referenced this issue Mar 5, 2025

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
This is to test atree refactoring PRs 475 to 534 for
onflow/atree#464
fxamacker added a commit to onflow/flow-go that referenced this issue Mar 5, 2025

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
This is to test atree refactoring PRs 475 to 534 for
onflow/atree#464
@fxamacker
Copy link
Member Author

The last PR (#534) passed backward compatibility test using:

  • 1 million mainnet blocks (on March 5, 2025).
  • 1 million testnet blocks (on March 6, 2025).

@fxamacker
Copy link
Member Author

Closing this as completed. I will reopen (or open new issue) if longer smoke testing on gcp finds anything.

So far, brief smoke tests on my desktop didn't find any problems.

cc: @j1010001

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

No branches or pull requests

2 participants