Stop Uncompressing V3.x Binary At Runtime
Context
The issue of uncompressing v3.x binaries at runtime has been a topic of discussion in the Celestia community. Two relevant issues on GitHub have highlighted the problems associated with this approach. The first issue [1] discusses the difficulties in determining the target location for the uncompressed binary, while the second issue [2] points out the lack of clarity regarding where to place these uncompressed binaries.
Problem
The current method of uncompressing v3.x binaries at runtime has several drawbacks. Firstly, the target location for the uncompressed binary may not be writable by the user invoking celestia-appd. This can lead to permission issues and hinder the smooth operation of the application. Secondly, it is not immediately apparent where to place these uncompressed binaries, resulting in confusion among users. The possible locations for these binaries include /tmp/*
, ./celestia-appd/binaries/*
, or even a custom directory specified by --home
.
Proposal
To address these issues, we propose a change in the way v3.x binaries are handled. Instead of uncompressing them at runtime, we suggest installing the v3.x binary at install time. This approach has several benefits. Firstly, it eliminates the need to determine the target location for the uncompressed binary, as the installation process can handle this automatically. Secondly, it provides clarity on where to place the uncompressed binaries, making it easier for users to manage their application.
Concretely
The proposed solution involves modifying the make install
command to install both a v4.x binary and a v3.x binary at a predetermined path. For example, the v3.x binary could be installed at ~/.celestia-app/binaries/v3.10.0-arabica
. At runtime, the multiplexer can be configured to error on start-up if a v3.x binary does not exist at the predetermined path. This approach ensures that the application is always running with the correct version of the binary, eliminating the need for runtime compression and decompression.
Benefits
The proposed solution offers several benefits, including:
- Improved user experience: By providing a clear and predictable location for uncompressed binaries, users can easily manage their application and avoid potential issues.
- Simplified installation process: The installation process can handle the installation of v3.x binaries automatically, eliminating the need for manual intervention.
- Reduced complexity: By eliminating the need for runtime compression and decompression, the application becomes simpler and more robust.
Implementation
To implement this proposal, the following changes would be required:
- Modify the
make install
command to install both a v4.x binary and a v3.x binary at a predetermined path. - Update the multiplexer to error on start-up if a v3.x binary does not exist at the predetermined path.
- Provide clear documentation on the location of uncompressed binaries and how to manage them.
Conclusion
The proposal to stop uncompressing v3.x binaries at runtime offers several benefits, including improved user experience, simplified installation process, and reduced complexity. By installing v3.x binaries at install time and a clear and predictable location for uncompressed binaries, we can eliminate the need for runtime compression and decompression, making the application more robust and easier to manage.
References
Q: What is the current issue with uncompressing v3.x binaries at runtime?
A: The current method of uncompressing v3.x binaries at runtime has several drawbacks. Firstly, the target location for the uncompressed binary may not be writable by the user invoking celestia-appd. This can lead to permission issues and hinder the smooth operation of the application. Secondly, it is not immediately apparent where to place these uncompressed binaries, resulting in confusion among users.
Q: What is the proposed solution to address this issue?
A: The proposed solution involves modifying the make install
command to install both a v4.x binary and a v3.x binary at a predetermined path. For example, the v3.x binary could be installed at ~/.celestia-app/binaries/v3.10.0-arabica
. At runtime, the multiplexer can be configured to error on start-up if a v3.x binary does not exist at the predetermined path.
Q: What are the benefits of this proposed solution?
A: The proposed solution offers several benefits, including:
- Improved user experience: By providing a clear and predictable location for uncompressed binaries, users can easily manage their application and avoid potential issues.
- Simplified installation process: The installation process can handle the installation of v3.x binaries automatically, eliminating the need for manual intervention.
- Reduced complexity: By eliminating the need for runtime compression and decompression, the application becomes simpler and more robust.
Q: How will the multiplexer be configured to error on start-up if a v3.x binary does not exist at the predetermined path?
A: The multiplexer will be configured to check for the existence of the v3.x binary at the predetermined path during start-up. If the binary does not exist, the multiplexer will error and prevent the application from starting.
Q: What are the potential implications of this proposed solution on existing users?
A: The proposed solution may require existing users to update their installation process to accommodate the new installation location for v3.x binaries. However, this change should be relatively minor and should not significantly impact the overall user experience.
Q: How will the installation process be modified to handle the installation of v3.x binaries?
A: The make install
command will be modified to install both a v4.x binary and a v3.x binary at a predetermined path. This can be achieved by adding a new step to the installation process that copies the v3.x binary to the predetermined location.
Q: What are the potential risks or challenges associated with this proposed solution?
A: The proposed solution may introduce new risks or challenges, such as:
- Incompatibility issues: The v3.x binary may not be compatible with the new installation location or the multiplexer configuration.
- Installation errors: The installation process may fail if the v3.x binary is not properly installed or if the predetermined path is not accessible.
Q: How will these risks or challenges be mitigated?
A: These risks or challenges be mitigated by:
- Thorough testing: The proposed solution will be thoroughly tested to ensure that it works as expected and does not introduce any new issues.
- Clear documentation: Clear documentation will be provided to ensure that users understand the new installation process and the potential implications of the proposed solution.
Q: What is the expected timeline for implementing this proposed solution?
A: The expected timeline for implementing this proposed solution will depend on the complexity of the changes required and the availability of resources. However, it is expected that the solution will be implemented within the next few months.