|
1 | 1 | # Migrations |
2 | 2 |
|
3 | | -| Tag | Migration | Date | Summary | |
4 | | -| ------ | ------------------------------------------------------------------------------------------------------------------ | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------- | |
5 | | -| v2.0.0 | [Second Release](https://github.com/TrueBlocks/trueblocks-core/blob/develop/src/other/migrations/README-v2.0.0.md) | 2023/11/14 | Improvements to `chifra scrape`, `chifra monitors`, `chifra init`, and `chifra chunks`<br>primarily, including certain breaking changes. | |
6 | | -| v1.0.0 | First Official Release | 2023/09/01 | Feature complete. Our first official release (requires no migration over v0.85.0). | |
7 | | - |
8 | | ---- |
9 | | -## For migrations prior to version v1.0.0 |
10 | | - |
11 | | -Migrations prior to version v1.0.0 are no longer supported. If your data is this older than v1.0.0, you must remove your existing caches and indexes. Do so by running this command: |
12 | | - |
13 | | -``` |
14 | | -chifra config --paths |
15 | | -``` |
16 | | - |
17 | | -and then removing the folders presented. Do this only if your data is prior to version 1.0.0. You may make a backup if you wish, but these older files are no longer useful for `chifra`. |
18 | | - |
19 | | -## Unsupported Migration |
20 | | - |
21 | | -| Tag | Migration | Date | Summary | |
22 | | -| ------- | --------------------------------------------------------------------------------------------------------------------------------- | ---------- | ------------------------------------------------------------------------------------------------------- | |
23 | | -| v0.85.0 | [Release Candidate 1](https://github.com/TrueBlocks/trueblocks-core/blob/develop/src/other/migrations/README-v0.85.0.md) | 2023/08/15 | Feature complete. Proposed release prior to version v1.0.0. | |
24 | | -| v0.70.0 | [Update to Unchained Index](https://github.com/TrueBlocks/trueblocks-core/blob/develop/src/other/migrations/README-v0.70.0.md) | 2023/05/26 | Corrects certain previously incorrect chunks in the unchained index. | |
25 | | -| v0.60.0 | [Many GoLang Ports](https://github.com/TrueBlocks/trueblocks-core/blob/develop/src/other/migrations/README-v0.60.0.md) | 2023/03/11 | Two options migrations for two very specific, small edge cases. | |
26 | | -| v0.45.0 | [Better Docker](https://github.com/TrueBlocks/trueblocks-core/blob/develop/src/other/migrations/README-v0.45.0.md) | 2022/12/16 | Much better support for use in the docker version (more coming soon). | |
27 | | -| v0.44.0 | [Scraper Bug Fix](https://github.com/TrueBlocks/trueblocks-core/blob/develop/src/other/migrations/README-v0.44.0.md) | 2022/11/25 | Fixes a bug related to scraping at the head of the chain. | |
28 | | -| v0.43.0 | [Better Accounting](https://github.com/TrueBlocks/trueblocks-core/blob/master/CHANGES.md#v0430) | 2022/11/16 | No migrations, but a lot of improvements to the accounting modules. | |
29 | | -| v0.41.0 | [GoLang Port for Receipts](https://github.com/TrueBlocks/trueblocks-core/blob/master/CHANGES.md#v0410) | 2022/10/20 | No migrations, but there were some breaking changes. | |
30 | | -| v0.40.0 | [Better Scraper](https://github.com/TrueBlocks/trueblocks-core/blob/develop/src/other/migrations/README-v0.40.0.md) | 2022/06/20 | Updates file format of index and Bloom filters to include version, fixes incorrect data in index. | |
31 | | -| v0.30.0 | [Much Better Monitors](https://github.com/TrueBlocks/trueblocks-core/blob/develop/src/other/migrations/README-v0.30.0.md) | 2022/04/16 | Changes monitor file format. Ports scan of index to GoLang. Improves speed of scan by more than 25x | |
32 | | -| v0.25.0 | [Multi Chain](https://github.com/TrueBlocks/trueblocks-core/blob/develop/src/other/migrations/README-v0.25.0.md) | 2022/02/22 | Adds `--chain` option to all commands. Now supports any EVM-based chain. | |
33 | | -| v0.18.0 | [Better Neighbors](https://github.com/TrueBlocks/trueblocks-core/blob/develop/src/other/migrations/README-v0.18.0.md) | 2021/12/10 | Cleans up `chifra export --neighbors` output<br />- Corrects incorrect headers in .txt and .csv export. | |
34 | | -| v0.17.0 | [Updated API and SDK](https://github.com/TrueBlocks/trueblocks-core/blob/develop/src/other/migrations/README-v0.17.0.md) | 2021/11/23 | Creates TypeScript SDK and forces all API endpoint options to camelCase. | |
35 | | -| v0.14.0 | [goLang version of Chifra](https://github.com/TrueBlocks/trueblocks-core/blob/develop/src/other/migrations/README-v0.14.0.md) | 2021/10/03 | Ports chifra command line to golang<br />- Breaking change to --verbose flag. | |
36 | | -| v0.12.1 | [New Folder Structure](https://github.com/TrueBlocks/trueblocks-core/blob/develop/src/other/migrations/README-v0.12.1.md) | 2021/09/01 | Adds support for Erigon<br />- Moves most executables to private path. | |
37 | | -| v0.11.3 | [London Hard Fork Migration](https://github.com/TrueBlocks/trueblocks-core/blob/develop/src/other/migrations/README-v0.11.3.md) | 2021/08/20 | Support for cache file format change due to London hard fork. | |
38 | | -| v0.9.0 | [Configuration File Migration](https://github.com/TrueBlocks/trueblocks-core/blob/develop/src/other/migrations/README-v0.09.0.md) | 2021/06/02 | Moves configuration file locations. | |
| 3 | +There was a near complete re-write of the entire repo between version 5.9.3 and 6.0.0. The repo version as of this document is v6.4.5. These instructions help you migrate to the new format |
| 4 | + |
| 5 | +## How to migrate to v6.4.5 |
| 6 | + |
| 7 | +### Update Import Paths and Dependencies |
| 8 | + |
| 9 | +The repository structure has been completely reorganized with proper Go module versioning. You'll need to update all import paths and `go.mod` dependencies as follows: |
| 10 | + |
| 11 | +#### 1. Chifra Core Application |
| 12 | + |
| 13 | +**Old import path:** |
| 14 | +```go |
| 15 | +github.com/TrueBlocks/trueblocks-core/src/apps/chifra |
| 16 | +``` |
| 17 | + |
| 18 | +**New import path:** |
| 19 | +```go |
| 20 | +github.com/TrueBlocks/trueblocks-chifra/v6 |
| 21 | +``` |
| 22 | + |
| 23 | +Update this in all locations including: |
| 24 | +- Go source file imports |
| 25 | +- `go.mod` files |
| 26 | +- Any scripts or configuration that reference the old path |
| 27 | + |
| 28 | +#### 2. TrueBlocks SDK |
| 29 | + |
| 30 | +**Old import path:** |
| 31 | +```go |
| 32 | +github.com/TrueBlocks/trueblocks-sdk/v5 |
| 33 | +``` |
| 34 | + |
| 35 | +**New import path:** |
| 36 | +```go |
| 37 | +github.com/TrueBlocks/trueblocks-sdk/v6 |
| 38 | +``` |
| 39 | + |
| 40 | +#### 3. Khedra Extension System |
| 41 | + |
| 42 | +**Old import path:** |
| 43 | +```go |
| 44 | +github.com/TrueBlocks/trueblocks-khedra/v5 |
| 45 | +``` |
| 46 | + |
| 47 | +**New import path:** |
| 48 | +```go |
| 49 | +github.com/TrueBlocks/trueblocks-khedra/v6 |
| 50 | +``` |
| 51 | + |
| 52 | +### Development Tools Notice |
| 53 | + |
| 54 | +The development tools (goMaker, testRunner, etc.) were internal-only tools and are now managed as separate repositories. We recommend using them at your own risk. **We do not provide migration paths for internal-use-only tools.** |
| 55 | + |
| 56 | +### Migration Example |
| 57 | + |
| 58 | +If you have a `go.mod` file that looks like this: |
| 59 | +```go |
| 60 | +module your-project |
| 61 | + |
| 62 | +go 1.21 |
| 63 | + |
| 64 | +require ( |
| 65 | + github.com/TrueBlocks/trueblocks-core/src/apps/chifra v0.0.0 |
| 66 | + github.com/TrueBlocks/trueblocks-sdk/v5 v5.9.3 |
| 67 | +) |
| 68 | +``` |
| 69 | + |
| 70 | +Update it to: |
| 71 | +```go |
| 72 | +module your-project |
| 73 | + |
| 74 | +go 1.21 |
| 75 | + |
| 76 | +require ( |
| 77 | + github.com/TrueBlocks/trueblocks-chifra/v6 v6.4.5 |
| 78 | + github.com/TrueBlocks/trueblocks-sdk/v6 v6.4.5 |
| 79 | +) |
| 80 | +``` |
| 81 | + |
| 82 | +And then make sure to update the import paths in your `.go` files. |
| 83 | + |
| 84 | +## Reason for this change |
| 85 | + |
| 86 | +The radical modifications to the codebase between version 5.9.3 and 6.4.5 were driven by three fundamental issues that required breaking changes: |
| 87 | + |
| 88 | +### 1. Repository Versioning and Management |
| 89 | + |
| 90 | +Chifra was previously unversioned, which made proper management of the repositories nearly impossible, especially when used in the mini-dApps. We always knew that at some point we would have to make this radical a change. We tried to implement a lesser change initially, but it became impossible at a certain point, thus necessitating the major breaking changes. |
| 91 | + |
| 92 | +### 2. Branch Structure Modernization |
| 93 | + |
| 94 | +The 5.9.3 and earlier releases used `master` as the main branch. They now use `main` as most other modern repos do. This was a long-ago naming convention that we knew we would one day have to fix to align with modern Git practices. Rather than making incremental changes, we decided to break everything all at once and migrate to `main` as the default branch. |
| 95 | + |
| 96 | +### 3. Idiomatic Go Development |
| 97 | + |
| 98 | +This repo was originally born as a C++ project. The new format is much more idiomatic GoLang. Our hope is to spend much less time managing what was essentially borken. All our development tools (testRunner, goMaker, scripts) are now much easier to manage, and our CI/CD processes are significantly improved. |
| 99 | + |
0 commit comments