Skip to content

Commit

Permalink
add info about pathes in ensuring reproducibility
Browse files Browse the repository at this point in the history
  • Loading branch information
Canvinus committed Apr 11, 2024
1 parent c06b054 commit cbf4f0f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions neps/nep-0330.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,12 @@ function contract_source_metadata(): ContractSourceMetadata {}

When using a Docker image as a reference, it's important to specify the digest of the image to ensure reproducibility, since a tag could be reassigned to a different image.

### Paths Inside Docker Image

During the build, paths from the source of the build as well as the location of the cargo registry could be saved into WASM, which affects reproducibility. Therefore, we need to ensure that everyone uses the same paths inside the Docker image. We propose using the following paths:
- `/home/near/code` - Mounting volume from the host system containing the source code.

Check failure on line 81 in neps/nep-0330.md

View workflow job for this annotation

GitHub Actions / markdown-lint

Lists should be surrounded by blank lines [Context: "- `/home/near/code` - Mounting..."]

neps/nep-0330.md:81 MD032/blanks-around-lists Lists should be surrounded by blank lines [Context: "- `/home/near/code` - Mounting..."]
- `/home/near/.cargo` - Cargo registry.

#### Cargo.lock

It is important to have `Cargo.lock` inside the source code snapshot to ensure reproducibility. Example: https://github.com/near/core-contracts.
Expand Down

0 comments on commit cbf4f0f

Please sign in to comment.