Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,12 @@
!/CHANGELOG.md
!/LICENSE
!/README.md
!/downloadMappings.sh
!/gradle.properties
!/gradlew
!/gradlew.bat
!/main_net_programs.json
!/release-please-config.json
!/settings.gradle.kts
!/syncMappings.sh

# Both reports idl-src-gen emits from one run: the movement events this run saw, and the
# standing gap dashboard beside it. The gap file needs its own rule -- it is named by the
Expand All @@ -35,6 +33,8 @@
!/idl-change-report.txt
!/idl-change-report-gap.txt

### ix-mapper mapping configs, projected here by glamsystems/glam's public-repo sync ###

### CI ###
!/.github/
!/.github/**
Expand Down Expand Up @@ -84,3 +84,5 @@ crash-*
Crash_*.java
*.hprof
hs_err_pid*.log
!/mapping/
!/mapping/**
27 changes: 16 additions & 11 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,19 @@ plus service components for operating against it.
(`fulfillment/`), batched SQL (`db/sql/`), and instruction execution
(`execution/`).
- `examples/` — scratch/example module; not part of the hardening surface.
- `glam/` (untracked) — mapping configs from `glamsystems/ix-mapper-ts` at
the commit `./downloadMappings.sh` pins (`MAPPINGS_REF`); the sdk `jar` task
runs the script itself and embeds `glam/mapping-configs-v1` as
`glam/ix-mappings`, refusing to build or to write an archive without them.
`./syncMappings.sh [sha]` moves the pin; commit the pin change with the
jar it produces.
- `mapping/production/` and `mapping/staging/` (tracked) — the v1
ix-mapper mapping configs, one file per source program, projected one way
from `glamsystems/glam` (`anchor_v1/ix-mapper`, generated there from the
managed IDL stores) by its public-repo sync, whose commits record the glam
commit. Never edit them here: a change lands in glam and arrives with the
next sync. The sdk's `processResources` embeds both sets as
`glam/ix-mappings/{production,staging}` beside a build-time `index.json`,
`jar` refuses an archive without them, and `EmbeddedMappings` /
`GlamAccounts.createMapper(factory)` read them back, so a consumer supplies
no directory.
- `Integ.*` files are git-ignored scratch — present on a dev machine, absent
in CI. Never make anything depend on them.
in CI. Never make anything depend on them. `mapping/SOURCE` beside them names the glam commit
they were projected from; the sync writes it and the build reads it, never git history.

## Build & test

Expand Down Expand Up @@ -560,10 +565,10 @@ skips it, so the two answer different halves.
separate generated trees, and instruction layouts can differ between them.
- The generated `gen` trees are large (hundreds of files); searches are much
faster when scoped to the hand-written packages (`-not -path '*/gen/*'`).
- The sdk jar embeds the untracked `glam/mapping-configs-v1` directory and
materializes it itself at the pinned ix-mapper-ts commit; a jar without
`glam/ix-mappings/*.json` entries fails the `jar` task rather than
publishing empty, which is what every release before the pin did.
- The sdk jar embeds the tracked `mapping/production` and
`mapping/staging` sets as `glam/ix-mappings/{production,staging}`
with an index; a jar without them fails the `jar` task rather than
publishing empty, which is what every release before the embedding did.
- Every long-running `services` loop (`BatchSqlExecutor`, `AccountFetcher`,
`GlobalConfigCache`, `StakePoolCache`) takes a trailing
`systems.glam.services.LoopHeartbeat` through a factory overload and ticks
Expand Down
28 changes: 0 additions & 28 deletions downloadMappings.sh

This file was deleted.

1 change: 1 addition & 0 deletions mapping/SOURCE
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
glamsystems/glam@facb151c69ce26f8936acabc923fbd076f611b78
41 changes: 41 additions & 0 deletions mapping/production/11111111111111111111111111111111.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"program_id": "11111111111111111111111111111111",
"proxy_program_id": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz",
"instructions": [
{
"src_ix_name": "transfer",
"src_discriminator": [2, 0, 0, 0],
"dst_ix_name": "system_transfer",
"dst_discriminator": [167, 164, 195, 155, 219, 152, 191, 230],
"dynamic_accounts": [
{
"name": "glam_state",
"index": 0,
"writable": false,
"signer": false
},
{
"name": "glam_vault",
"index": 1,
"writable": true,
"signer": false
},
{
"name": "glam_signer",
"index": 2,
"writable": true,
"signer": true
}
],
"static_accounts": [
{
"account": "11111111111111111111111111111111",
"index": 3,
"writable": false,
"signer": false
}
],
"index_map": [-1, 4]
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
{
"program_id": "CCTPV2vPZJS2u2BBsUoscuikbYjnpFmbFsvVuJdgUMQe",
"proxy_program_id": "G1NTcMDYgNLpDwgnrpSZvoSKQuR9NXG7S3DmtNQCDmrK",
"instructions": [
{
"src_ix_name": "deposit_for_burn",
"src_discriminator": [215, 60, 61, 46, 114, 55, 128, 176],
"dst_ix_name": "deposit_for_burn",
"dst_discriminator": [215, 60, 61, 46, 114, 55, 128, 176],
"dynamic_accounts": [
{
"name": "glam_state",
"index": 0,
"writable": true,
"signer": false
},
{
"name": "glam_vault",
"index": 1,
"writable": true,
"signer": false
},
{
"name": "glam_signer",
"index": 2,
"writable": true,
"signer": true
},
{
"name": "integration_authority",
"index": 3,
"writable": false,
"signer": false
}
],
"static_accounts": [
{
"account": "CCTPV2vPZJS2u2BBsUoscuikbYjnpFmbFsvVuJdgUMQe",
"index": 4,
"writable": false,
"signer": false
},
{
"account": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz",
"index": 5,
"writable": false,
"signer": false
},
{
"account": "11111111111111111111111111111111",
"index": 6,
"writable": false,
"signer": false
},
{
"account": "CCTPV2Sm4AdWt5296sk4P66VBZ7bEhcARwFaaS9YPbeC",
"index": 17,
"writable": false,
"signer": false
},
{
"account": "CCTPV2vPZJS2u2BBsUoscuikbYjnpFmbFsvVuJdgUMQe",
"index": 18,
"writable": false,
"signer": false
},
{
"account": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
"index": 19,
"writable": false,
"signer": false
}
],
"index_map": [
-1, -1, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, -1, -1, -1, -1, 20, -1
]
}
]
}
Loading
Loading