Commit 851e0b8
authored
For newer version of committor program change its id (#530)
We want old running validators still use an old version of the program.
Instead of replacing and old version with new one and breaking commits
of old nodes we just deploy a new version separately at new address.
<!-- greptile_comment -->
## Greptile Summary
Updated On: 2025-09-05 08:52:37 UTC
This PR implements a strategic migration of the MagicBlock committor
program by changing its program ID from
`CoMtrr6j336NSB5PAoAWpLe5hPgkcShWKbPgHhZxaxh` to
`ComtrB2KEaWgXsW1dhr1xYL4Ht4Bjj3gXnnL6KMdABq`. This change is
coordinated across the entire codebase to ensure consistency.
The core change occurs in `magicblock-committor-program/src/lib.rs`
where the `declare_id!` macro is updated to use the new program ID. This
declaration is fundamental as it defines the program's on-chain identity
and affects how Program Derived Addresses (PDAs) are calculated and how
the program interacts with the Solana runtime.
The migration strategy involves deploying a completely new version of
the committor program at a different address rather than upgrading the
existing program in-place. This approach allows old validators to
continue operating with the previous program version while new
deployments use the updated version. The change cascades through
multiple configuration files:
- Test integration configs (`schedulecommit-conf.devnet.toml`,
`config-conf.devnet.toml`, `committor-conf.devnet.toml`)
- Shell scripts (`run-test-validator.sh`)
- Test documentation (`01_commits.rs`)
- Compiled program binary (removed old binary)
This coordinated update ensures that all components of the system
reference the same new program ID, maintaining consistency between the
program's declared identity and how it's referenced in configuration and
test files. The approach fits well with Solana's program deployment
model where program IDs are immutable once deployed, making side-by-side
deployment the preferred method for major updates.
## Confidence score: 4/5
- This PR implements a well-thought-out migration strategy with minimal
risk of breaking existing functionality
- Score reflects the coordinated nature of changes across multiple files
and the strategic approach to maintain backward compatibility
- The program ID change requires careful attention during deployment to
ensure the new program is properly deployed at the specified address
<!-- /greptile_comment -->1 parent a6a0503 commit 851e0b8
File tree
7 files changed
+6
-6
lines changed- magicblock-committor-program
- bin
- src
- test-integration
- configs
- schedulecommit/test-scenarios/tests
7 files changed
+6
-6
lines changedBinary file not shown.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| |||
0 commit comments