From cbf4f0fc9d906906451010198d0588d976c89d2c Mon Sep 17 00:00:00 2001 From: Andrey Gruzdev Date: Thu, 11 Apr 2024 11:43:36 +0200 Subject: [PATCH] add info about pathes in ensuring reproducibility --- neps/nep-0330.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/neps/nep-0330.md b/neps/nep-0330.md index 41645ec20..b9ba506ea 100644 --- a/neps/nep-0330.md +++ b/neps/nep-0330.md @@ -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. +- `/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.