Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Append crate to ELF file while deploying program #33849

Merged
merged 2 commits into from
Oct 25, 2023

Conversation

pgarg66
Copy link
Contributor

@pgarg66 pgarg66 commented Oct 24, 2023

Problem

The on-chain program cannot be decompiled into a crate file. So cargo-registry server cannot be used for fetching the crate.

Summary of Changes

This is a temporary solution.

  • Append the crate to ELF file (fixup the toml files and directory name in the package)
  • On cargo fetch, retrieve the program, and return the appended crate from it.

Fixes #

@pgarg66 pgarg66 marked this pull request as ready for review October 24, 2023 23:06
@codecov
Copy link

codecov bot commented Oct 24, 2023

Codecov Report

Merging #33849 (333f878) into master (9ffbe2a) will decrease coverage by 0.1%.
Report is 3 commits behind head on master.
The diff coverage is n/a.

@@            Coverage Diff            @@
##           master   #33849     +/-   ##
=========================================
- Coverage    81.9%    81.8%   -0.1%     
=========================================
  Files         809      809             
  Lines      217717   217717             
=========================================
- Hits       178345   178278     -67     
- Misses      39372    39439     +67     

Lichtso
Lichtso previously approved these changes Oct 25, 2023
@pgarg66 pgarg66 merged commit bdfb644 into solana-labs:master Oct 25, 2023
@pgarg66 pgarg66 deleted the registry-crate branch October 25, 2023 16:04
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants