-
Notifications
You must be signed in to change notification settings - Fork 0
DAR Backup
The repo dars/ tree preserves versioned DAR (DAML Archive) files that have been uploaded to mainnet/devnet. Since DAML builds are only deterministic when using the exact same compiler version, we store the exact bytes of published packages here.
Not the same as the npm DAR: The published JS package @fairmint/open-captable-protocol-daml-js also ships a copy of the current OpenCapTable DAR under a stable export path (opencaptable.dar → published-dars/OpenCapTable.dar; see the NPM Publishing section on Home). That artifact is for downstream tooling tied to the npm release, while dars/ is the canonical backup of deployed package/version pairs for verification and rollback.
- Package verification - Canton validates package hashes; rebuilt packages have different hashes
- Reproducibility - Ensures we can always redeploy the exact same artifact
- Rollback safety - Allows redeploying a known-good version if needed
dars/
├── README.md # Human overview (see also this wiki page)
├── dars.lock # Hash manifest for CI verification
├── OpenCapTable-v34/
│ └── 0.0.1/
│ └── OpenCapTable-v34.dar # Example: current core package backup path
├── OpenCapTableReports-v01/
│ └── 0.0.2/
│ └── OpenCapTableReports-v01.dar
└── CantonPayments/
└── 0.0.30/
└── CantonPayments.dar
Back up the DAR file after uploading to mainnet:
npm run backup-dar -- --package OpenCapTable-v34 --version 0.0.1This will:
- Copy the DAR from
.daml/dist/todars/{package}/{version}/ - Compute and store the SHA256 hash in
dars.lock - Fail if the DAR already exists (prevents accidental overwrites)
Check that all DAR files match their recorded hashes:
npm run verify-darsThe CI workflow automatically:
- Verifies all DAR hashes match
dars.lock - Fails PRs that modify DAR files without updating
dars.lock
The dars.lock file contains SHA256 hashes and metadata for all backed-up DARs:
{
"version": 1,
"packages": {
"OpenCapTable-v34/0.0.1/OpenCapTable-v34.dar": {
"sha256": "abc123...",
"size": 12345,
"sdkVersion": "3.3.0-snapshot.20250603.0",
"uploadedAt": "2026-01-09T12:00:00Z",
"networks": ["mainnet", "devnet"]
}
}
}DAR files are stored using Git LFS to keep the repository performant. The .gitattributes file configures this automatically.
Never modify a DAR file directly. If you need to deploy a new version:
- Update the DAML source code
- Bump the version in
daml.yaml - Build and upload the new version
- Back up the new DAR with
npm run backup-dar
The CI will reject any PR that modifies existing DAR files without a corresponding version bump.
If you see this error when running backup-dar, it means the DAR for that package/version already exists. This is intentional—we never overwrite backed-up DARs. If you need to deploy changes, bump the version number.
This means a DAR file has been modified without updating dars.lock. Either:
- Restore the original DAR file
- If intentional, update
dars.lockwithnpm run verify-dars -- --update
Make sure Git LFS is installed and initialized:
git lfs install
git lfs pull- Splice DAR storage - Inspiration for this system
- Git LFS documentation
Develop
Decisions
Releases
- Releases (index)
- Package tag release process
- 2026-06-22 — OCP v35 conversion mechanism validation
- 2026-06-22 — OCP v35 SDK scaffold
- 2026-05-04 — OCP v34 major upgrade
- 2026-05-04 — DAML extraction / fairmint-daml
- 2026-03-05 — OCP v32 PPS-based conversion rename
- 2026-02-17 — OCP v31 ArchiveCapTable
- 2026-02-12 — OCP v31 vesting zero portion
Other Fairmint DAML
Documentation for CantonPayments, NFT, Reports, CouponMinter, equity certificate, proof-of-ownership, and related deployment playbooks lives with fairmint/daml and @fairmint/daml-js — not in this wiki.