v0.1.0-pre.020
This commit is contained in:
38
ROADMAP.md
38
ROADMAP.md
@@ -1,5 +1,5 @@
|
|||||||
<!-- file: ROADMAP.md -->
|
<!-- file: ROADMAP.md -->
|
||||||
<!-- version: 15 -->
|
<!-- version: 16 -->
|
||||||
|
|
||||||
# ROADMAP — khadhroony-bot3
|
# ROADMAP — khadhroony-bot3
|
||||||
|
|
||||||
@@ -204,3 +204,39 @@
|
|||||||
- [x] Réduire les frontières réservées à 102 et adapter l’audit.
|
- [x] Réduire les frontières réservées à 102 et adapter l’audit.
|
||||||
- [ ] Valider les tests portés, Clippy et le workspace avec Cargo sur la machine de développement.
|
- [ ] Valider les tests portés, Clippy et le workspace avec Cargo sur la machine de développement.
|
||||||
- [ ] Porter ensuite SPL Token classique et SPL Associated Token Account.
|
- [ ] Porter ensuite SPL Token classique et SPL Associated Token Account.
|
||||||
|
|
||||||
|
### 0.1.0-pre.017 — Exécuteur SPL Associated Token Account
|
||||||
|
|
||||||
|
- [x] Remplacer le squelette ATA par l’exécuteur typé validé de bot2.
|
||||||
|
- [x] Conserver `Create`, `CreateIdempotent`, `RecoverNested`, les builders officiels et les validations post-exécution.
|
||||||
|
- [x] Porter le target vers `kb-lib.executor.spl.associated_token_account`.
|
||||||
|
- [x] Réduire les frontières réservées à 101.
|
||||||
|
- [x] Valider les 548 tests unitaires, les tests d’intégration, Clippy et le workspace sur la machine de développement.
|
||||||
|
|
||||||
|
### 0.1.0-pre.018 — Exécuteur SPL Token-2022
|
||||||
|
|
||||||
|
- [x] Remplacer le squelette Token-2022 par les cinq modules métier complets de bot2.
|
||||||
|
- [x] Conserver les 33 tests, les extensions, Confidential Transfer et Confidential Mint/Burn.
|
||||||
|
- [x] Porter le target vers `kb-lib.executor.spl.token2022` et la nomenclature interne vers `TOKEN2022`.
|
||||||
|
- [x] Réduire les frontières réservées à 100.
|
||||||
|
- [x] Valider les 592 tests unitaires, les tests d’intégration, Clippy et le workspace sur la machine de développement.
|
||||||
|
|
||||||
|
### 0.1.0-pre.019 — Exécuteur SPL ElGamal Registry
|
||||||
|
|
||||||
|
- [x] Remplacer le squelette ElGamal Registry par les opérations `CreateRegistry` et `UpdateRegistry` validées de bot2.
|
||||||
|
- [x] Conserver les preuves inline/contexte, la simulation obligatoire, les plafonds de frais et les validations post-exécution.
|
||||||
|
- [x] Déplacer `spl-elgamal-registry-interface` dans les dépendances normales de `kb-lib`.
|
||||||
|
- [x] Porter le target vers `kb-lib.executor.spl.elgamal_registry`.
|
||||||
|
- [x] Réduire les frontières réservées à 99.
|
||||||
|
- [x] Valider les 598 tests unitaires, les tests d’intégration, Clippy et le workspace sur la machine de développement.
|
||||||
|
|
||||||
|
### 0.1.0-pre.020 — Configuration et logging
|
||||||
|
|
||||||
|
- [x] Remplacer le scaffold `kb-config` par les modèles, parseurs, sérialiseurs, validations JSON Schema et 20 tests de bot2.
|
||||||
|
- [x] Remplacer le scaffold `kb-logging` par la configuration des routes, le runtime tracing multi-writers et les 17 tests de bot2.
|
||||||
|
- [x] Préserver `kb_logging::tracing_target()` pour la compatibilité temporaire de `kb-app-demo`.
|
||||||
|
- [x] Corriger les targets et chemins de logs de Solana Core et SPL Memo dans les trois profils.
|
||||||
|
- [x] Vérifier ATA, Token-2022 et ElGamal Registry, déjà alignés sur leurs targets bot3.
|
||||||
|
- [x] Laisser SPL Token classique sous son identité réservée tant que son exécuteur n’est pas migré.
|
||||||
|
- [ ] Valider `kb-config`, `kb-logging`, Clippy et le workspace avec Cargo sur la machine de développement.
|
||||||
|
- [ ] Décider puis appliquer le renommage de `kb-rpc` avant sa migration fonctionnelle.
|
||||||
|
|||||||
4
RULES.md
4
RULES.md
@@ -143,7 +143,7 @@ Aucun renommage massif de modules n'est autorisé sans étape de contrôle dédi
|
|||||||
|
|
||||||
- Une crate ou un composant de `kb-lib` est opérationnel lorsqu’il effectue des I/O, orchestre un pipeline, décode, matérialise, exécute, applique une politique runtime ou prend une décision mutable observable.
|
- Une crate ou un composant de `kb-lib` est opérationnel lorsqu’il effectue des I/O, orchestre un pipeline, décode, matérialise, exécute, applique une politique runtime ou prend une décision mutable observable.
|
||||||
- Toute crate opérationnelle ajoutée ou modifiée doit dépendre de `tracing` depuis le workspace et déclarer exactement un `pub(crate) const TRACING_TARGET` dans `src/constants.rs`.
|
- Toute crate opérationnelle ajoutée ou modifiée doit dépendre de `tracing` depuis le workspace et déclarer exactement un `pub(crate) const TRACING_TARGET` dans `src/constants.rs`.
|
||||||
- Hors `kb-lib`, la valeur canonique de `DC_METADATA_MTM_TRACING_TARGET` est le nom exact du package Cargo.
|
- Hors `kb-lib`, la valeur canonique de `TRACING_TARGET_DECODER_METADATA_METAPLEX_TOKEN_METADATA` est le nom exact du package Cargo.
|
||||||
- Dans `kb-lib`, chaque composant opérationnel possède son propre `constants.rs` et un target hiérarchique stable fondé sur son identifiant de décodeur, matérialiseur ou exécuteur ; un target unique `kb-lib` ne doit pas effacer l'identité du composant.
|
- Dans `kb-lib`, chaque composant opérationnel possède son propre `constants.rs` et un target hiérarchique stable fondé sur son identifiant de décodeur, matérialiseur ou exécuteur ; un target unique `kb-lib` ne doit pas effacer l'identité du composant.
|
||||||
- Les targets historiques `khbot.*` et les targets de fenêtre sont interdits dans les nouvelles modifications.
|
- Les targets historiques `khbot.*` et les targets de fenêtre sont interdits dans les nouvelles modifications.
|
||||||
- Les macros `tracing` doivent utiliser `target: crate::TRACING_TARGET` et des champs structurés stables. La granularité interne passe par `action`, `stage`, `window`, `campaign_id`, `signature`, `instruction_path`, `program_id`, `processor_name`, `processor_version`, `status` et `error_code`.
|
- Les macros `tracing` doivent utiliser `target: crate::TRACING_TARGET` et des champs structurés stables. La granularité interne passe par `action`, `stage`, `window`, `campaign_id`, `signature`, `instruction_path`, `program_id`, `processor_name`, `processor_version`, `status` et `error_code`.
|
||||||
@@ -157,7 +157,7 @@ Aucun renommage massif de modules n'est autorisé sans étape de contrôle dédi
|
|||||||
- Chaque profil doit router les événements vers les sorties globales `debug.log`, `info.log`, `error.jsonl` et `app.log`, puis vers `debug.log`, `info.log` et `error.jsonl` dans un répertoire propre à chaque crate utilisant `tracing`.
|
- Chaque profil doit router les événements vers les sorties globales `debug.log`, `info.log`, `error.jsonl` et `app.log`, puis vers `debug.log`, `info.log` et `error.jsonl` dans un répertoire propre à chaque crate utilisant `tracing`.
|
||||||
- L’ajout ou la suppression de `tracing.workspace = true` dans une crate impose la mise à jour simultanée de la matrice de routes, de ses tests et de `docs/TRACING_CONTRACT.md`.
|
- L’ajout ou la suppression de `tracing.workspace = true` dans une crate impose la mise à jour simultanée de la matrice de routes, de ses tests et de `docs/TRACING_CONTRACT.md`.
|
||||||
- Le contrat détaillé est défini dans `docs/TRACING_CONTRACT.md`.
|
- Le contrat détaillé est défini dans `docs/TRACING_CONTRACT.md`.
|
||||||
- L’audit mécanique spécifique au projet est exécuté par `python3 scripts/audit_khadhroony_workspace_rules.py`. Il couvre notamment `DC_METADATA_MTM_TRACING_TARGET` et l’usage obligatoire de `solana_pubkey::Pubkey` à la place de `solana_address::Address`.
|
- L’audit mécanique spécifique au projet est exécuté par `python3 scripts/audit_khadhroony_workspace_rules.py`. Il couvre notamment `TRACING_TARGET_DECODER_METADATA_METAPLEX_TOKEN_METADATA` et l’usage obligatoire de `solana_pubkey::Pubkey` à la place de `solana_address::Address`.
|
||||||
|
|
||||||
## Règles de réutilisation des interfaces Solana et SPL
|
## Règles de réutilisation des interfaces Solana et SPL
|
||||||
|
|
||||||
|
|||||||
@@ -107,6 +107,45 @@
|
|||||||
"kb_app_demo"
|
"kb_app_demo"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "file_kb_lib_local_devnet_debug",
|
||||||
|
"enabled": true,
|
||||||
|
"sink": "file",
|
||||||
|
"level": "debug",
|
||||||
|
"path": "logs/devnet/kb-lib/debug.log",
|
||||||
|
"rotation": "daily",
|
||||||
|
"format": "human",
|
||||||
|
"ansi": false,
|
||||||
|
"targets": [
|
||||||
|
"kb-lib"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "file_kb_lib_local_devnet_info",
|
||||||
|
"enabled": true,
|
||||||
|
"sink": "file",
|
||||||
|
"level": "info",
|
||||||
|
"path": "logs/devnet/kb-lib/info.log",
|
||||||
|
"rotation": "daily",
|
||||||
|
"format": "human",
|
||||||
|
"ansi": false,
|
||||||
|
"targets": [
|
||||||
|
"kb-lib"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "file_kb_lib_local_devnet_error",
|
||||||
|
"enabled": true,
|
||||||
|
"sink": "file",
|
||||||
|
"level": "error",
|
||||||
|
"path": "logs/devnet/kb-lib/error.jsonl",
|
||||||
|
"rotation": "daily",
|
||||||
|
"format": "json",
|
||||||
|
"ansi": false,
|
||||||
|
"targets": [
|
||||||
|
"kb-lib"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "file_kb_app_demo_debug",
|
"name": "file_kb_app_demo_debug",
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
@@ -1709,6 +1748,45 @@
|
|||||||
"kb_app_demo"
|
"kb_app_demo"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "file_kb_lib_mainnet_research_debug",
|
||||||
|
"enabled": true,
|
||||||
|
"sink": "file",
|
||||||
|
"level": "debug",
|
||||||
|
"path": "logs/mainnet_research/kb-lib/debug.log",
|
||||||
|
"rotation": "daily",
|
||||||
|
"format": "human",
|
||||||
|
"ansi": false,
|
||||||
|
"targets": [
|
||||||
|
"kb-lib"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "file_kb_lib_mainnet_research_info",
|
||||||
|
"enabled": true,
|
||||||
|
"sink": "file",
|
||||||
|
"level": "info",
|
||||||
|
"path": "logs/mainnet_research/kb-lib/info.log",
|
||||||
|
"rotation": "daily",
|
||||||
|
"format": "human",
|
||||||
|
"ansi": false,
|
||||||
|
"targets": [
|
||||||
|
"kb-lib"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "file_kb_lib_mainnet_research_error",
|
||||||
|
"enabled": true,
|
||||||
|
"sink": "file",
|
||||||
|
"level": "error",
|
||||||
|
"path": "logs/mainnet_research/kb-lib/error.jsonl",
|
||||||
|
"rotation": "daily",
|
||||||
|
"format": "json",
|
||||||
|
"ansi": false,
|
||||||
|
"targets": [
|
||||||
|
"kb-lib"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "file_kb_app_demo_debug",
|
"name": "file_kb_app_demo_debug",
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
@@ -3511,6 +3589,45 @@
|
|||||||
"kb_app_demo"
|
"kb_app_demo"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "file_kb_lib_mainnet_debug",
|
||||||
|
"enabled": true,
|
||||||
|
"sink": "file",
|
||||||
|
"level": "debug",
|
||||||
|
"path": "logs/mainnet/kb-lib/debug.log",
|
||||||
|
"rotation": "daily",
|
||||||
|
"format": "human",
|
||||||
|
"ansi": false,
|
||||||
|
"targets": [
|
||||||
|
"kb-lib"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "file_kb_lib_mainnet_info",
|
||||||
|
"enabled": true,
|
||||||
|
"sink": "file",
|
||||||
|
"level": "info",
|
||||||
|
"path": "logs/mainnet/kb-lib/info.log",
|
||||||
|
"rotation": "daily",
|
||||||
|
"format": "human",
|
||||||
|
"ansi": false,
|
||||||
|
"targets": [
|
||||||
|
"kb-lib"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "file_kb_lib_mainnet_error",
|
||||||
|
"enabled": true,
|
||||||
|
"sink": "file",
|
||||||
|
"level": "error",
|
||||||
|
"path": "logs/mainnet/kb-lib/error.jsonl",
|
||||||
|
"rotation": "daily",
|
||||||
|
"format": "json",
|
||||||
|
"ansi": false,
|
||||||
|
"targets": [
|
||||||
|
"kb-lib"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "file_kb_app_demo_debug",
|
"name": "file_kb_app_demo_debug",
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
|
|||||||
@@ -245,15 +245,15 @@ Ces identifiants sont détaillés dans `docs/CORE_PROGRAM_IDS.md`. Ils sont couv
|
|||||||
|
|
||||||
## NFT, metadata, admin, governance et locks
|
## NFT, metadata, admin, governance et locks
|
||||||
|
|
||||||
| Canonique | Program ID | Source | Normalisé | Crate actuelle | Crate cible | Statut |
|
| Canonique | Program ID | Source | Normalisé | Crate actuelle | Crate cible | Statut |
|
||||||
|------------------------------------|------------------------------------------------|---------------------------|---------------------------|------------------------|------------------------------------------------------|--------------------|
|
|------------------------------------|------------------------------------------------|---------------------------|---------------------------|------------------------|--------------------------------------------------|--------------------|
|
||||||
| `lock_raydium_lp` | `LockrWmn6K5twhz3y9w1dQERbmgSaRkfnTeTKbpofwE` | `raydium_lock_lp` | `raydium_lock_lp` | `-` | `kb_decoder_lock_raydium_lp` | `reserved_missing` |
|
| `lock_raydium_lp` | `LockrWmn6K5twhz3y9w1dQERbmgSaRkfnTeTKbpofwE` | `raydium_lock_lp` | `raydium_lock_lp` | `-` | `kb_decoder_lock_raydium_lp` | `reserved_missing` |
|
||||||
| `admin_jupiter_lock` | `LocpQgucEQHbqNABEYvBvwoxCPsSbG91A1QaQhQQqjn` | `jupiter_lock` | `jupiter_lock` | `-` | `kb_decoder_admin_jupiter_lock` | `reserved_missing` |
|
| `admin_jupiter_lock` | `LocpQgucEQHbqNABEYvBvwoxCPsSbG91A1QaQhQQqjn` | `jupiter_lock` | `jupiter_lock` | `-` | `kb_decoder_admin_jupiter_lock` | `reserved_missing` |
|
||||||
| `admin_pump_fees` | `pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ` | `pump_fees` | `pump_fees` | `kb_decoder_pump_fees` | `kb_decoder_admin_pump_fees` | `current_alias` |
|
| `admin_pump_fees` | `pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ` | `pump_fees` | `pump_fees` | `kb_decoder_pump_fees` | `kb_decoder_admin_pump_fees` | `current_alias` |
|
||||||
| `metadata_metaplex_token_metadata` | `metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s` | `metaplex_token_metadata` | `metaplex_token_metadata` | `-` | `kb_lib::DcMetadataMetaplexTokenMetadataDecoder` | `current_migrated` |
|
| `metadata_metaplex_token_metadata` | `metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s` | `metaplex_token_metadata` | `metaplex_token_metadata` | `-` | `kb_lib::DcMetadataMetaplexTokenMetadataDecoder` | `current_migrated` |
|
||||||
| `metadata_name_service` | `namesLPneVptA9Z5rqUDD9tMTWEJwofgaYwp8cawRkX` | `name_service` | `name_service` | `-` | `kb_decoder_metadata_spl_name_service` | `reserved_missing` |
|
| `metadata_name_service` | `namesLPneVptA9Z5rqUDD9tMTWEJwofgaYwp8cawRkX` | `name_service` | `name_service` | `-` | `kb_decoder_metadata_spl_name_service` | `reserved_missing` |
|
||||||
| `nft_metaplex_bubblegum` | `BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY` | `bubblegum` | `bubblegum` | `-` | `kb_decoder_nft_metaplex_bubblegum` | `reserved_missing` |
|
| `nft_metaplex_bubblegum` | `BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY` | `bubblegum` | `bubblegum` | `-` | `kb_decoder_nft_metaplex_bubblegum` | `reserved_missing` |
|
||||||
| `nft_metaplex_mpl_core` | `CoREENxT6tW1HoK8ypY1SxRMZTcVPm7R94rH4PZNhX7d` | `mpl_core` | `mpl_core` | `-` | `kb_decoder_nft_metaplex_mpl_core` | `reserved_missing` |
|
| `nft_metaplex_mpl_core` | `CoREENxT6tW1HoK8ypY1SxRMZTcVPm7R94rH4PZNhX7d` | `mpl_core` | `mpl_core` | `-` | `kb_decoder_nft_metaplex_mpl_core` | `reserved_missing` |
|
||||||
|
|
||||||
|
|
||||||
## Surfaces à classifier
|
## Surfaces à classifier
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ pub(crate) use self::constants::TRACING_TARGET;
|
|||||||
```
|
```
|
||||||
|
|
||||||
Un composant opérationnel de `kb-lib` utilise un nom préfixé, par exemple
|
Un composant opérationnel de `kb-lib` utilise un nom préfixé, par exemple
|
||||||
`DC_SPL_TOKEN2022_TRACING_TARGET` ou `MT_TOKEN_ACCOUNTS_TRACING_TARGET`, réexporté
|
`TRACING_TARGET_DECODER_SPL_TOKEN2022` ou `TRACING_TARGET_MATERIALIZER_TOKEN_ACCOUNTS`, réexporté
|
||||||
transitivement jusqu’à `kb-lib/src/lib.rs`. Sa valeur suit exactement le chemin hiérarchique
|
transitivement jusqu’à `kb-lib/src/lib.rs`. Sa valeur suit exactement le chemin hiérarchique
|
||||||
du composant, par exemple `kb-lib.decoder.spl.token2022`.
|
du composant, par exemple `kb-lib.decoder.spl.token2022`.
|
||||||
|
|
||||||
|
|||||||
@@ -138,7 +138,7 @@ Aucun renommage massif de crates n'est autorisé sans étape de contrôle dédi
|
|||||||
|
|
||||||
- Une crate est opérationnelle lorsqu’elle effectue des I/O, orchestre un pipeline, décode, matérialise, exécute, applique une politique runtime ou prend une décision mutable observable.
|
- Une crate est opérationnelle lorsqu’elle effectue des I/O, orchestre un pipeline, décode, matérialise, exécute, applique une politique runtime ou prend une décision mutable observable.
|
||||||
- Toute crate opérationnelle ajoutée ou modifiée doit dépendre de `tracing` depuis le workspace et déclarer exactement un `pub(crate) const TRACING_TARGET` dans `src/constants.rs`.
|
- Toute crate opérationnelle ajoutée ou modifiée doit dépendre de `tracing` depuis le workspace et déclarer exactement un `pub(crate) const TRACING_TARGET` dans `src/constants.rs`.
|
||||||
- La valeur canonique de `DC_METADATA_MTM_TRACING_TARGET` est le nom exact du package Cargo. Les targets historiques `khbot.*`, les suffixes de module et les targets de fenêtre sont interdits dans les nouvelles modifications.
|
- La valeur canonique de `TRACING_TARGET_DECODER_METADATA_METAPLEX_TOKEN_METADATA` est le nom exact du package Cargo. Les targets historiques `khbot.*`, les suffixes de module et les targets de fenêtre sont interdits dans les nouvelles modifications.
|
||||||
- Les macros `tracing` doivent utiliser `target: crate::TRACING_TARGET` et des champs structurés stables. La granularité interne passe par `action`, `stage`, `window`, `campaign_id`, `signature`, `instruction_path`, `program_id`, `processor_name`, `processor_version`, `status` et `error_code`.
|
- Les macros `tracing` doivent utiliser `target: crate::TRACING_TARGET` et des champs structurés stables. La granularité interne passe par `action`, `stage`, `window`, `campaign_id`, `signature`, `instruction_path`, `program_id`, `processor_name`, `processor_version`, `status` et `error_code`.
|
||||||
- Les crates passives de types, contrats, DTO, API sans exécution, registres ou constantes restent sans dépendance `tracing`. `kb_config` reste une exception de bootstrap tant que sa validation précède l’installation du subscriber.
|
- Les crates passives de types, contrats, DTO, API sans exécution, registres ou constantes restent sans dépendance `tracing`. `kb_config` reste une exception de bootstrap tant que sa validation précède l’installation du subscriber.
|
||||||
- Il est interdit d’ajouter `tracing` sans événement réel ou de conserver un faux target uniquement consommé par `let _target`.
|
- Il est interdit d’ajouter `tracing` sans événement réel ou de conserver un faux target uniquement consommé par `let _target`.
|
||||||
@@ -150,7 +150,7 @@ Aucun renommage massif de crates n'est autorisé sans étape de contrôle dédi
|
|||||||
- Chaque profil doit router les événements vers les sorties globales `debug.log`, `info.log`, `error.jsonl` et `app.log`, puis vers `debug.log`, `info.log` et `error.jsonl` dans un répertoire propre à chaque crate utilisant `tracing`.
|
- Chaque profil doit router les événements vers les sorties globales `debug.log`, `info.log`, `error.jsonl` et `app.log`, puis vers `debug.log`, `info.log` et `error.jsonl` dans un répertoire propre à chaque crate utilisant `tracing`.
|
||||||
- L’ajout ou la suppression de `tracing.workspace = true` dans une crate impose la mise à jour simultanée de la matrice de routes, de ses tests et de `docs/TRACING_CONTRACT.md`.
|
- L’ajout ou la suppression de `tracing.workspace = true` dans une crate impose la mise à jour simultanée de la matrice de routes, de ses tests et de `docs/TRACING_CONTRACT.md`.
|
||||||
- Le contrat détaillé est défini dans `docs/TRACING_CONTRACT.md`.
|
- Le contrat détaillé est défini dans `docs/TRACING_CONTRACT.md`.
|
||||||
- L’audit mécanique spécifique au projet est exécuté par `python3 scripts/audit_khadhroony_workspace_rules.py`. Il couvre notamment `DC_METADATA_MTM_TRACING_TARGET` et l’usage obligatoire de `solana_pubkey::Pubkey` à la place de `solana_address::Address`.
|
- L’audit mécanique spécifique au projet est exécuté par `python3 scripts/audit_khadhroony_workspace_rules.py`. Il couvre notamment `TRACING_TARGET_DECODER_METADATA_METAPLEX_TOKEN_METADATA` et l’usage obligatoire de `solana_pubkey::Pubkey` à la place de `solana_address::Address`.
|
||||||
|
|
||||||
## Règles de réutilisation des interfaces Solana et SPL
|
## Règles de réutilisation des interfaces Solana et SPL
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# file: kb-config/Cargo.toml
|
# file: kb-config/Cargo.toml
|
||||||
# version: 1
|
# version: 2
|
||||||
|
|
||||||
[package]
|
[package]
|
||||||
name = "kb-config"
|
name = "kb-config"
|
||||||
@@ -10,6 +10,10 @@ publish.workspace = true
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
kb-core = { path = "../kb-core" }
|
kb-core = { path = "../kb-core" }
|
||||||
|
jsonschema.workspace = true
|
||||||
|
serde.workspace = true
|
||||||
|
serde_json.workspace = true
|
||||||
|
ts-rs.workspace = true
|
||||||
|
|
||||||
[lints]
|
[lints]
|
||||||
workspace = true
|
workspace = true
|
||||||
|
|||||||
68
kb-config/README.md
Normal file
68
kb-config/README.md
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
<!-- file: kb-config/README.md -->
|
||||||
|
<!-- version: 6 -->
|
||||||
|
|
||||||
|
# kb-config
|
||||||
|
|
||||||
|
Ce crate définit le contrat de configuration commun du workspace.
|
||||||
|
|
||||||
|
## Rôle dans l'écosystème
|
||||||
|
|
||||||
|
`kb-config` charge, valide et sérialise un fichier JSON contenant plusieurs profils. Un seul profil est actif à l'exécution grâce au champ `active_profile`.
|
||||||
|
|
||||||
|
Le crate fournit les structures typées runtime pour :
|
||||||
|
|
||||||
|
- l'application et l'environnement ;
|
||||||
|
- les sorties de logs console, fichier humain, fichier JSON et fichier erreurs ;
|
||||||
|
- les filtres de targets `tracing` ;
|
||||||
|
- les stores PostgreSQL et SQLite ;
|
||||||
|
- les endpoints HTTP JSON-RPC et WebSocket Solana ;
|
||||||
|
- les rôles et limites par endpoint ;
|
||||||
|
- les listeners Solana standards ;
|
||||||
|
- le wallet temporaire géré par profil ;
|
||||||
|
- les permissions d'envoi localnet/devnet/testnet/mainnet ;
|
||||||
|
- les plafonds de dépense, frais, priorité et fraîcheur du blockhash ;
|
||||||
|
- les pages de démonstration Tauri.
|
||||||
|
|
||||||
|
## Wallet temporaire
|
||||||
|
|
||||||
|
Le profil `local_devnet` active un wallet persistant de laboratoire sous :
|
||||||
|
|
||||||
|
```text
|
||||||
|
wallets/temporary/local_devnet/local-devnet-operator.json
|
||||||
|
```
|
||||||
|
|
||||||
|
Les profils mainnet conservent `temporary_wallet_enabled = false`. La validation typée refuse un wallet temporaire actif sur `mainnet-beta`, une persistance sans activation et les alias pouvant produire un chemin arbitraire.
|
||||||
|
|
||||||
|
## Exécution
|
||||||
|
|
||||||
|
La configuration sépare :
|
||||||
|
|
||||||
|
- le dry-run par défaut ;
|
||||||
|
- l'obligation de simulation ;
|
||||||
|
- la confirmation opérateur ;
|
||||||
|
- les plafonds de dépense localnet, devnet, testnet et mainnet ;
|
||||||
|
- le plafond de frais ;
|
||||||
|
- le plafond de prix par compute unit ;
|
||||||
|
- l'âge maximal du recent blockhash.
|
||||||
|
|
||||||
|
Un cluster dont l'envoi est activé doit disposer d'un plafond de dépense positif. Toute dépense configurée exige la simulation et toute dépense mainnet exige la confirmation opérateur. Les paramètres de confirmation sont bornés et le plafond d’airdrop Devnet est interdit dans les profils d’un autre cluster.
|
||||||
|
|
||||||
|
## Validation
|
||||||
|
|
||||||
|
La validation se fait en deux étapes :
|
||||||
|
|
||||||
|
1. validation JSON brute via `config/schema.config.json` et `jsonschema` ;
|
||||||
|
2. validation typée après désérialisation Rust.
|
||||||
|
|
||||||
|
## Secrets et placeholders
|
||||||
|
|
||||||
|
Le fichier versionné doit rester sans secret. Les placeholders restent directement dans les URLs. Les keypairs générés par `kb_wallet` vivent hors du fichier de configuration et sous un répertoire ignoré par Git.
|
||||||
|
|
||||||
|
## Exports TS-rs
|
||||||
|
|
||||||
|
Les structures exposées à Tauri utilisent `TS` avec un chemin `export_to` explicite. Les fichiers générés servent uniquement au partage des types Rust/TypeScript et ne remplacent pas le schéma JSON runtime.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cargo test export_bindings -p kb-config
|
||||||
|
cargo test -p kb-config settings::tests::
|
||||||
|
```
|
||||||
@@ -1,23 +1,70 @@
|
|||||||
// file: kb-config/src/lib.rs
|
// file: kb-config/src/lib.rs
|
||||||
// version: 1
|
// version: 3
|
||||||
|
|
||||||
#![forbid(unsafe_code)]
|
//! Khadhroony Bot3 workspace configuration contract and loading helpers.
|
||||||
#![deny(unreachable_pub)]
|
|
||||||
#![warn(missing_docs)]
|
#![warn(missing_docs)]
|
||||||
|
#![deny(unreachable_pub)]
|
||||||
|
#![forbid(unsafe_code)]
|
||||||
|
|
||||||
//! Configuration contracts for Khadhroony Bot3.
|
mod settings;
|
||||||
|
|
||||||
/// Minimal application configuration used during the migration.
|
/// Exposes the account listener configuration type.
|
||||||
#[derive(Clone, Debug, Eq, PartialEq)]
|
pub use self::settings::AccountListenerConfig;
|
||||||
pub struct AppConfig {
|
/// Exposes the root application configuration type.
|
||||||
/// Active profile name.
|
pub use self::settings::AppConfig;
|
||||||
pub active_profile: std::string::String,
|
/// Exposes the application section configuration type.
|
||||||
}
|
pub use self::settings::AppSectionConfig;
|
||||||
|
/// Exposes the local data configuration type.
|
||||||
impl std::default::Default for AppConfig {
|
pub use self::settings::DataConfig;
|
||||||
fn default() -> Self {
|
/// Exposes the database configuration type.
|
||||||
return Self {
|
pub use self::settings::DatabaseConfig;
|
||||||
active_profile: std::string::String::from("development"),
|
/// Exposes the demo application configuration type.
|
||||||
};
|
pub use self::settings::DemoConfig;
|
||||||
}
|
/// Exposes the endpoint role configuration type.
|
||||||
}
|
pub use self::settings::EndpointRoleConfig;
|
||||||
|
/// Exposes the execution configuration type.
|
||||||
|
pub use self::settings::ExecutionConfig;
|
||||||
|
/// Exposes the HTTP endpoint configuration type.
|
||||||
|
pub use self::settings::HttpEndpointConfig;
|
||||||
|
/// Exposes the listener configuration type.
|
||||||
|
pub use self::settings::ListenerConfig;
|
||||||
|
/// Exposes the log listener configuration type.
|
||||||
|
pub use self::settings::LogListenerConfig;
|
||||||
|
/// Exposes the logging target configuration type.
|
||||||
|
pub use self::settings::LogTargetConfig;
|
||||||
|
/// Exposes the logging target filter configuration type.
|
||||||
|
pub use self::settings::LogTargetFilterConfig;
|
||||||
|
/// Exposes the logging configuration type.
|
||||||
|
pub use self::settings::LoggingConfig;
|
||||||
|
/// Exposes the PostgreSQL configuration type.
|
||||||
|
pub use self::settings::PostgresConfig;
|
||||||
|
/// Exposes the profile configuration type.
|
||||||
|
pub use self::settings::ProfileConfig;
|
||||||
|
/// Exposes the program listener configuration type.
|
||||||
|
pub use self::settings::ProgramListenerConfig;
|
||||||
|
/// Exposes the Solana configuration type.
|
||||||
|
pub use self::settings::SolanaConfig;
|
||||||
|
/// Exposes the SQLite configuration type.
|
||||||
|
pub use self::settings::SqliteConfig;
|
||||||
|
/// Exposes the wallet configuration type.
|
||||||
|
pub use self::settings::WalletConfig;
|
||||||
|
/// Exposes the WebSocket endpoint configuration type.
|
||||||
|
pub use self::settings::WsEndpointConfig;
|
||||||
|
/// Exposes the active profile resolver.
|
||||||
|
pub use self::settings::active_profile;
|
||||||
|
/// Exposes the embedded JSON Schema text.
|
||||||
|
pub use self::settings::config_json_schema_text;
|
||||||
|
/// Exposes the embedded JSON Schema value parser.
|
||||||
|
pub use self::settings::config_json_schema_value;
|
||||||
|
/// Exposes the configuration parser from a JSON string.
|
||||||
|
pub use self::settings::parse_config_json;
|
||||||
|
/// Exposes the configuration loader from a filesystem path.
|
||||||
|
pub use self::settings::read_config_json_file;
|
||||||
|
/// Exposes the compact JSON serializer for configuration values.
|
||||||
|
pub use self::settings::serialize_config_json;
|
||||||
|
/// Exposes the pretty JSON serializer for configuration values.
|
||||||
|
pub use self::settings::serialize_config_json_pretty;
|
||||||
|
/// Exposes the typed configuration validator.
|
||||||
|
pub use self::settings::validate_config;
|
||||||
|
/// Exposes the JSON Schema validator for raw JSON configuration.
|
||||||
|
pub use self::settings::validate_config_json_schema;
|
||||||
|
|||||||
1530
kb-config/src/settings.rs
Normal file
1530
kb-config/src/settings.rs
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,5 @@
|
|||||||
// file: kb-lib/src/decoder.rs
|
// file: kb-lib/src/decoder.rs
|
||||||
// version: 8
|
// version: 9
|
||||||
|
|
||||||
//! Consolidated decoder modules.
|
//! Consolidated decoder modules.
|
||||||
|
|
||||||
@@ -466,8 +466,6 @@ pub(crate) use self::metadata::DC_METADATA_MTM_SIGN_METADATA_DISCRIMINATOR;
|
|||||||
pub(crate) use self::metadata::DC_METADATA_MTM_SURFACE_CODE;
|
pub(crate) use self::metadata::DC_METADATA_MTM_SURFACE_CODE;
|
||||||
/// Thaw Delegated Account discriminator.
|
/// Thaw Delegated Account discriminator.
|
||||||
pub(crate) use self::metadata::DC_METADATA_MTM_THAW_DELEGATED_ACCOUNT_DISCRIMINATOR;
|
pub(crate) use self::metadata::DC_METADATA_MTM_THAW_DELEGATED_ACCOUNT_DISCRIMINATOR;
|
||||||
/// Canonical tracing target for this crate.
|
|
||||||
pub(crate) use self::metadata::DC_METADATA_MTM_TRACING_TARGET;
|
|
||||||
/// Transfer discriminator.
|
/// Transfer discriminator.
|
||||||
pub(crate) use self::metadata::DC_METADATA_MTM_TRANSFER_DISCRIMINATOR;
|
pub(crate) use self::metadata::DC_METADATA_MTM_TRANSFER_DISCRIMINATOR;
|
||||||
/// Transfer Out Of Escrow discriminator.
|
/// Transfer Out Of Escrow discriminator.
|
||||||
@@ -498,6 +496,8 @@ pub(crate) use self::metadata::DC_METADATA_MTM_VERIFY_COLLECTION_DISCRIMINATOR;
|
|||||||
pub(crate) use self::metadata::DC_METADATA_MTM_VERIFY_DISCRIMINATOR;
|
pub(crate) use self::metadata::DC_METADATA_MTM_VERIFY_DISCRIMINATOR;
|
||||||
/// Verify Sized Collection Item discriminator.
|
/// Verify Sized Collection Item discriminator.
|
||||||
pub(crate) use self::metadata::DC_METADATA_MTM_VERIFY_SIZED_COLLECTION_ITEM_DISCRIMINATOR;
|
pub(crate) use self::metadata::DC_METADATA_MTM_VERIFY_SIZED_COLLECTION_ITEM_DISCRIMINATOR;
|
||||||
|
/// Canonical tracing target for this crate.
|
||||||
|
pub(crate) use self::metadata::TRACING_TARGET_DECODER_METADATA_METAPLEX_TOKEN_METADATA;
|
||||||
/// Crate-root access to `decode` from `instruction`.
|
/// Crate-root access to `decode` from `instruction`.
|
||||||
pub(crate) use self::metadata::decoder_metadata_metaplex_token_metadata_decode;
|
pub(crate) use self::metadata::decoder_metadata_metaplex_token_metadata_decode;
|
||||||
/// Crate-root access to `entry_for_discriminator` from `instruction`.
|
/// Crate-root access to `entry_for_discriminator` from `instruction`.
|
||||||
@@ -528,7 +528,6 @@ pub(crate) use self::solana::DC_SOLANA_CORE_SIGNATURE_BYTES;
|
|||||||
pub(crate) use self::solana::DC_SOLANA_CORE_SLASHING_SURFACE_CODE;
|
pub(crate) use self::solana::DC_SOLANA_CORE_SLASHING_SURFACE_CODE;
|
||||||
pub(crate) use self::solana::DC_SOLANA_CORE_STAKE_SURFACE_CODE;
|
pub(crate) use self::solana::DC_SOLANA_CORE_STAKE_SURFACE_CODE;
|
||||||
pub(crate) use self::solana::DC_SOLANA_CORE_SYSTEM_SURFACE_CODE;
|
pub(crate) use self::solana::DC_SOLANA_CORE_SYSTEM_SURFACE_CODE;
|
||||||
pub(crate) use self::solana::DC_SOLANA_CORE_TRACING_TARGET;
|
|
||||||
pub(crate) use self::solana::DC_SOLANA_CORE_U8_OFFSETS_BYTES;
|
pub(crate) use self::solana::DC_SOLANA_CORE_U8_OFFSETS_BYTES;
|
||||||
pub(crate) use self::solana::DC_SOLANA_CORE_U16_OFFSETS_BYTES;
|
pub(crate) use self::solana::DC_SOLANA_CORE_U16_OFFSETS_BYTES;
|
||||||
pub(crate) use self::solana::DC_SOLANA_CORE_VOTE_SURFACE_CODE;
|
pub(crate) use self::solana::DC_SOLANA_CORE_VOTE_SURFACE_CODE;
|
||||||
@@ -536,6 +535,7 @@ pub(crate) use self::solana::DC_SOLANA_CORE_ZK_ELGAMAL_PROOF_SURFACE_CODE;
|
|||||||
pub(crate) use self::solana::DC_SOLANA_CORE_ZK_TOKEN_PROOF_SURFACE_CODE;
|
pub(crate) use self::solana::DC_SOLANA_CORE_ZK_TOKEN_PROOF_SURFACE_CODE;
|
||||||
pub(crate) use self::solana::DcSolanaCoreAccountRole;
|
pub(crate) use self::solana::DcSolanaCoreAccountRole;
|
||||||
pub(crate) use self::solana::DcSolanaCoreResolvedInstructionPayload;
|
pub(crate) use self::solana::DcSolanaCoreResolvedInstructionPayload;
|
||||||
|
pub(crate) use self::solana::TRACING_TARGET_DECODER_SOLANA_CORE;
|
||||||
pub(crate) use self::solana::decoder_solana_core_address_lookup_table_coverage;
|
pub(crate) use self::solana::decoder_solana_core_address_lookup_table_coverage;
|
||||||
pub(crate) use self::solana::decoder_solana_core_address_lookup_table_decode;
|
pub(crate) use self::solana::decoder_solana_core_address_lookup_table_decode;
|
||||||
pub(crate) use self::solana::decoder_solana_core_address_lookup_table_recognize;
|
pub(crate) use self::solana::decoder_solana_core_address_lookup_table_recognize;
|
||||||
@@ -605,16 +605,12 @@ pub(crate) use self::spl::DC_SPL_ATA_MAX_INSTRUCTION_BYTES;
|
|||||||
pub(crate) use self::spl::DC_SPL_ATA_MAX_TRANSACTION_KEYS;
|
pub(crate) use self::spl::DC_SPL_ATA_MAX_TRANSACTION_KEYS;
|
||||||
/// Stable protocol and surface code for the Associated Token Account program.
|
/// Stable protocol and surface code for the Associated Token Account program.
|
||||||
pub(crate) use self::spl::DC_SPL_ATA_SURFACE_CODE;
|
pub(crate) use self::spl::DC_SPL_ATA_SURFACE_CODE;
|
||||||
/// Canonical tracing target for the Associated Token Account decoder.
|
|
||||||
pub(crate) use self::spl::DC_SPL_ATA_TRACING_TARGET;
|
|
||||||
/// Current stable SPL ElGamal registry event contract version.
|
/// Current stable SPL ElGamal registry event contract version.
|
||||||
pub(crate) use self::spl::DC_SPL_ELGAMAL_REGISTRY_EVENT_VERSION;
|
pub(crate) use self::spl::DC_SPL_ELGAMAL_REGISTRY_EVENT_VERSION;
|
||||||
/// Maximum retained SPL ElGamal registry instruction payload size.
|
/// Maximum retained SPL ElGamal registry instruction payload size.
|
||||||
pub(crate) use self::spl::DC_SPL_ELGAMAL_REGISTRY_MAX_INSTRUCTION_BYTES;
|
pub(crate) use self::spl::DC_SPL_ELGAMAL_REGISTRY_MAX_INSTRUCTION_BYTES;
|
||||||
/// Stable SPL ElGamal registry surface code.
|
/// Stable SPL ElGamal registry surface code.
|
||||||
pub(crate) use self::spl::DC_SPL_ELGAMAL_REGISTRY_SURFACE_CODE;
|
pub(crate) use self::spl::DC_SPL_ELGAMAL_REGISTRY_SURFACE_CODE;
|
||||||
/// Canonical tracing target for the SPL ElGamal registry decoder.
|
|
||||||
pub(crate) use self::spl::DC_SPL_ELGAMAL_REGISTRY_TRACING_TARGET;
|
|
||||||
/// Maximum payload prefix retained for bounded diagnostics.
|
/// Maximum payload prefix retained for bounded diagnostics.
|
||||||
pub(crate) use self::spl::DC_SPL_MEMO_DIAGNOSTIC_PREFIX_BYTES;
|
pub(crate) use self::spl::DC_SPL_MEMO_DIAGNOSTIC_PREFIX_BYTES;
|
||||||
/// Current stable Memo decoded event contract version.
|
/// Current stable Memo decoded event contract version.
|
||||||
@@ -623,8 +619,6 @@ pub(crate) use self::spl::DC_SPL_MEMO_EVENT_VERSION;
|
|||||||
pub(crate) use self::spl::DC_SPL_MEMO_MAX_PAYLOAD_BYTES;
|
pub(crate) use self::spl::DC_SPL_MEMO_MAX_PAYLOAD_BYTES;
|
||||||
/// Stable protocol code shared by Memo generations.
|
/// Stable protocol code shared by Memo generations.
|
||||||
pub(crate) use self::spl::DC_SPL_MEMO_PROTOCOL_CODE;
|
pub(crate) use self::spl::DC_SPL_MEMO_PROTOCOL_CODE;
|
||||||
/// Canonical tracing target for the SPL Memo decoder.
|
|
||||||
pub(crate) use self::spl::DC_SPL_MEMO_TRACING_TARGET;
|
|
||||||
/// Stable Memo v1 surface code.
|
/// Stable Memo v1 surface code.
|
||||||
pub(crate) use self::spl::DC_SPL_MEMO_V1_SURFACE_CODE;
|
pub(crate) use self::spl::DC_SPL_MEMO_V1_SURFACE_CODE;
|
||||||
/// Stable Memo v3 surface code.
|
/// Stable Memo v3 surface code.
|
||||||
@@ -645,8 +639,6 @@ pub(crate) use self::spl::DC_SPL_TOKEN_MAX_BATCH_INSTRUCTIONS;
|
|||||||
pub(crate) use self::spl::DC_SPL_TOKEN_MAX_INSTRUCTION_BYTES;
|
pub(crate) use self::spl::DC_SPL_TOKEN_MAX_INSTRUCTION_BYTES;
|
||||||
/// Stable protocol and surface code for the classic SPL Token program.
|
/// Stable protocol and surface code for the classic SPL Token program.
|
||||||
pub(crate) use self::spl::DC_SPL_TOKEN_SURFACE_CODE;
|
pub(crate) use self::spl::DC_SPL_TOKEN_SURFACE_CODE;
|
||||||
/// Canonical tracing target for the classic SPL Token decoder.
|
|
||||||
pub(crate) use self::spl::DC_SPL_TOKEN_TRACING_TARGET;
|
|
||||||
/// Maximum prefix retained in bounded Token-2022 diagnostics.
|
/// Maximum prefix retained in bounded Token-2022 diagnostics.
|
||||||
pub(crate) use self::spl::DC_SPL_TOKEN2022_DIAGNOSTIC_PREFIX_BYTES;
|
pub(crate) use self::spl::DC_SPL_TOKEN2022_DIAGNOSTIC_PREFIX_BYTES;
|
||||||
/// Current stable Token-2022 decoded event contract version.
|
/// Current stable Token-2022 decoded event contract version.
|
||||||
@@ -663,10 +655,18 @@ pub(crate) use self::spl::DC_SPL_TOKEN2022_MAX_INSTRUCTION_BYTES;
|
|||||||
pub(crate) use self::spl::DC_SPL_TOKEN2022_MAX_METADATA_STRING_BYTES;
|
pub(crate) use self::spl::DC_SPL_TOKEN2022_MAX_METADATA_STRING_BYTES;
|
||||||
/// Stable Token-2022 surface code.
|
/// Stable Token-2022 surface code.
|
||||||
pub(crate) use self::spl::DC_SPL_TOKEN2022_SURFACE_CODE;
|
pub(crate) use self::spl::DC_SPL_TOKEN2022_SURFACE_CODE;
|
||||||
/// Canonical tracing target for the Token-2022 decoder.
|
|
||||||
pub(crate) use self::spl::DC_SPL_TOKEN2022_TRACING_TARGET;
|
|
||||||
/// One parsed SPL ElGamal registry instruction.
|
/// One parsed SPL ElGamal registry instruction.
|
||||||
pub(crate) use self::spl::DcSplElGamalRegistryParsedRegistryInstruction;
|
pub(crate) use self::spl::DcSplElGamalRegistryParsedRegistryInstruction;
|
||||||
|
/// Canonical tracing target for the Associated Token Account decoder.
|
||||||
|
pub(crate) use self::spl::TRACING_TARGET_DECODER_SPL_ATA;
|
||||||
|
/// Canonical tracing target for the SPL ElGamal registry decoder.
|
||||||
|
pub(crate) use self::spl::TRACING_TARGET_DECODER_SPL_ELGAMAL_REGISTRY;
|
||||||
|
/// Canonical tracing target for the SPL Memo decoder.
|
||||||
|
pub(crate) use self::spl::TRACING_TARGET_DECODER_SPL_MEMO;
|
||||||
|
/// Canonical tracing target for the classic SPL Token decoder.
|
||||||
|
pub(crate) use self::spl::TRACING_TARGET_DECODER_SPL_TOKEN;
|
||||||
|
/// Canonical tracing target for the Token-2022 decoder.
|
||||||
|
pub(crate) use self::spl::TRACING_TARGET_DECODER_SPL_TOKEN2022;
|
||||||
/// Decodes one bounded Associated Token Account instruction.
|
/// Decodes one bounded Associated Token Account instruction.
|
||||||
pub(crate) use self::spl::decoder_spl_associated_token_account_decode;
|
pub(crate) use self::spl::decoder_spl_associated_token_account_decode;
|
||||||
/// Returns the exact entry matching an Associated Token Account wire.
|
/// Returns the exact entry matching an Associated Token Account wire.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// file: kb-lib/src/decoder/metadata.rs
|
// file: kb-lib/src/decoder/metadata.rs
|
||||||
// version: 4
|
// version: 5
|
||||||
|
|
||||||
//! `metadata` decoder family.
|
//! `metadata` decoder family.
|
||||||
|
|
||||||
@@ -179,8 +179,6 @@ pub(crate) use self::metaplex_token_metadata::DC_METADATA_MTM_SIGN_METADATA_DISC
|
|||||||
pub(crate) use self::metaplex_token_metadata::DC_METADATA_MTM_SURFACE_CODE;
|
pub(crate) use self::metaplex_token_metadata::DC_METADATA_MTM_SURFACE_CODE;
|
||||||
/// Thaw Delegated Account discriminator.
|
/// Thaw Delegated Account discriminator.
|
||||||
pub(crate) use self::metaplex_token_metadata::DC_METADATA_MTM_THAW_DELEGATED_ACCOUNT_DISCRIMINATOR;
|
pub(crate) use self::metaplex_token_metadata::DC_METADATA_MTM_THAW_DELEGATED_ACCOUNT_DISCRIMINATOR;
|
||||||
/// Canonical tracing target for this crate.
|
|
||||||
pub(crate) use self::metaplex_token_metadata::DC_METADATA_MTM_TRACING_TARGET;
|
|
||||||
/// Transfer discriminator.
|
/// Transfer discriminator.
|
||||||
pub(crate) use self::metaplex_token_metadata::DC_METADATA_MTM_TRANSFER_DISCRIMINATOR;
|
pub(crate) use self::metaplex_token_metadata::DC_METADATA_MTM_TRANSFER_DISCRIMINATOR;
|
||||||
/// Transfer Out Of Escrow discriminator.
|
/// Transfer Out Of Escrow discriminator.
|
||||||
@@ -211,6 +209,8 @@ pub(crate) use self::metaplex_token_metadata::DC_METADATA_MTM_VERIFY_COLLECTION_
|
|||||||
pub(crate) use self::metaplex_token_metadata::DC_METADATA_MTM_VERIFY_DISCRIMINATOR;
|
pub(crate) use self::metaplex_token_metadata::DC_METADATA_MTM_VERIFY_DISCRIMINATOR;
|
||||||
/// Verify Sized Collection Item discriminator.
|
/// Verify Sized Collection Item discriminator.
|
||||||
pub(crate) use self::metaplex_token_metadata::DC_METADATA_MTM_VERIFY_SIZED_COLLECTION_ITEM_DISCRIMINATOR;
|
pub(crate) use self::metaplex_token_metadata::DC_METADATA_MTM_VERIFY_SIZED_COLLECTION_ITEM_DISCRIMINATOR;
|
||||||
|
/// Canonical tracing target for this crate.
|
||||||
|
pub(crate) use self::metaplex_token_metadata::TRACING_TARGET_DECODER_METADATA_METAPLEX_TOKEN_METADATA;
|
||||||
/// Crate-root access to `decode` from `instruction`.
|
/// Crate-root access to `decode` from `instruction`.
|
||||||
pub(crate) use self::metaplex_token_metadata::decoder_metadata_metaplex_token_metadata_decode;
|
pub(crate) use self::metaplex_token_metadata::decoder_metadata_metaplex_token_metadata_decode;
|
||||||
/// Crate-root access to `entry_for_discriminator` from `instruction`.
|
/// Crate-root access to `entry_for_discriminator` from `instruction`.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// file: kb-lib/src/decoder/metadata/metaplex_token_metadata.rs
|
// file: kb-lib/src/decoder/metadata/metaplex_token_metadata.rs
|
||||||
// version: 3
|
// version: 4
|
||||||
|
|
||||||
//! Contextual instruction and bounded account decoder for Metaplex Token Metadata.
|
//! Contextual instruction and bounded account decoder for Metaplex Token Metadata.
|
||||||
|
|
||||||
@@ -180,8 +180,6 @@ pub(crate) use self::constants::DC_METADATA_MTM_SIGN_METADATA_DISCRIMINATOR;
|
|||||||
pub(crate) use self::constants::DC_METADATA_MTM_SURFACE_CODE;
|
pub(crate) use self::constants::DC_METADATA_MTM_SURFACE_CODE;
|
||||||
/// Thaw Delegated Account discriminator.
|
/// Thaw Delegated Account discriminator.
|
||||||
pub(crate) use self::constants::DC_METADATA_MTM_THAW_DELEGATED_ACCOUNT_DISCRIMINATOR;
|
pub(crate) use self::constants::DC_METADATA_MTM_THAW_DELEGATED_ACCOUNT_DISCRIMINATOR;
|
||||||
/// Canonical tracing target for this crate.
|
|
||||||
pub(crate) use self::constants::DC_METADATA_MTM_TRACING_TARGET;
|
|
||||||
/// Transfer discriminator.
|
/// Transfer discriminator.
|
||||||
pub(crate) use self::constants::DC_METADATA_MTM_TRANSFER_DISCRIMINATOR;
|
pub(crate) use self::constants::DC_METADATA_MTM_TRANSFER_DISCRIMINATOR;
|
||||||
/// Transfer Out Of Escrow discriminator.
|
/// Transfer Out Of Escrow discriminator.
|
||||||
@@ -212,6 +210,8 @@ pub(crate) use self::constants::DC_METADATA_MTM_VERIFY_COLLECTION_DISCRIMINATOR;
|
|||||||
pub(crate) use self::constants::DC_METADATA_MTM_VERIFY_DISCRIMINATOR;
|
pub(crate) use self::constants::DC_METADATA_MTM_VERIFY_DISCRIMINATOR;
|
||||||
/// Verify Sized Collection Item discriminator.
|
/// Verify Sized Collection Item discriminator.
|
||||||
pub(crate) use self::constants::DC_METADATA_MTM_VERIFY_SIZED_COLLECTION_ITEM_DISCRIMINATOR;
|
pub(crate) use self::constants::DC_METADATA_MTM_VERIFY_SIZED_COLLECTION_ITEM_DISCRIMINATOR;
|
||||||
|
/// Canonical tracing target for this crate.
|
||||||
|
pub(crate) use self::constants::TRACING_TARGET_DECODER_METADATA_METAPLEX_TOKEN_METADATA;
|
||||||
/// Crate-root access to `decode` from `instruction`.
|
/// Crate-root access to `decode` from `instruction`.
|
||||||
pub(crate) use self::instruction::decoder_metadata_metaplex_token_metadata_decode;
|
pub(crate) use self::instruction::decoder_metadata_metaplex_token_metadata_decode;
|
||||||
/// Crate-root access to `entry_for_discriminator` from `instruction`.
|
/// Crate-root access to `entry_for_discriminator` from `instruction`.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// file: kb-lib/src/decoder/metadata/metaplex_token_metadata/constants.rs
|
// file: kb-lib/src/decoder/metadata/metaplex_token_metadata/constants.rs
|
||||||
// version: 29
|
// version: 30
|
||||||
|
|
||||||
//! Internal constants for Metaplex Token Metadata decoding.
|
//! Internal constants for Metaplex Token Metadata decoding.
|
||||||
|
|
||||||
@@ -324,5 +324,5 @@ pub(crate) const DC_METADATA_MTM_INSTRUCTION_ENTRIES: &[(u8, &str, bool)] = &[
|
|||||||
];
|
];
|
||||||
|
|
||||||
/// Canonical tracing target for this decoder.
|
/// Canonical tracing target for this decoder.
|
||||||
pub(crate) const DC_METADATA_MTM_TRACING_TARGET: &str =
|
pub(crate) const TRACING_TARGET_DECODER_METADATA_METAPLEX_TOKEN_METADATA: &str =
|
||||||
"kb-lib.decoder.metadata.metaplex_token_metadata";
|
"kb-lib.decoder.metadata.metaplex_token_metadata";
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// file: kb-lib/src/decoder/metadata/metaplex_token_metadata/decoder.rs
|
// file: kb-lib/src/decoder/metadata/metaplex_token_metadata/decoder.rs
|
||||||
// version: 28
|
// version: 29
|
||||||
|
|
||||||
//! Exact contextual dispatch for Metaplex Token Metadata.
|
//! Exact contextual dispatch for Metaplex Token Metadata.
|
||||||
|
|
||||||
@@ -112,7 +112,7 @@ impl crate::DcApiInstructionDecoder for crate::DcMetadataMetaplexTokenMetadataDe
|
|||||||
| crate::DcApiDecoderOutcomeStatus::Unsupported
|
| crate::DcApiDecoderOutcomeStatus::Unsupported
|
||||||
) {
|
) {
|
||||||
tracing::error!(
|
tracing::error!(
|
||||||
target: crate::DC_METADATA_MTM_TRACING_TARGET,
|
target: crate::TRACING_TARGET_DECODER_METADATA_METAPLEX_TOKEN_METADATA,
|
||||||
action = "decode_failure",
|
action = "decode_failure",
|
||||||
signature = %input.signature,
|
signature = %input.signature,
|
||||||
slot = input.slot,
|
slot = input.slot,
|
||||||
@@ -127,7 +127,7 @@ impl crate::DcApiInstructionDecoder for crate::DcMetadataMetaplexTokenMetadataDe
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
tracing::debug!(
|
tracing::debug!(
|
||||||
target: crate::DC_METADATA_MTM_TRACING_TARGET,
|
target: crate::TRACING_TARGET_DECODER_METADATA_METAPLEX_TOKEN_METADATA,
|
||||||
action = "decode",
|
action = "decode",
|
||||||
signature = %input.signature,
|
signature = %input.signature,
|
||||||
instruction_path = %input.instruction_path,
|
instruction_path = %input.instruction_path,
|
||||||
@@ -498,7 +498,7 @@ mod tests {
|
|||||||
&[kb_program_ids::METADATA_METAPLEX_TOKEN_METADATA_PROGRAM_ID]
|
&[kb_program_ids::METADATA_METAPLEX_TOKEN_METADATA_PROGRAM_ID]
|
||||||
);
|
);
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
crate::DC_METADATA_MTM_TRACING_TARGET,
|
crate::TRACING_TARGET_DECODER_METADATA_METAPLEX_TOKEN_METADATA,
|
||||||
"kb-lib.decoder.metadata.metaplex_token_metadata"
|
"kb-lib.decoder.metadata.metaplex_token_metadata"
|
||||||
);
|
);
|
||||||
assert_eq!(crate::DcApiInstructionDecoder::coverage(&decoder).len(), 58);
|
assert_eq!(crate::DcApiInstructionDecoder::coverage(&decoder).len(), 58);
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// file: kb-lib/src/decoder/solana.rs
|
// file: kb-lib/src/decoder/solana.rs
|
||||||
// version: 4
|
// version: 5
|
||||||
|
|
||||||
//! `solana` decoder family.
|
//! `solana` decoder family.
|
||||||
|
|
||||||
@@ -32,7 +32,6 @@ pub(crate) use self::core::DC_SOLANA_CORE_SIGNATURE_BYTES;
|
|||||||
pub(crate) use self::core::DC_SOLANA_CORE_SLASHING_SURFACE_CODE;
|
pub(crate) use self::core::DC_SOLANA_CORE_SLASHING_SURFACE_CODE;
|
||||||
pub(crate) use self::core::DC_SOLANA_CORE_STAKE_SURFACE_CODE;
|
pub(crate) use self::core::DC_SOLANA_CORE_STAKE_SURFACE_CODE;
|
||||||
pub(crate) use self::core::DC_SOLANA_CORE_SYSTEM_SURFACE_CODE;
|
pub(crate) use self::core::DC_SOLANA_CORE_SYSTEM_SURFACE_CODE;
|
||||||
pub(crate) use self::core::DC_SOLANA_CORE_TRACING_TARGET;
|
|
||||||
pub(crate) use self::core::DC_SOLANA_CORE_U8_OFFSETS_BYTES;
|
pub(crate) use self::core::DC_SOLANA_CORE_U8_OFFSETS_BYTES;
|
||||||
pub(crate) use self::core::DC_SOLANA_CORE_U16_OFFSETS_BYTES;
|
pub(crate) use self::core::DC_SOLANA_CORE_U16_OFFSETS_BYTES;
|
||||||
pub(crate) use self::core::DC_SOLANA_CORE_VOTE_SURFACE_CODE;
|
pub(crate) use self::core::DC_SOLANA_CORE_VOTE_SURFACE_CODE;
|
||||||
@@ -40,6 +39,7 @@ pub(crate) use self::core::DC_SOLANA_CORE_ZK_ELGAMAL_PROOF_SURFACE_CODE;
|
|||||||
pub(crate) use self::core::DC_SOLANA_CORE_ZK_TOKEN_PROOF_SURFACE_CODE;
|
pub(crate) use self::core::DC_SOLANA_CORE_ZK_TOKEN_PROOF_SURFACE_CODE;
|
||||||
pub(crate) use self::core::DcSolanaCoreAccountRole;
|
pub(crate) use self::core::DcSolanaCoreAccountRole;
|
||||||
pub(crate) use self::core::DcSolanaCoreResolvedInstructionPayload;
|
pub(crate) use self::core::DcSolanaCoreResolvedInstructionPayload;
|
||||||
|
pub(crate) use self::core::TRACING_TARGET_DECODER_SOLANA_CORE;
|
||||||
pub(crate) use self::core::decoder_solana_core_address_lookup_table_coverage;
|
pub(crate) use self::core::decoder_solana_core_address_lookup_table_coverage;
|
||||||
pub(crate) use self::core::decoder_solana_core_address_lookup_table_decode;
|
pub(crate) use self::core::decoder_solana_core_address_lookup_table_decode;
|
||||||
pub(crate) use self::core::decoder_solana_core_address_lookup_table_recognize;
|
pub(crate) use self::core::decoder_solana_core_address_lookup_table_recognize;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// file: kb-lib/src/decoder/solana/core.rs
|
// file: kb-lib/src/decoder/solana/core.rs
|
||||||
// version: 18
|
// version: 19
|
||||||
|
|
||||||
//! Solana Core decoder component.
|
//! Solana Core decoder component.
|
||||||
|
|
||||||
@@ -94,8 +94,6 @@ pub(crate) use self::constants::DC_SOLANA_CORE_SLASHING_SURFACE_CODE;
|
|||||||
pub(crate) use self::constants::DC_SOLANA_CORE_STAKE_SURFACE_CODE;
|
pub(crate) use self::constants::DC_SOLANA_CORE_STAKE_SURFACE_CODE;
|
||||||
/// Stable System Program surface code.
|
/// Stable System Program surface code.
|
||||||
pub(crate) use self::constants::DC_SOLANA_CORE_SYSTEM_SURFACE_CODE;
|
pub(crate) use self::constants::DC_SOLANA_CORE_SYSTEM_SURFACE_CODE;
|
||||||
/// Canonical tracing target for the Solana Core decoder component.
|
|
||||||
pub(crate) use self::constants::DC_SOLANA_CORE_TRACING_TARGET;
|
|
||||||
/// Byte length of one secp256k1 offsets entry.
|
/// Byte length of one secp256k1 offsets entry.
|
||||||
pub(crate) use self::constants::DC_SOLANA_CORE_U8_OFFSETS_BYTES;
|
pub(crate) use self::constants::DC_SOLANA_CORE_U8_OFFSETS_BYTES;
|
||||||
/// Byte length of one Ed25519 or secp256r1 offsets entry.
|
/// Byte length of one Ed25519 or secp256r1 offsets entry.
|
||||||
@@ -106,6 +104,8 @@ pub(crate) use self::constants::DC_SOLANA_CORE_VOTE_SURFACE_CODE;
|
|||||||
pub(crate) use self::constants::DC_SOLANA_CORE_ZK_ELGAMAL_PROOF_SURFACE_CODE;
|
pub(crate) use self::constants::DC_SOLANA_CORE_ZK_ELGAMAL_PROOF_SURFACE_CODE;
|
||||||
/// Stable historical ZK Token Proof surface code.
|
/// Stable historical ZK Token Proof surface code.
|
||||||
pub(crate) use self::constants::DC_SOLANA_CORE_ZK_TOKEN_PROOF_SURFACE_CODE;
|
pub(crate) use self::constants::DC_SOLANA_CORE_ZK_TOKEN_PROOF_SURFACE_CODE;
|
||||||
|
/// Canonical tracing target for the Solana Core decoder component.
|
||||||
|
pub(crate) use self::constants::TRACING_TARGET_DECODER_SOLANA_CORE;
|
||||||
/// Builds one exact decoded native observation.
|
/// Builds one exact decoded native observation.
|
||||||
pub(crate) use self::event::decoder_solana_core_decoded_result;
|
pub(crate) use self::event::decoder_solana_core_decoded_result;
|
||||||
/// Builds one failed native decode result.
|
/// Builds one failed native decode result.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// file: kb-lib/src/decoder/solana/core/constants.rs
|
// file: kb-lib/src/decoder/solana/core/constants.rs
|
||||||
// version: 13
|
// version: 14
|
||||||
|
|
||||||
//! Local constants for the Solana Core decoder component.
|
//! Local constants for the Solana Core decoder component.
|
||||||
|
|
||||||
@@ -67,4 +67,4 @@ pub(crate) const DC_SOLANA_CORE_MAX_NATIVE_INSTRUCTION_PAYLOAD_BYTES: usize = 4_
|
|||||||
pub(crate) const DC_SOLANA_CORE_NATIVE_EVENT_VERSION: u32 = 1;
|
pub(crate) const DC_SOLANA_CORE_NATIVE_EVENT_VERSION: u32 = 1;
|
||||||
|
|
||||||
/// Canonical tracing target for the Solana Core decoder component.
|
/// Canonical tracing target for the Solana Core decoder component.
|
||||||
pub(crate) const DC_SOLANA_CORE_TRACING_TARGET: &str = "kb-lib.decoder.solana.core";
|
pub(crate) const TRACING_TARGET_DECODER_SOLANA_CORE: &str = "kb-lib.decoder.solana.core";
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// file: kb-lib/src/decoder/solana/core/decoder.rs
|
// file: kb-lib/src/decoder/solana/core/decoder.rs
|
||||||
// version: 24
|
// version: 25
|
||||||
|
|
||||||
//! Runtime-native Solana program classifier for the common decode pipeline.
|
//! Runtime-native Solana program classifier for the common decode pipeline.
|
||||||
|
|
||||||
@@ -149,7 +149,7 @@ impl crate::DcApiProtocolDecoder for crate::DcSolanaCoreDecoder {
|
|||||||
&self,
|
&self,
|
||||||
_observation: &crate::MdProgramObservation,
|
_observation: &crate::MdProgramObservation,
|
||||||
) -> kb_core::Result<std::vec::Vec<crate::MdDecodedProtocolEvent>> {
|
) -> kb_core::Result<std::vec::Vec<crate::MdDecodedProtocolEvent>> {
|
||||||
tracing::debug!(target: crate::DC_SOLANA_CORE_TRACING_TARGET, "legacy native decoder adapter classified an observation without maximal decoding");
|
tracing::debug!(target: crate::TRACING_TARGET_DECODER_SOLANA_CORE, "legacy native decoder adapter classified an observation without maximal decoding");
|
||||||
return std::result::Result::Ok(std::vec::Vec::new());
|
return std::result::Result::Ok(std::vec::Vec::new());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -211,14 +211,14 @@ impl crate::DcApiInstructionDecoder for crate::DcSolanaCoreDecoder {
|
|||||||
&self,
|
&self,
|
||||||
input: &crate::MdCoreInstructionReplayInput,
|
input: &crate::MdCoreInstructionReplayInput,
|
||||||
) -> crate::DcApiDecoderRecognition {
|
) -> crate::DcApiDecoderRecognition {
|
||||||
tracing::debug!(target: crate::DC_SOLANA_CORE_TRACING_TARGET, action = "recognize", signature = %input.signature, slot = input.slot, instruction_path = %input.instruction_path, program_id = %input.program_id, input_key = %input.replay_input_key, transaction_failed = input.transaction_failed, "recognize native Solana contextual instruction");
|
tracing::debug!(target: crate::TRACING_TARGET_DECODER_SOLANA_CORE, action = "recognize", signature = %input.signature, slot = input.slot, instruction_path = %input.instruction_path, program_id = %input.program_id, input_key = %input.replay_input_key, transaction_failed = input.transaction_failed, "recognize native Solana contextual instruction");
|
||||||
let surface = NATIVE_SURFACES
|
let surface = NATIVE_SURFACES
|
||||||
.iter()
|
.iter()
|
||||||
.find(|surface| return surface.program_id == input.program_id);
|
.find(|surface| return surface.program_id == input.program_id);
|
||||||
let surface = match surface {
|
let surface = match surface {
|
||||||
std::option::Option::Some(value) => value,
|
std::option::Option::Some(value) => value,
|
||||||
std::option::Option::None => {
|
std::option::Option::None => {
|
||||||
tracing::debug!(target: crate::DC_SOLANA_CORE_TRACING_TARGET, action = "recognize", signature = %input.signature, instruction_path = %input.instruction_path, program_id = %input.program_id, compatible = false, "native Solana decoder does not support program id");
|
tracing::debug!(target: crate::TRACING_TARGET_DECODER_SOLANA_CORE, action = "recognize", signature = %input.signature, instruction_path = %input.instruction_path, program_id = %input.program_id, compatible = false, "native Solana decoder does not support program id");
|
||||||
return crate::DcApiDecoderRecognition::incompatible();
|
return crate::DcApiDecoderRecognition::incompatible();
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@@ -255,7 +255,7 @@ impl crate::DcApiInstructionDecoder for crate::DcSolanaCoreDecoder {
|
|||||||
crate::decoder_api_discriminator_8_hex(input),
|
crate::decoder_api_discriminator_8_hex(input),
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
tracing::debug!(target: crate::DC_SOLANA_CORE_TRACING_TARGET, action = "recognize", signature = %input.signature, instruction_path = %input.instruction_path, program_id = %input.program_id, surface_code = surface.surface_code, recognition = ?recognition, compatible = true, "native Solana decoder recognized contextual instruction");
|
tracing::debug!(target: crate::TRACING_TARGET_DECODER_SOLANA_CORE, action = "recognize", signature = %input.signature, instruction_path = %input.instruction_path, program_id = %input.program_id, surface_code = surface.surface_code, recognition = ?recognition, compatible = true, "native Solana decoder recognized contextual instruction");
|
||||||
return recognition;
|
return recognition;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -298,7 +298,7 @@ impl crate::DcApiInstructionDecoder for crate::DcSolanaCoreDecoder {
|
|||||||
| crate::DcApiDecoderOutcomeStatus::Unsupported
|
| crate::DcApiDecoderOutcomeStatus::Unsupported
|
||||||
) {
|
) {
|
||||||
tracing::error!(
|
tracing::error!(
|
||||||
target: crate::DC_SOLANA_CORE_TRACING_TARGET,
|
target: crate::TRACING_TARGET_DECODER_SOLANA_CORE,
|
||||||
action = "decode_failure",
|
action = "decode_failure",
|
||||||
signature = %input.signature,
|
signature = %input.signature,
|
||||||
slot = input.slot,
|
slot = input.slot,
|
||||||
@@ -317,7 +317,7 @@ impl crate::DcApiInstructionDecoder for crate::DcSolanaCoreDecoder {
|
|||||||
"native instruction was not decoded successfully"
|
"native instruction was not decoded successfully"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
tracing::debug!(target: crate::DC_SOLANA_CORE_TRACING_TARGET, action = "decode", signature = %input.signature, slot = input.slot, instruction_path = %input.instruction_path, program_id = %input.program_id, input_key = %input.replay_input_key, payload_hash = ?input.instruction_payload_hash, transaction_failed = input.transaction_failed, transaction_error = ?input.transaction_err_json, result_status = ?result.status, recognized_entry_code = ?result.recognized_entry_code, observation_count = result.observations.len(), diagnostic_count = result.diagnostics.len(), "native instruction decode completed");
|
tracing::debug!(target: crate::TRACING_TARGET_DECODER_SOLANA_CORE, action = "decode", signature = %input.signature, slot = input.slot, instruction_path = %input.instruction_path, program_id = %input.program_id, input_key = %input.replay_input_key, payload_hash = ?input.instruction_payload_hash, transaction_failed = input.transaction_failed, transaction_error = ?input.transaction_err_json, result_status = ?result.status, recognized_entry_code = ?result.recognized_entry_code, observation_count = result.observations.len(), diagnostic_count = result.diagnostics.len(), "native instruction decode completed");
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// file: kb-lib/src/decoder/solana/core/loaders.rs
|
// file: kb-lib/src/decoder/solana/core/loaders.rs
|
||||||
// version: 9
|
// version: 10
|
||||||
|
|
||||||
//! Exact bounded decoding for Solana native loader generations.
|
//! Exact bounded decoding for Solana native loader generations.
|
||||||
|
|
||||||
@@ -221,7 +221,7 @@ pub(crate) fn decoder_solana_core_loaders_decode(
|
|||||||
input: &crate::MdCoreInstructionReplayInput,
|
input: &crate::MdCoreInstructionReplayInput,
|
||||||
) -> crate::DcApiDecoderExecutionResult {
|
) -> crate::DcApiDecoderExecutionResult {
|
||||||
if input.program_id == kb_program_ids::NATIVE_LOADER_PROGRAM_ID {
|
if input.program_id == kb_program_ids::NATIVE_LOADER_PROGRAM_ID {
|
||||||
tracing::debug!(target: crate::DC_SOLANA_CORE_TRACING_TARGET, action = "decode_native_loader", signature = %input.signature, instruction_path = %input.instruction_path, source = SOURCE_NATIVE_LOADER, "ignore opaque direct Native Loader invocation without inventing an instruction schema");
|
tracing::debug!(target: crate::TRACING_TARGET_DECODER_SOLANA_CORE, action = "decode_native_loader", signature = %input.signature, instruction_path = %input.instruction_path, source = SOURCE_NATIVE_LOADER, "ignore opaque direct Native Loader invocation without inventing an instruction schema");
|
||||||
return crate::DcApiDecoderExecutionResult::ignored(std::option::Option::Some(
|
return crate::DcApiDecoderExecutionResult::ignored(std::option::Option::Some(
|
||||||
"direct_invocation_opaque".to_string(),
|
"direct_invocation_opaque".to_string(),
|
||||||
));
|
));
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// file: kb-lib/src/decoder/spl.rs
|
// file: kb-lib/src/decoder/spl.rs
|
||||||
// version: 7
|
// version: 8
|
||||||
|
|
||||||
//! `spl` decoder family.
|
//! `spl` decoder family.
|
||||||
|
|
||||||
@@ -31,10 +31,10 @@ pub(crate) use self::associated_token_account::DC_SPL_ATA_MAX_INSTRUCTION_BYTES;
|
|||||||
pub(crate) use self::associated_token_account::DC_SPL_ATA_MAX_TRANSACTION_KEYS;
|
pub(crate) use self::associated_token_account::DC_SPL_ATA_MAX_TRANSACTION_KEYS;
|
||||||
/// Stable protocol and surface code for the Associated Token Account program.
|
/// Stable protocol and surface code for the Associated Token Account program.
|
||||||
pub(crate) use self::associated_token_account::DC_SPL_ATA_SURFACE_CODE;
|
pub(crate) use self::associated_token_account::DC_SPL_ATA_SURFACE_CODE;
|
||||||
/// Canonical tracing target for the Associated Token Account decoder.
|
|
||||||
pub(crate) use self::associated_token_account::DC_SPL_ATA_TRACING_TARGET;
|
|
||||||
/// Exact decoder for the SPL Associated Token Account program.
|
/// Exact decoder for the SPL Associated Token Account program.
|
||||||
pub use self::associated_token_account::DcSplAssociatedTokenAccountDecoder;
|
pub use self::associated_token_account::DcSplAssociatedTokenAccountDecoder;
|
||||||
|
/// Canonical tracing target for the Associated Token Account decoder.
|
||||||
|
pub(crate) use self::associated_token_account::TRACING_TARGET_DECODER_SPL_ATA;
|
||||||
/// Decodes one bounded Associated Token Account instruction.
|
/// Decodes one bounded Associated Token Account instruction.
|
||||||
pub(crate) use self::associated_token_account::decoder_spl_associated_token_account_decode;
|
pub(crate) use self::associated_token_account::decoder_spl_associated_token_account_decode;
|
||||||
/// Returns the exact entry matching an Associated Token Account wire.
|
/// Returns the exact entry matching an Associated Token Account wire.
|
||||||
@@ -49,14 +49,14 @@ pub(crate) use self::elgamal_registry::DC_SPL_ELGAMAL_REGISTRY_EVENT_VERSION;
|
|||||||
pub(crate) use self::elgamal_registry::DC_SPL_ELGAMAL_REGISTRY_MAX_INSTRUCTION_BYTES;
|
pub(crate) use self::elgamal_registry::DC_SPL_ELGAMAL_REGISTRY_MAX_INSTRUCTION_BYTES;
|
||||||
/// Stable SPL ElGamal registry surface code.
|
/// Stable SPL ElGamal registry surface code.
|
||||||
pub(crate) use self::elgamal_registry::DC_SPL_ELGAMAL_REGISTRY_SURFACE_CODE;
|
pub(crate) use self::elgamal_registry::DC_SPL_ELGAMAL_REGISTRY_SURFACE_CODE;
|
||||||
/// Canonical tracing target for the SPL ElGamal registry decoder.
|
|
||||||
pub(crate) use self::elgamal_registry::DC_SPL_ELGAMAL_REGISTRY_TRACING_TARGET;
|
|
||||||
/// One parsed SPL ElGamal registry instruction.
|
/// One parsed SPL ElGamal registry instruction.
|
||||||
pub(crate) use self::elgamal_registry::DcSplElGamalRegistryParsedRegistryInstruction;
|
pub(crate) use self::elgamal_registry::DcSplElGamalRegistryParsedRegistryInstruction;
|
||||||
/// Parsed SPL ElGamal public-key registry account.
|
/// Parsed SPL ElGamal public-key registry account.
|
||||||
pub use self::elgamal_registry::DcSplElGamalRegistryState;
|
pub use self::elgamal_registry::DcSplElGamalRegistryState;
|
||||||
/// Exact decoder for the SPL ElGamal registry program.
|
/// Exact decoder for the SPL ElGamal registry program.
|
||||||
pub use self::elgamal_registry::DcSplElgamalRegistryDecoder;
|
pub use self::elgamal_registry::DcSplElgamalRegistryDecoder;
|
||||||
|
/// Canonical tracing target for the SPL ElGamal registry decoder.
|
||||||
|
pub(crate) use self::elgamal_registry::TRACING_TARGET_DECODER_SPL_ELGAMAL_REGISTRY;
|
||||||
/// Decodes one bounded SPL ElGamal registry instruction.
|
/// Decodes one bounded SPL ElGamal registry instruction.
|
||||||
pub(crate) use self::elgamal_registry::decoder_spl_elgamal_registry_decode;
|
pub(crate) use self::elgamal_registry::decoder_spl_elgamal_registry_decode;
|
||||||
/// Decodes one bounded SPL ElGamal registry instruction payload.
|
/// Decodes one bounded SPL ElGamal registry instruction payload.
|
||||||
@@ -73,8 +73,6 @@ pub(crate) use self::memo::DC_SPL_MEMO_EVENT_VERSION;
|
|||||||
pub(crate) use self::memo::DC_SPL_MEMO_MAX_PAYLOAD_BYTES;
|
pub(crate) use self::memo::DC_SPL_MEMO_MAX_PAYLOAD_BYTES;
|
||||||
/// Stable protocol code shared by Memo generations.
|
/// Stable protocol code shared by Memo generations.
|
||||||
pub(crate) use self::memo::DC_SPL_MEMO_PROTOCOL_CODE;
|
pub(crate) use self::memo::DC_SPL_MEMO_PROTOCOL_CODE;
|
||||||
/// Canonical tracing target for the SPL Memo decoder.
|
|
||||||
pub(crate) use self::memo::DC_SPL_MEMO_TRACING_TARGET;
|
|
||||||
/// Stable Memo v1 surface code.
|
/// Stable Memo v1 surface code.
|
||||||
pub(crate) use self::memo::DC_SPL_MEMO_V1_SURFACE_CODE;
|
pub(crate) use self::memo::DC_SPL_MEMO_V1_SURFACE_CODE;
|
||||||
/// Stable Memo v3 surface code.
|
/// Stable Memo v3 surface code.
|
||||||
@@ -83,6 +81,8 @@ pub(crate) use self::memo::DC_SPL_MEMO_V3_SURFACE_CODE;
|
|||||||
pub(crate) use self::memo::DC_SPL_MEMO_V4_SURFACE_CODE;
|
pub(crate) use self::memo::DC_SPL_MEMO_V4_SURFACE_CODE;
|
||||||
/// Exact decoder for the three registered SPL Memo generations.
|
/// Exact decoder for the three registered SPL Memo generations.
|
||||||
pub use self::memo::DcSplMemoDecoder;
|
pub use self::memo::DcSplMemoDecoder;
|
||||||
|
/// Canonical tracing target for the SPL Memo decoder.
|
||||||
|
pub(crate) use self::memo::TRACING_TARGET_DECODER_SPL_MEMO;
|
||||||
/// Decodes one bounded SPL Memo instruction.
|
/// Decodes one bounded SPL Memo instruction.
|
||||||
pub(crate) use self::memo::decoder_spl_memo_decode;
|
pub(crate) use self::memo::decoder_spl_memo_decode;
|
||||||
/// Reserved `kb_decoder_spl_noop` decoder.
|
/// Reserved `kb_decoder_spl_noop` decoder.
|
||||||
@@ -105,10 +105,10 @@ pub(crate) use self::token::DC_SPL_TOKEN_MAX_BATCH_INSTRUCTIONS;
|
|||||||
pub(crate) use self::token::DC_SPL_TOKEN_MAX_INSTRUCTION_BYTES;
|
pub(crate) use self::token::DC_SPL_TOKEN_MAX_INSTRUCTION_BYTES;
|
||||||
/// Stable protocol and surface code for the classic SPL Token program.
|
/// Stable protocol and surface code for the classic SPL Token program.
|
||||||
pub(crate) use self::token::DC_SPL_TOKEN_SURFACE_CODE;
|
pub(crate) use self::token::DC_SPL_TOKEN_SURFACE_CODE;
|
||||||
/// Canonical tracing target for the classic SPL Token decoder.
|
|
||||||
pub(crate) use self::token::DC_SPL_TOKEN_TRACING_TARGET;
|
|
||||||
/// Exact decoder for the classic SPL Token program.
|
/// Exact decoder for the classic SPL Token program.
|
||||||
pub use self::token::DcSplTokenDecoder;
|
pub use self::token::DcSplTokenDecoder;
|
||||||
|
/// Canonical tracing target for the classic SPL Token decoder.
|
||||||
|
pub(crate) use self::token::TRACING_TARGET_DECODER_SPL_TOKEN;
|
||||||
/// Decodes one bounded classic SPL Token instruction.
|
/// Decodes one bounded classic SPL Token instruction.
|
||||||
pub(crate) use self::token::decoder_spl_token_decode;
|
pub(crate) use self::token::decoder_spl_token_decode;
|
||||||
/// Returns the published entry matching one classic SPL Token tag.
|
/// Returns the published entry matching one classic SPL Token tag.
|
||||||
@@ -131,8 +131,6 @@ pub(crate) use self::token2022::DC_SPL_TOKEN2022_MAX_INSTRUCTION_BYTES;
|
|||||||
pub(crate) use self::token2022::DC_SPL_TOKEN2022_MAX_METADATA_STRING_BYTES;
|
pub(crate) use self::token2022::DC_SPL_TOKEN2022_MAX_METADATA_STRING_BYTES;
|
||||||
/// Stable Token-2022 surface code.
|
/// Stable Token-2022 surface code.
|
||||||
pub(crate) use self::token2022::DC_SPL_TOKEN2022_SURFACE_CODE;
|
pub(crate) use self::token2022::DC_SPL_TOKEN2022_SURFACE_CODE;
|
||||||
/// Canonical tracing target for the Token-2022 decoder.
|
|
||||||
pub(crate) use self::token2022::DC_SPL_TOKEN2022_TRACING_TARGET;
|
|
||||||
/// Exact decoder for the Token-2022 program.
|
/// Exact decoder for the Token-2022 program.
|
||||||
pub use self::token2022::DcSplToken2022Decoder;
|
pub use self::token2022::DcSplToken2022Decoder;
|
||||||
/// Parsed Token-2022 Mint, Account, or Multisig state.
|
/// Parsed Token-2022 Mint, Account, or Multisig state.
|
||||||
@@ -141,6 +139,8 @@ pub use self::token2022::DcToken2022State;
|
|||||||
pub use self::token2022::DcToken2022StateKind;
|
pub use self::token2022::DcToken2022StateKind;
|
||||||
/// One exact Token-2022 TLV entry.
|
/// One exact Token-2022 TLV entry.
|
||||||
pub use self::token2022::DcToken2022TlvEntry;
|
pub use self::token2022::DcToken2022TlvEntry;
|
||||||
|
/// Canonical tracing target for the Token-2022 decoder.
|
||||||
|
pub(crate) use self::token2022::TRACING_TARGET_DECODER_SPL_TOKEN2022;
|
||||||
/// Decodes one bounded Token-2022 instruction.
|
/// Decodes one bounded Token-2022 instruction.
|
||||||
pub(crate) use self::token2022::decoder_spl_token2022_decode;
|
pub(crate) use self::token2022::decoder_spl_token2022_decode;
|
||||||
/// Returns the exact entry matching one Token-2022 tag.
|
/// Returns the exact entry matching one Token-2022 tag.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// file: kb-lib/src/decoder/spl/associated_token_account.rs
|
// file: kb-lib/src/decoder/spl/associated_token_account.rs
|
||||||
// version: 3
|
// version: 4
|
||||||
|
|
||||||
//! Exact SPL Associated Token Account decoder component.
|
//! Exact SPL Associated Token Account decoder component.
|
||||||
|
|
||||||
@@ -27,7 +27,7 @@ pub(crate) use self::constants::DC_SPL_ATA_MAX_TRANSACTION_KEYS;
|
|||||||
/// Stable protocol and surface code for the Associated Token Account program.
|
/// Stable protocol and surface code for the Associated Token Account program.
|
||||||
pub(crate) use self::constants::DC_SPL_ATA_SURFACE_CODE;
|
pub(crate) use self::constants::DC_SPL_ATA_SURFACE_CODE;
|
||||||
/// Canonical tracing target for the Associated Token Account decoder.
|
/// Canonical tracing target for the Associated Token Account decoder.
|
||||||
pub(crate) use self::constants::DC_SPL_ATA_TRACING_TARGET;
|
pub(crate) use self::constants::TRACING_TARGET_DECODER_SPL_ATA;
|
||||||
/// Decodes one bounded Associated Token Account instruction.
|
/// Decodes one bounded Associated Token Account instruction.
|
||||||
pub(crate) use self::wire::decoder_spl_associated_token_account_decode;
|
pub(crate) use self::wire::decoder_spl_associated_token_account_decode;
|
||||||
/// Returns the exact entry matching an Associated Token Account wire.
|
/// Returns the exact entry matching an Associated Token Account wire.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// file: kb-lib/src/decoder/spl/associated_token_account/constants.rs
|
// file: kb-lib/src/decoder/spl/associated_token_account/constants.rs
|
||||||
// version: 1
|
// version: 2
|
||||||
|
|
||||||
//! Local constants for the `kb-lib` SPL Associated Token Account component.
|
//! Local constants for the `kb-lib` SPL Associated Token Account component.
|
||||||
|
|
||||||
@@ -24,4 +24,5 @@ pub(crate) const DC_SPL_ATA_INSTRUCTION_ENTRIES: &[(u8, &str, bool)] = &[
|
|||||||
(2, "recover_nested", false),
|
(2, "recover_nested", false),
|
||||||
];
|
];
|
||||||
/// Canonical tracing target for the Associated Token Account decoder.
|
/// Canonical tracing target for the Associated Token Account decoder.
|
||||||
pub(crate) const DC_SPL_ATA_TRACING_TARGET: &str = "kb-lib.decoder.spl.associated_token_account";
|
pub(crate) const TRACING_TARGET_DECODER_SPL_ATA: &str =
|
||||||
|
"kb-lib.decoder.spl.associated_token_account";
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// file: kb-lib/src/decoder/spl/associated_token_account/decoder.rs
|
// file: kb-lib/src/decoder/spl/associated_token_account/decoder.rs
|
||||||
// version: 1
|
// version: 2
|
||||||
|
|
||||||
//! Exact SPL Associated Token Account dispatch for the common decode pipeline.
|
//! Exact SPL Associated Token Account dispatch for the common decode pipeline.
|
||||||
|
|
||||||
@@ -111,7 +111,7 @@ impl crate::DcApiInstructionDecoder for crate::DcSplAssociatedTokenAccountDecode
|
|||||||
| crate::DcApiDecoderOutcomeStatus::Unsupported
|
| crate::DcApiDecoderOutcomeStatus::Unsupported
|
||||||
) {
|
) {
|
||||||
tracing::error!(
|
tracing::error!(
|
||||||
target: crate::DC_SPL_ATA_TRACING_TARGET,
|
target: crate::TRACING_TARGET_DECODER_SPL_ATA,
|
||||||
action = "decode_failure",
|
action = "decode_failure",
|
||||||
signature = %input.signature,
|
signature = %input.signature,
|
||||||
slot = input.slot,
|
slot = input.slot,
|
||||||
@@ -126,7 +126,7 @@ impl crate::DcApiInstructionDecoder for crate::DcSplAssociatedTokenAccountDecode
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
tracing::debug!(
|
tracing::debug!(
|
||||||
target: crate::DC_SPL_ATA_TRACING_TARGET,
|
target: crate::TRACING_TARGET_DECODER_SPL_ATA,
|
||||||
action = "decode",
|
action = "decode",
|
||||||
signature = %input.signature,
|
signature = %input.signature,
|
||||||
instruction_path = %input.instruction_path,
|
instruction_path = %input.instruction_path,
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// file: kb-lib/src/decoder/spl/elgamal_registry.rs
|
// file: kb-lib/src/decoder/spl/elgamal_registry.rs
|
||||||
// version: 2
|
// version: 3
|
||||||
|
|
||||||
//! Exact SPL Token-2022 ElGamal public-key registry decoder component.
|
//! Exact SPL Token-2022 ElGamal public-key registry decoder component.
|
||||||
|
|
||||||
@@ -24,7 +24,7 @@ pub(crate) use self::constants::DC_SPL_ELGAMAL_REGISTRY_MAX_INSTRUCTION_BYTES;
|
|||||||
/// Stable SPL ElGamal registry surface code.
|
/// Stable SPL ElGamal registry surface code.
|
||||||
pub(crate) use self::constants::DC_SPL_ELGAMAL_REGISTRY_SURFACE_CODE;
|
pub(crate) use self::constants::DC_SPL_ELGAMAL_REGISTRY_SURFACE_CODE;
|
||||||
/// Canonical tracing target for the SPL ElGamal registry decoder.
|
/// Canonical tracing target for the SPL ElGamal registry decoder.
|
||||||
pub(crate) use self::constants::DC_SPL_ELGAMAL_REGISTRY_TRACING_TARGET;
|
pub(crate) use self::constants::TRACING_TARGET_DECODER_SPL_ELGAMAL_REGISTRY;
|
||||||
/// One parsed SPL ElGamal registry instruction.
|
/// One parsed SPL ElGamal registry instruction.
|
||||||
pub(crate) use self::wire::DcSplElGamalRegistryParsedRegistryInstruction;
|
pub(crate) use self::wire::DcSplElGamalRegistryParsedRegistryInstruction;
|
||||||
/// Decodes one bounded SPL ElGamal registry instruction.
|
/// Decodes one bounded SPL ElGamal registry instruction.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// file: kb-lib/src/decoder/spl/elgamal_registry/constants.rs
|
// file: kb-lib/src/decoder/spl/elgamal_registry/constants.rs
|
||||||
// version: 1
|
// version: 2
|
||||||
|
|
||||||
//! Constants for the SPL ElGamal registry decoder.
|
//! Constants for the SPL ElGamal registry decoder.
|
||||||
|
|
||||||
@@ -8,5 +8,5 @@ pub(crate) const DC_SPL_ELGAMAL_REGISTRY_EVENT_VERSION: u32 = 1;
|
|||||||
pub(crate) const DC_SPL_ELGAMAL_REGISTRY_MAX_INSTRUCTION_BYTES: usize = 16;
|
pub(crate) const DC_SPL_ELGAMAL_REGISTRY_MAX_INSTRUCTION_BYTES: usize = 16;
|
||||||
|
|
||||||
/// Canonical tracing target for this crate.
|
/// Canonical tracing target for this crate.
|
||||||
pub(crate) const DC_SPL_ELGAMAL_REGISTRY_TRACING_TARGET: &str =
|
pub(crate) const TRACING_TARGET_DECODER_SPL_ELGAMAL_REGISTRY: &str =
|
||||||
"kb-lib.decoder.spl.elgamal_registry";
|
"kb-lib.decoder.spl.elgamal_registry";
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// file: kb-lib/src/decoder/spl/elgamal_registry/decoder.rs
|
// file: kb-lib/src/decoder/spl/elgamal_registry/decoder.rs
|
||||||
// version: 1
|
// version: 2
|
||||||
|
|
||||||
//! Exact dispatch for the SPL ElGamal registry program.
|
//! Exact dispatch for the SPL ElGamal registry program.
|
||||||
|
|
||||||
@@ -125,7 +125,7 @@ impl crate::DcApiInstructionDecoder for crate::DcSplElgamalRegistryDecoder {
|
|||||||
| crate::DcApiDecoderOutcomeStatus::Unsupported
|
| crate::DcApiDecoderOutcomeStatus::Unsupported
|
||||||
) {
|
) {
|
||||||
tracing::error!(
|
tracing::error!(
|
||||||
target: crate::DC_SPL_ELGAMAL_REGISTRY_TRACING_TARGET,
|
target: crate::TRACING_TARGET_DECODER_SPL_ELGAMAL_REGISTRY,
|
||||||
action = "decode_failure",
|
action = "decode_failure",
|
||||||
signature = %input.signature,
|
signature = %input.signature,
|
||||||
slot = input.slot,
|
slot = input.slot,
|
||||||
@@ -142,7 +142,7 @@ impl crate::DcApiInstructionDecoder for crate::DcSplElgamalRegistryDecoder {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
tracing::debug!(
|
tracing::debug!(
|
||||||
target: crate::DC_SPL_ELGAMAL_REGISTRY_TRACING_TARGET,
|
target: crate::TRACING_TARGET_DECODER_SPL_ELGAMAL_REGISTRY,
|
||||||
action = "decode",
|
action = "decode",
|
||||||
signature = %input.signature,
|
signature = %input.signature,
|
||||||
instruction_path = %input.instruction_path,
|
instruction_path = %input.instruction_path,
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// file: kb-lib/src/decoder/spl/memo.rs
|
// file: kb-lib/src/decoder/spl/memo.rs
|
||||||
// version: 2
|
// version: 3
|
||||||
|
|
||||||
//! Exact SPL Memo v1, v3 and v4 decoder component.
|
//! Exact SPL Memo v1, v3 and v4 decoder component.
|
||||||
|
|
||||||
@@ -18,13 +18,13 @@ pub(crate) use self::constants::DC_SPL_MEMO_EVENT_VERSION;
|
|||||||
pub(crate) use self::constants::DC_SPL_MEMO_MAX_PAYLOAD_BYTES;
|
pub(crate) use self::constants::DC_SPL_MEMO_MAX_PAYLOAD_BYTES;
|
||||||
/// Stable protocol code shared by Memo generations.
|
/// Stable protocol code shared by Memo generations.
|
||||||
pub(crate) use self::constants::DC_SPL_MEMO_PROTOCOL_CODE;
|
pub(crate) use self::constants::DC_SPL_MEMO_PROTOCOL_CODE;
|
||||||
/// Canonical tracing target for the SPL Memo decoder.
|
|
||||||
pub(crate) use self::constants::DC_SPL_MEMO_TRACING_TARGET;
|
|
||||||
/// Stable Memo v1 surface code.
|
/// Stable Memo v1 surface code.
|
||||||
pub(crate) use self::constants::DC_SPL_MEMO_V1_SURFACE_CODE;
|
pub(crate) use self::constants::DC_SPL_MEMO_V1_SURFACE_CODE;
|
||||||
/// Stable Memo v3 surface code.
|
/// Stable Memo v3 surface code.
|
||||||
pub(crate) use self::constants::DC_SPL_MEMO_V3_SURFACE_CODE;
|
pub(crate) use self::constants::DC_SPL_MEMO_V3_SURFACE_CODE;
|
||||||
/// Stable Memo v4 surface code.
|
/// Stable Memo v4 surface code.
|
||||||
pub(crate) use self::constants::DC_SPL_MEMO_V4_SURFACE_CODE;
|
pub(crate) use self::constants::DC_SPL_MEMO_V4_SURFACE_CODE;
|
||||||
|
/// Canonical tracing target for the SPL Memo decoder.
|
||||||
|
pub(crate) use self::constants::TRACING_TARGET_DECODER_SPL_MEMO;
|
||||||
/// Decodes one bounded SPL Memo instruction.
|
/// Decodes one bounded SPL Memo instruction.
|
||||||
pub(crate) use self::payload::decoder_spl_memo_decode;
|
pub(crate) use self::payload::decoder_spl_memo_decode;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// file: kb-lib/src/decoder/spl/memo/constants.rs
|
// file: kb-lib/src/decoder/spl/memo/constants.rs
|
||||||
// version: 2
|
// version: 3
|
||||||
|
|
||||||
//! Local constants for the `kb-lib` SPL Memo component. Program identifiers live in `kb_program_ids`.
|
//! Local constants for the `kb-lib` SPL Memo component. Program identifiers live in `kb_program_ids`.
|
||||||
|
|
||||||
@@ -18,4 +18,4 @@ pub(crate) const DC_SPL_MEMO_DIAGNOSTIC_PREFIX_BYTES: usize = 32;
|
|||||||
/// Current stable Memo decoded event contract version.
|
/// Current stable Memo decoded event contract version.
|
||||||
pub(crate) const DC_SPL_MEMO_EVENT_VERSION: u32 = 1;
|
pub(crate) const DC_SPL_MEMO_EVENT_VERSION: u32 = 1;
|
||||||
/// Canonical tracing target for this crate.
|
/// Canonical tracing target for this crate.
|
||||||
pub(crate) const DC_SPL_MEMO_TRACING_TARGET: &str = "kb-lib.decoder.spl.memo";
|
pub(crate) const TRACING_TARGET_DECODER_SPL_MEMO: &str = "kb-lib.decoder.spl.memo";
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// file: kb-lib/src/decoder/spl/memo/decoder.rs
|
// file: kb-lib/src/decoder/spl/memo/decoder.rs
|
||||||
// version: 1
|
// version: 2
|
||||||
|
|
||||||
//! Exact SPL Memo v1, v3 and v4 dispatch for the common decode pipeline.
|
//! Exact SPL Memo v1, v3 and v4 dispatch for the common decode pipeline.
|
||||||
|
|
||||||
@@ -124,7 +124,7 @@ impl crate::DcApiInstructionDecoder for crate::DcSplMemoDecoder {
|
|||||||
| crate::DcApiDecoderOutcomeStatus::Unsupported
|
| crate::DcApiDecoderOutcomeStatus::Unsupported
|
||||||
) {
|
) {
|
||||||
tracing::error!(
|
tracing::error!(
|
||||||
target: crate::DC_SPL_MEMO_TRACING_TARGET,
|
target: crate::TRACING_TARGET_DECODER_SPL_MEMO,
|
||||||
action = "decode_failure",
|
action = "decode_failure",
|
||||||
signature = %input.signature,
|
signature = %input.signature,
|
||||||
slot = input.slot,
|
slot = input.slot,
|
||||||
@@ -141,7 +141,7 @@ impl crate::DcApiInstructionDecoder for crate::DcSplMemoDecoder {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
tracing::debug!(
|
tracing::debug!(
|
||||||
target: crate::DC_SPL_MEMO_TRACING_TARGET,
|
target: crate::TRACING_TARGET_DECODER_SPL_MEMO,
|
||||||
action = "decode",
|
action = "decode",
|
||||||
signature = %input.signature,
|
signature = %input.signature,
|
||||||
instruction_path = %input.instruction_path,
|
instruction_path = %input.instruction_path,
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// file: kb-lib/src/decoder/spl/token.rs
|
// file: kb-lib/src/decoder/spl/token.rs
|
||||||
// version: 2
|
// version: 3
|
||||||
|
|
||||||
//! Exact classic SPL Token decoder component.
|
//! Exact classic SPL Token decoder component.
|
||||||
|
|
||||||
@@ -25,7 +25,7 @@ pub(crate) use self::constants::DC_SPL_TOKEN_MAX_INSTRUCTION_BYTES;
|
|||||||
/// Stable protocol and surface code for the classic SPL Token program.
|
/// Stable protocol and surface code for the classic SPL Token program.
|
||||||
pub(crate) use self::constants::DC_SPL_TOKEN_SURFACE_CODE;
|
pub(crate) use self::constants::DC_SPL_TOKEN_SURFACE_CODE;
|
||||||
/// Canonical tracing target for the classic SPL Token decoder.
|
/// Canonical tracing target for the classic SPL Token decoder.
|
||||||
pub(crate) use self::constants::DC_SPL_TOKEN_TRACING_TARGET;
|
pub(crate) use self::constants::TRACING_TARGET_DECODER_SPL_TOKEN;
|
||||||
/// Decodes one bounded classic SPL Token instruction.
|
/// Decodes one bounded classic SPL Token instruction.
|
||||||
pub(crate) use self::wire::decoder_spl_token_decode;
|
pub(crate) use self::wire::decoder_spl_token_decode;
|
||||||
/// Returns the published entry matching one classic SPL Token tag.
|
/// Returns the published entry matching one classic SPL Token tag.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// file: kb-lib/src/decoder/spl/token/constants.rs
|
// file: kb-lib/src/decoder/spl/token/constants.rs
|
||||||
// version: 1
|
// version: 2
|
||||||
|
|
||||||
//! Local constants for the `kb-lib` SPL Token component. Program identifiers live in `kb_program_ids`.
|
//! Local constants for the `kb-lib` SPL Token component. Program identifiers live in `kb_program_ids`.
|
||||||
|
|
||||||
@@ -47,4 +47,4 @@ pub(crate) const DC_SPL_TOKEN_INSTRUCTION_ENTRIES: &[(u8, &str, bool)] = &[
|
|||||||
(255, "batch", false),
|
(255, "batch", false),
|
||||||
];
|
];
|
||||||
/// Canonical tracing target for this crate.
|
/// Canonical tracing target for this crate.
|
||||||
pub(crate) const DC_SPL_TOKEN_TRACING_TARGET: &str = "kb-lib.decoder.spl.token";
|
pub(crate) const TRACING_TARGET_DECODER_SPL_TOKEN: &str = "kb-lib.decoder.spl.token";
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// file: kb-lib/src/decoder/spl/token/decoder.rs
|
// file: kb-lib/src/decoder/spl/token/decoder.rs
|
||||||
// version: 1
|
// version: 2
|
||||||
|
|
||||||
//! Exact classic SPL Token dispatch for the common decode pipeline.
|
//! Exact classic SPL Token dispatch for the common decode pipeline.
|
||||||
|
|
||||||
@@ -109,7 +109,7 @@ impl crate::DcApiInstructionDecoder for crate::DcSplTokenDecoder {
|
|||||||
| crate::DcApiDecoderOutcomeStatus::Unsupported
|
| crate::DcApiDecoderOutcomeStatus::Unsupported
|
||||||
) {
|
) {
|
||||||
tracing::error!(
|
tracing::error!(
|
||||||
target: crate::DC_SPL_TOKEN_TRACING_TARGET,
|
target: crate::TRACING_TARGET_DECODER_SPL_TOKEN,
|
||||||
action = "decode_failure",
|
action = "decode_failure",
|
||||||
signature = %input.signature,
|
signature = %input.signature,
|
||||||
slot = input.slot,
|
slot = input.slot,
|
||||||
@@ -125,7 +125,7 @@ impl crate::DcApiInstructionDecoder for crate::DcSplTokenDecoder {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
tracing::debug!(
|
tracing::debug!(
|
||||||
target: crate::DC_SPL_TOKEN_TRACING_TARGET,
|
target: crate::TRACING_TARGET_DECODER_SPL_TOKEN,
|
||||||
action = "decode",
|
action = "decode",
|
||||||
signature = %input.signature,
|
signature = %input.signature,
|
||||||
instruction_path = %input.instruction_path,
|
instruction_path = %input.instruction_path,
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// file: kb-lib/src/decoder/spl/token2022.rs
|
// file: kb-lib/src/decoder/spl/token2022.rs
|
||||||
// version: 2
|
// version: 3
|
||||||
|
|
||||||
//! Exact Token-2022 instruction and state decoder component.
|
//! Exact Token-2022 instruction and state decoder component.
|
||||||
|
|
||||||
@@ -36,7 +36,7 @@ pub(crate) use self::constants::DC_SPL_TOKEN2022_MAX_METADATA_STRING_BYTES;
|
|||||||
/// Stable Token-2022 surface code.
|
/// Stable Token-2022 surface code.
|
||||||
pub(crate) use self::constants::DC_SPL_TOKEN2022_SURFACE_CODE;
|
pub(crate) use self::constants::DC_SPL_TOKEN2022_SURFACE_CODE;
|
||||||
/// Canonical tracing target for the Token-2022 decoder.
|
/// Canonical tracing target for the Token-2022 decoder.
|
||||||
pub(crate) use self::constants::DC_SPL_TOKEN2022_TRACING_TARGET;
|
pub(crate) use self::constants::TRACING_TARGET_DECODER_SPL_TOKEN2022;
|
||||||
/// Decodes one bounded Token-2022 instruction.
|
/// Decodes one bounded Token-2022 instruction.
|
||||||
pub(crate) use self::wire::decoder_spl_token2022_decode;
|
pub(crate) use self::wire::decoder_spl_token2022_decode;
|
||||||
/// Returns the exact entry matching one Token-2022 tag.
|
/// Returns the exact entry matching one Token-2022 tag.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// file: kb-lib/src/decoder/spl/token2022/constants.rs
|
// file: kb-lib/src/decoder/spl/token2022/constants.rs
|
||||||
// version: 1
|
// version: 2
|
||||||
|
|
||||||
//! Local constants for the exact Token-2022 decoder. Program identifiers live in `kb_program_ids`.
|
//! Local constants for the exact Token-2022 decoder. Program identifiers live in `kb_program_ids`.
|
||||||
|
|
||||||
@@ -69,4 +69,4 @@ pub(crate) const DC_SPL_TOKEN2022_INSTRUCTION_ENTRIES: &[(u8, &str, bool)] = &[
|
|||||||
(255, "batch", false),
|
(255, "batch", false),
|
||||||
];
|
];
|
||||||
/// Canonical tracing target for this crate.
|
/// Canonical tracing target for this crate.
|
||||||
pub(crate) const DC_SPL_TOKEN2022_TRACING_TARGET: &str = "kb-lib.decoder.spl.token2022";
|
pub(crate) const TRACING_TARGET_DECODER_SPL_TOKEN2022: &str = "kb-lib.decoder.spl.token2022";
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// file: kb-lib/src/decoder/spl/token2022/decoder.rs
|
// file: kb-lib/src/decoder/spl/token2022/decoder.rs
|
||||||
// version: 1
|
// version: 2
|
||||||
|
|
||||||
//! Exact Token-2022 dispatch for the common decode pipeline.
|
//! Exact Token-2022 dispatch for the common decode pipeline.
|
||||||
|
|
||||||
@@ -109,7 +109,7 @@ impl crate::DcApiInstructionDecoder for crate::DcSplToken2022Decoder {
|
|||||||
| crate::DcApiDecoderOutcomeStatus::Unsupported
|
| crate::DcApiDecoderOutcomeStatus::Unsupported
|
||||||
) {
|
) {
|
||||||
tracing::error!(
|
tracing::error!(
|
||||||
target: crate::DC_SPL_TOKEN2022_TRACING_TARGET,
|
target: crate::TRACING_TARGET_DECODER_SPL_TOKEN2022,
|
||||||
action = "decode_failure",
|
action = "decode_failure",
|
||||||
signature = %input.signature,
|
signature = %input.signature,
|
||||||
slot = input.slot,
|
slot = input.slot,
|
||||||
@@ -125,7 +125,7 @@ impl crate::DcApiInstructionDecoder for crate::DcSplToken2022Decoder {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
tracing::debug!(
|
tracing::debug!(
|
||||||
target: crate::DC_SPL_TOKEN2022_TRACING_TARGET,
|
target: crate::TRACING_TARGET_DECODER_SPL_TOKEN2022,
|
||||||
action = "decode",
|
action = "decode",
|
||||||
signature = %input.signature,
|
signature = %input.signature,
|
||||||
instruction_path = %input.instruction_path,
|
instruction_path = %input.instruction_path,
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// file: kb-lib/src/executor.rs
|
// file: kb-lib/src/executor.rs
|
||||||
// version: 6
|
// version: 7
|
||||||
|
|
||||||
//! Consolidated executor modules.
|
//! Consolidated executor modules.
|
||||||
|
|
||||||
@@ -823,7 +823,7 @@ pub use self::wallet::ExWalletJupiterApeproSmartWalletExecutor;
|
|||||||
pub use self::weighted::ExWeightedSwapStabbleExecutor;
|
pub use self::weighted::ExWeightedSwapStabbleExecutor;
|
||||||
|
|
||||||
/// Canonical tracing target for this crate.
|
/// Canonical tracing target for this crate.
|
||||||
pub(crate) use self::solana::EX_SOLANA_CORE_TRACING_TARGET;
|
pub(crate) use self::solana::TRACING_TARGET_EXECUTOR_SOLANA_CORE;
|
||||||
/// Crate-root access to `build_prepared_plan` from `address_lookup_table`.
|
/// Crate-root access to `build_prepared_plan` from `address_lookup_table`.
|
||||||
pub(crate) use self::solana::executor_solana_core_address_lookup_table_build_prepared_plan;
|
pub(crate) use self::solana::executor_solana_core_address_lookup_table_build_prepared_plan;
|
||||||
/// Crate-root access to `build_prepared_plan` from `builder`.
|
/// Crate-root access to `build_prepared_plan` from `builder`.
|
||||||
@@ -860,20 +860,20 @@ pub(crate) use self::solana::executor_solana_core_validate_seeded_address;
|
|||||||
pub(crate) use self::solana::executor_solana_core_vote_build_prepared_plan;
|
pub(crate) use self::solana::executor_solana_core_vote_build_prepared_plan;
|
||||||
/// Crate-root access to `build_prepared_plan` from `zk_elgamal`.
|
/// Crate-root access to `build_prepared_plan` from `zk_elgamal`.
|
||||||
pub(crate) use self::solana::executor_solana_core_zk_elgamal_build_prepared_plan;
|
pub(crate) use self::solana::executor_solana_core_zk_elgamal_build_prepared_plan;
|
||||||
/// Canonical SPL ATA tracing target.
|
|
||||||
pub(crate) use self::spl::EX_SPL_ATA_TRACING_TARGET;
|
|
||||||
/// Canonical SPL ElGamal registry tracing target.
|
|
||||||
pub(crate) use self::spl::EX_SPL_ELGAMAL_REGISTRY_TRACING_TARGET;
|
|
||||||
/// Canonical SPL Memo tracing target.
|
|
||||||
pub(crate) use self::spl::EX_SPL_MEMO_TRACING_TARGET;
|
|
||||||
/// Maximum ordered multisig signer occurrences for SPL Token-2022.
|
/// Maximum ordered multisig signer occurrences for SPL Token-2022.
|
||||||
pub(crate) use self::spl::EX_SPL_TOKEN2022_MAX_MULTISIG_SIGNERS;
|
pub(crate) use self::spl::EX_SPL_TOKEN2022_MAX_MULTISIG_SIGNERS;
|
||||||
/// Maximum transfer-fee source account count for SPL Token-2022.
|
/// Maximum transfer-fee source account count for SPL Token-2022.
|
||||||
pub(crate) use self::spl::EX_SPL_TOKEN2022_MAX_TRANSFER_FEE_SOURCE_ACCOUNTS;
|
pub(crate) use self::spl::EX_SPL_TOKEN2022_MAX_TRANSFER_FEE_SOURCE_ACCOUNTS;
|
||||||
/// Maximum UI amount byte length for SPL Token-2022.
|
/// Maximum UI amount byte length for SPL Token-2022.
|
||||||
pub(crate) use self::spl::EX_SPL_TOKEN2022_MAX_UI_AMOUNT_BYTES;
|
pub(crate) use self::spl::EX_SPL_TOKEN2022_MAX_UI_AMOUNT_BYTES;
|
||||||
|
/// Canonical SPL ATA tracing target.
|
||||||
|
pub(crate) use self::spl::TRACING_TARGET_EXECUTOR_SPL_ATA;
|
||||||
|
/// Canonical SPL ElGamal registry tracing target.
|
||||||
|
pub(crate) use self::spl::TRACING_TARGET_EXECUTOR_SPL_ELGAMAL_REGISTRY;
|
||||||
|
/// Canonical SPL Memo tracing target.
|
||||||
|
pub(crate) use self::spl::TRACING_TARGET_EXECUTOR_SPL_MEMO;
|
||||||
/// Canonical SPL Token-2022 tracing target.
|
/// Canonical SPL Token-2022 tracing target.
|
||||||
pub(crate) use self::spl::EX_SPL_TOKEN2022_TRACING_TARGET;
|
pub(crate) use self::spl::TRACING_TARGET_EXECUTOR_SPL_TOKEN2022;
|
||||||
/// Internal SPL ATA plan builder.
|
/// Internal SPL ATA plan builder.
|
||||||
pub(crate) use self::spl::executor_spl_ata_build_prepared_plan;
|
pub(crate) use self::spl::executor_spl_ata_build_prepared_plan;
|
||||||
/// Internal SPL ElGamal registry plan builder.
|
/// Internal SPL ElGamal registry plan builder.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// file: kb-lib/src/executor/solana.rs
|
// file: kb-lib/src/executor/solana.rs
|
||||||
// version: 3
|
// version: 4
|
||||||
|
|
||||||
//! `solana` executor family.
|
//! `solana` executor family.
|
||||||
|
|
||||||
@@ -255,7 +255,7 @@ pub use self::core::ExSolanaCoreZkElGamalContextState;
|
|||||||
pub use self::core::ExSolanaCoreZkElGamalProofType;
|
pub use self::core::ExSolanaCoreZkElGamalProofType;
|
||||||
|
|
||||||
/// Canonical tracing target for this crate.
|
/// Canonical tracing target for this crate.
|
||||||
pub(crate) use self::core::EX_SOLANA_CORE_TRACING_TARGET;
|
pub(crate) use self::core::TRACING_TARGET_EXECUTOR_SOLANA_CORE;
|
||||||
/// Crate-root access to `build_prepared_plan` from `address_lookup_table`.
|
/// Crate-root access to `build_prepared_plan` from `address_lookup_table`.
|
||||||
pub(crate) use self::core::executor_solana_core_address_lookup_table_build_prepared_plan;
|
pub(crate) use self::core::executor_solana_core_address_lookup_table_build_prepared_plan;
|
||||||
/// Crate-root access to `build_prepared_plan` from `builder`.
|
/// Crate-root access to `build_prepared_plan` from `builder`.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// file: kb-lib/src/executor/solana/core.rs
|
// file: kb-lib/src/executor/solana/core.rs
|
||||||
// version: 3
|
// version: 4
|
||||||
|
|
||||||
//! Safe typed executor for supported Solana core operations.
|
//! Safe typed executor for supported Solana core operations.
|
||||||
|
|
||||||
@@ -274,7 +274,7 @@ pub(crate) use self::builder::executor_solana_core_builder_build_prepared_plan;
|
|||||||
/// Crate-root access to `finalize_prepared_plan` from `builder`.
|
/// Crate-root access to `finalize_prepared_plan` from `builder`.
|
||||||
pub(crate) use self::builder::executor_solana_core_finalize_prepared_plan;
|
pub(crate) use self::builder::executor_solana_core_finalize_prepared_plan;
|
||||||
/// Canonical tracing target for this crate.
|
/// Canonical tracing target for this crate.
|
||||||
pub(crate) use self::constants::EX_SOLANA_CORE_TRACING_TARGET;
|
pub(crate) use self::constants::TRACING_TARGET_EXECUTOR_SOLANA_CORE;
|
||||||
/// Crate-root access to `build_prepared_plan` from `loader_v3`.
|
/// Crate-root access to `build_prepared_plan` from `loader_v3`.
|
||||||
pub(crate) use self::loader_v3::executor_solana_core_loader_v3_build_prepared_plan;
|
pub(crate) use self::loader_v3::executor_solana_core_loader_v3_build_prepared_plan;
|
||||||
/// Crate-root access to `build_prepared_plan` from `loader_v4`.
|
/// Crate-root access to `build_prepared_plan` from `loader_v4`.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// file: kb-lib/src/executor/solana/core/builder.rs
|
// file: kb-lib/src/executor/solana/core/builder.rs
|
||||||
// version: 1
|
// version: 2
|
||||||
|
|
||||||
//! Official Solana core instruction builders and shared plan finalization.
|
//! Official Solana core instruction builders and shared plan finalization.
|
||||||
|
|
||||||
@@ -1239,7 +1239,7 @@ pub(crate) fn executor_solana_core_finalize_prepared_plan(
|
|||||||
std::result::Result::Err(error) => return std::result::Result::Err(error),
|
std::result::Result::Err(error) => return std::result::Result::Err(error),
|
||||||
}
|
}
|
||||||
tracing::debug!(
|
tracing::debug!(
|
||||||
target: crate::EX_SOLANA_CORE_TRACING_TARGET,
|
target: crate::TRACING_TARGET_EXECUTOR_SOLANA_CORE,
|
||||||
action = "executor_solana_core_builder_build_prepared_plan",
|
action = "executor_solana_core_builder_build_prepared_plan",
|
||||||
intent_id = %intent.intent_id,
|
intent_id = %intent.intent_id,
|
||||||
operation_code,
|
operation_code,
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// file: kb-lib/src/executor/solana/core/constants.rs
|
// file: kb-lib/src/executor/solana/core/constants.rs
|
||||||
// version: 1
|
// version: 2
|
||||||
|
|
||||||
//! Local constants for the `kb_executor_solana_core` crate. Program identifiers live in `kb_program_ids`.
|
//! Local constants for the `kb_executor_solana_core` crate. Program identifiers live in `kb_program_ids`.
|
||||||
|
|
||||||
/// Canonical tracing target for this crate.
|
/// Canonical tracing target for this crate.
|
||||||
pub(crate) const EX_SOLANA_CORE_TRACING_TARGET: &str = "kb-lib.executor.solana.core";
|
pub(crate) const TRACING_TARGET_EXECUTOR_SOLANA_CORE: &str = "kb-lib.executor.solana.core";
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// file: kb-lib/src/executor/spl.rs
|
// file: kb-lib/src/executor/spl.rs
|
||||||
// version: 5
|
// version: 6
|
||||||
|
|
||||||
//! `spl` executor family.
|
//! `spl` executor family.
|
||||||
|
|
||||||
@@ -309,15 +309,15 @@ pub use self::token2022::ExSplTokenSingleOperation;
|
|||||||
pub use self::token2022::executor_spl_token2022_validate_confidential_proof_references;
|
pub use self::token2022::executor_spl_token2022_validate_confidential_proof_references;
|
||||||
|
|
||||||
/// Canonical SPL ATA tracing target.
|
/// Canonical SPL ATA tracing target.
|
||||||
pub(crate) use self::associated_token_account::EX_SPL_ATA_TRACING_TARGET;
|
pub(crate) use self::associated_token_account::TRACING_TARGET_EXECUTOR_SPL_ATA;
|
||||||
/// Internal SPL ATA plan builder.
|
/// Internal SPL ATA plan builder.
|
||||||
pub(crate) use self::associated_token_account::executor_spl_ata_build_prepared_plan;
|
pub(crate) use self::associated_token_account::executor_spl_ata_build_prepared_plan;
|
||||||
/// Canonical SPL ElGamal registry tracing target.
|
/// Canonical SPL ElGamal registry tracing target.
|
||||||
pub(crate) use self::elgamal_registry::EX_SPL_ELGAMAL_REGISTRY_TRACING_TARGET;
|
pub(crate) use self::elgamal_registry::TRACING_TARGET_EXECUTOR_SPL_ELGAMAL_REGISTRY;
|
||||||
/// Internal SPL ElGamal registry plan builder.
|
/// Internal SPL ElGamal registry plan builder.
|
||||||
pub(crate) use self::elgamal_registry::executor_spl_elgamal_registry_build_prepared_plan;
|
pub(crate) use self::elgamal_registry::executor_spl_elgamal_registry_build_prepared_plan;
|
||||||
/// Canonical SPL Memo tracing target.
|
/// Canonical SPL Memo tracing target.
|
||||||
pub(crate) use self::memo::EX_SPL_MEMO_TRACING_TARGET;
|
pub(crate) use self::memo::TRACING_TARGET_EXECUTOR_SPL_MEMO;
|
||||||
/// Internal SPL Memo plan builder.
|
/// Internal SPL Memo plan builder.
|
||||||
pub(crate) use self::memo::executor_spl_memo_build_prepared_plan;
|
pub(crate) use self::memo::executor_spl_memo_build_prepared_plan;
|
||||||
/// Maximum ordered multisig signer occurrences for SPL Token-2022.
|
/// Maximum ordered multisig signer occurrences for SPL Token-2022.
|
||||||
@@ -327,6 +327,6 @@ pub(crate) use self::token2022::EX_SPL_TOKEN2022_MAX_TRANSFER_FEE_SOURCE_ACCOUNT
|
|||||||
/// Maximum UI amount byte length for SPL Token-2022.
|
/// Maximum UI amount byte length for SPL Token-2022.
|
||||||
pub(crate) use self::token2022::EX_SPL_TOKEN2022_MAX_UI_AMOUNT_BYTES;
|
pub(crate) use self::token2022::EX_SPL_TOKEN2022_MAX_UI_AMOUNT_BYTES;
|
||||||
/// Canonical SPL Token-2022 tracing target.
|
/// Canonical SPL Token-2022 tracing target.
|
||||||
pub(crate) use self::token2022::EX_SPL_TOKEN2022_TRACING_TARGET;
|
pub(crate) use self::token2022::TRACING_TARGET_EXECUTOR_SPL_TOKEN2022;
|
||||||
/// Internal SPL Token-2022 prepared-plan builder.
|
/// Internal SPL Token-2022 prepared-plan builder.
|
||||||
pub(crate) use self::token2022::executor_spl_token2022_build_prepared_plan;
|
pub(crate) use self::token2022::executor_spl_token2022_build_prepared_plan;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// file: kb-lib/src/executor/spl/associated_token_account.rs
|
// file: kb-lib/src/executor/spl/associated_token_account.rs
|
||||||
// version: 3
|
// version: 4
|
||||||
|
|
||||||
//! Safe typed executor for SPL Associated Token Account.
|
//! Safe typed executor for SPL Associated Token Account.
|
||||||
|
|
||||||
@@ -28,4 +28,4 @@ pub use self::intent::ExSplAssociatedTokenProgram;
|
|||||||
/// Internal SPL ATA plan builder.
|
/// Internal SPL ATA plan builder.
|
||||||
pub(crate) use self::builder::executor_spl_ata_build_prepared_plan;
|
pub(crate) use self::builder::executor_spl_ata_build_prepared_plan;
|
||||||
/// Canonical tracing target for SPL ATA execution.
|
/// Canonical tracing target for SPL ATA execution.
|
||||||
pub(crate) use self::constants::EX_SPL_ATA_TRACING_TARGET;
|
pub(crate) use self::constants::TRACING_TARGET_EXECUTOR_SPL_ATA;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// file: kb-lib/src/executor/spl/associated_token_account/builder.rs
|
// file: kb-lib/src/executor/spl/associated_token_account/builder.rs
|
||||||
// version: 4
|
// version: 5
|
||||||
|
|
||||||
//! Official ATA builders and conservative simulation-first plan validation.
|
//! Official ATA builders and conservative simulation-first plan validation.
|
||||||
|
|
||||||
@@ -108,7 +108,7 @@ pub(crate) fn executor_spl_ata_build_prepared_plan(
|
|||||||
let planned_instruction = planned_instruction(intent.operation.operation_code(), &instruction);
|
let planned_instruction = planned_instruction(intent.operation.operation_code(), &instruction);
|
||||||
let required_signers = required_signers(&intent.fee_payer, &planned_instruction.accounts);
|
let required_signers = required_signers(&intent.fee_payer, &planned_instruction.accounts);
|
||||||
tracing::debug!(
|
tracing::debug!(
|
||||||
target: crate::EX_SPL_ATA_TRACING_TARGET,
|
target: crate::TRACING_TARGET_EXECUTOR_SPL_ATA,
|
||||||
action = "build_prepared_plan",
|
action = "build_prepared_plan",
|
||||||
intent_id = %intent.intent_id,
|
intent_id = %intent.intent_id,
|
||||||
operation_code = intent.operation.operation_code(),
|
operation_code = intent.operation.operation_code(),
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
// file: kb-lib/src/executor/spl/associated_token_account/constants.rs
|
// file: kb-lib/src/executor/spl/associated_token_account/constants.rs
|
||||||
// version: 3
|
// version: 4
|
||||||
|
|
||||||
//! Local constants for the `kb_executor_spl_associated_token_account` crate. Program identifiers live in `kb_program_ids`.
|
//! Local constants for the `kb_executor_spl_associated_token_account` crate. Program identifiers live in `kb_program_ids`.
|
||||||
|
|
||||||
/// Canonical tracing target for this crate.
|
/// Canonical tracing target for this crate.
|
||||||
pub(crate) const EX_SPL_ATA_TRACING_TARGET: &str = "kb-lib.executor.spl.associated_token_account";
|
pub(crate) const TRACING_TARGET_EXECUTOR_SPL_ATA: &str =
|
||||||
|
"kb-lib.executor.spl.associated_token_account";
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// file: kb-lib/src/executor/spl/elgamal_registry.rs
|
// file: kb-lib/src/executor/spl/elgamal_registry.rs
|
||||||
// version: 3
|
// version: 4
|
||||||
|
|
||||||
//! Typed executor for the SPL ElGamal public-key registry.
|
//! Typed executor for the SPL ElGamal public-key registry.
|
||||||
|
|
||||||
@@ -24,4 +24,4 @@ pub use self::intent::ExSplElgamalRegistryProofLocation;
|
|||||||
/// Crate-root access to the exact ElGamal registry plan builder.
|
/// Crate-root access to the exact ElGamal registry plan builder.
|
||||||
pub(crate) use self::builder::executor_spl_elgamal_registry_build_prepared_plan;
|
pub(crate) use self::builder::executor_spl_elgamal_registry_build_prepared_plan;
|
||||||
/// Canonical tracing target for the SPL ElGamal registry executor.
|
/// Canonical tracing target for the SPL ElGamal registry executor.
|
||||||
pub(crate) use self::constants::EX_SPL_ELGAMAL_REGISTRY_TRACING_TARGET;
|
pub(crate) use self::constants::TRACING_TARGET_EXECUTOR_SPL_ELGAMAL_REGISTRY;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// file: kb-lib/src/executor/spl/elgamal_registry/builder.rs
|
// file: kb-lib/src/executor/spl/elgamal_registry/builder.rs
|
||||||
// version: 4
|
// version: 5
|
||||||
|
|
||||||
//! Official registry builders and conservative plan validation.
|
//! Official registry builders and conservative plan validation.
|
||||||
|
|
||||||
@@ -125,7 +125,7 @@ pub(crate) fn executor_spl_elgamal_registry_build_prepared_plan(
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
tracing::debug!(
|
tracing::debug!(
|
||||||
target: crate::EX_SPL_ELGAMAL_REGISTRY_TRACING_TARGET,
|
target: crate::TRACING_TARGET_EXECUTOR_SPL_ELGAMAL_REGISTRY,
|
||||||
action = "build_prepared_plan",
|
action = "build_prepared_plan",
|
||||||
intent_id = %intent.intent_id,
|
intent_id = %intent.intent_id,
|
||||||
operation_code,
|
operation_code,
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
// file: kb-lib/src/executor/spl/elgamal_registry/constants.rs
|
// file: kb-lib/src/executor/spl/elgamal_registry/constants.rs
|
||||||
// version: 2
|
// version: 3
|
||||||
|
|
||||||
//! Executor-local constants.
|
//! Executor-local constants.
|
||||||
|
|
||||||
/// Canonical tracing target for this crate.
|
/// Canonical tracing target for this crate.
|
||||||
pub(crate) const EX_SPL_ELGAMAL_REGISTRY_TRACING_TARGET: &str =
|
pub(crate) const TRACING_TARGET_EXECUTOR_SPL_ELGAMAL_REGISTRY: &str =
|
||||||
"kb-lib.executor.spl.elgamal_registry";
|
"kb-lib.executor.spl.elgamal_registry";
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// file: kb-lib/src/executor/spl/memo.rs
|
// file: kb-lib/src/executor/spl/memo.rs
|
||||||
// version: 4
|
// version: 5
|
||||||
|
|
||||||
//! Safe typed executor for `spl_memo`.
|
//! Safe typed executor for `spl_memo`.
|
||||||
|
|
||||||
@@ -28,4 +28,4 @@ pub use self::intent::ExSplMemoSigner;
|
|||||||
/// Internal SPL Memo plan builder.
|
/// Internal SPL Memo plan builder.
|
||||||
pub(crate) use self::builder::executor_spl_memo_build_prepared_plan;
|
pub(crate) use self::builder::executor_spl_memo_build_prepared_plan;
|
||||||
/// Canonical tracing target for SPL Memo execution.
|
/// Canonical tracing target for SPL Memo execution.
|
||||||
pub(crate) use self::constants::EX_SPL_MEMO_TRACING_TARGET;
|
pub(crate) use self::constants::TRACING_TARGET_EXECUTOR_SPL_MEMO;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// file: kb-lib/src/executor/spl/memo/builder.rs
|
// file: kb-lib/src/executor/spl/memo/builder.rs
|
||||||
// version: 1
|
// version: 2
|
||||||
|
|
||||||
//! Official SPL Memo instruction builder and conservative plan validation.
|
//! Official SPL Memo instruction builder and conservative plan validation.
|
||||||
|
|
||||||
@@ -74,7 +74,7 @@ pub(crate) fn executor_spl_memo_build_prepared_plan(
|
|||||||
planned_instruction(crate::EX_SPL_MEMO_ADD_MEMO_OPERATION, &instruction);
|
planned_instruction(crate::EX_SPL_MEMO_ADD_MEMO_OPERATION, &instruction);
|
||||||
let required_signers = required_signers(&intent.fee_payer, signers.as_slice());
|
let required_signers = required_signers(&intent.fee_payer, signers.as_slice());
|
||||||
tracing::debug!(
|
tracing::debug!(
|
||||||
target: crate::EX_SPL_MEMO_TRACING_TARGET,
|
target: crate::TRACING_TARGET_EXECUTOR_SPL_MEMO,
|
||||||
action = "build_prepared_plan",
|
action = "build_prepared_plan",
|
||||||
intent_id = %intent.intent_id,
|
intent_id = %intent.intent_id,
|
||||||
operation_code = crate::EX_SPL_MEMO_ADD_MEMO_OPERATION,
|
operation_code = crate::EX_SPL_MEMO_ADD_MEMO_OPERATION,
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// file: kb-lib/src/executor/spl/memo/constants.rs
|
// file: kb-lib/src/executor/spl/memo/constants.rs
|
||||||
// version: 1
|
// version: 2
|
||||||
|
|
||||||
//! Local constants for the `kb_executor_spl_memo` crate. Program identifiers live in `kb_program_ids`.
|
//! Local constants for the `kb_executor_spl_memo` crate. Program identifiers live in `kb_program_ids`.
|
||||||
|
|
||||||
/// Canonical tracing target for this crate.
|
/// Canonical tracing target for this crate.
|
||||||
pub(crate) const EX_SPL_MEMO_TRACING_TARGET: &str = "kb-lib.executor.spl.memo";
|
pub(crate) const TRACING_TARGET_EXECUTOR_SPL_MEMO: &str = "kb-lib.executor.spl.memo";
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// file: kb-lib/src/executor/spl/token2022.rs
|
// file: kb-lib/src/executor/spl/token2022.rs
|
||||||
// version: 3
|
// version: 4
|
||||||
|
|
||||||
//! SPL Token-2022 executor.
|
//! SPL Token-2022 executor.
|
||||||
|
|
||||||
@@ -258,4 +258,4 @@ pub(crate) use self::constants::EX_SPL_TOKEN2022_MAX_TRANSFER_FEE_SOURCE_ACCOUNT
|
|||||||
/// Maximum UI amount byte length.
|
/// Maximum UI amount byte length.
|
||||||
pub(crate) use self::constants::EX_SPL_TOKEN2022_MAX_UI_AMOUNT_BYTES;
|
pub(crate) use self::constants::EX_SPL_TOKEN2022_MAX_UI_AMOUNT_BYTES;
|
||||||
/// Canonical SPL Token-2022 tracing target.
|
/// Canonical SPL Token-2022 tracing target.
|
||||||
pub(crate) use self::constants::EX_SPL_TOKEN2022_TRACING_TARGET;
|
pub(crate) use self::constants::TRACING_TARGET_EXECUTOR_SPL_TOKEN2022;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// file: kb-lib/src/executor/spl/token2022/builder.rs
|
// file: kb-lib/src/executor/spl/token2022/builder.rs
|
||||||
// version: 27
|
// version: 28
|
||||||
|
|
||||||
//! Official Token-2022 builders and conservative plan validation.
|
//! Official Token-2022 builders and conservative plan validation.
|
||||||
|
|
||||||
@@ -58,7 +58,7 @@ pub(crate) fn executor_spl_token2022_build_prepared_plan(
|
|||||||
let planned_instruction = planned_instruction(intent.operation.operation_code(), &instruction);
|
let planned_instruction = planned_instruction(intent.operation.operation_code(), &instruction);
|
||||||
let required_signers = required_signers(&intent.fee_payer, &instruction.accounts);
|
let required_signers = required_signers(&intent.fee_payer, &instruction.accounts);
|
||||||
tracing::debug!(
|
tracing::debug!(
|
||||||
target: crate::EX_SPL_TOKEN2022_TRACING_TARGET,
|
target: crate::TRACING_TARGET_EXECUTOR_SPL_TOKEN2022,
|
||||||
action = "executor_spl_token2022_build_prepared_plan",
|
action = "executor_spl_token2022_build_prepared_plan",
|
||||||
intent_id = %intent.intent_id,
|
intent_id = %intent.intent_id,
|
||||||
operation_code = intent.operation.operation_code(),
|
operation_code = intent.operation.operation_code(),
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// file: kb-lib/src/executor/spl/token2022/constants.rs
|
// file: kb-lib/src/executor/spl/token2022/constants.rs
|
||||||
// version: 5
|
// version: 6
|
||||||
|
|
||||||
//! Local constants for the `kb_executor_spl_token_2022` crate. Program identifiers live in `kb_program_ids`.
|
//! Local constants for the `kb_executor_spl_token_2022` crate. Program identifiers live in `kb_program_ids`.
|
||||||
|
|
||||||
@@ -10,4 +10,4 @@ pub(crate) const EX_SPL_TOKEN2022_MAX_UI_AMOUNT_BYTES: usize = 255;
|
|||||||
/// Maximum ordered token accounts accepted by transfer-fee harvest or withdraw builders.
|
/// Maximum ordered token accounts accepted by transfer-fee harvest or withdraw builders.
|
||||||
pub(crate) const EX_SPL_TOKEN2022_MAX_TRANSFER_FEE_SOURCE_ACCOUNTS: usize = 255;
|
pub(crate) const EX_SPL_TOKEN2022_MAX_TRANSFER_FEE_SOURCE_ACCOUNTS: usize = 255;
|
||||||
/// Canonical tracing target for this crate.
|
/// Canonical tracing target for this crate.
|
||||||
pub(crate) const EX_SPL_TOKEN2022_TRACING_TARGET: &str = "kb-lib.executor.spl.token2022";
|
pub(crate) const TRACING_TARGET_EXECUTOR_SPL_TOKEN2022: &str = "kb-lib.executor.spl.token2022";
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// file: kb-lib/src/lib.rs
|
// file: kb-lib/src/lib.rs
|
||||||
// version: 21
|
// version: 22
|
||||||
|
|
||||||
//! Consolidated decoder, executor, materializer and shared model library.
|
//! Consolidated decoder, executor, materializer and shared model library.
|
||||||
#![warn(missing_docs)]
|
#![warn(missing_docs)]
|
||||||
@@ -1382,8 +1382,6 @@ pub(crate) use self::decoder::DC_METADATA_MTM_SIGN_METADATA_DISCRIMINATOR;
|
|||||||
pub(crate) use self::decoder::DC_METADATA_MTM_SURFACE_CODE;
|
pub(crate) use self::decoder::DC_METADATA_MTM_SURFACE_CODE;
|
||||||
/// Thaw Delegated Account discriminator.
|
/// Thaw Delegated Account discriminator.
|
||||||
pub(crate) use self::decoder::DC_METADATA_MTM_THAW_DELEGATED_ACCOUNT_DISCRIMINATOR;
|
pub(crate) use self::decoder::DC_METADATA_MTM_THAW_DELEGATED_ACCOUNT_DISCRIMINATOR;
|
||||||
/// Canonical tracing target for this crate.
|
|
||||||
pub(crate) use self::decoder::DC_METADATA_MTM_TRACING_TARGET;
|
|
||||||
/// Transfer discriminator.
|
/// Transfer discriminator.
|
||||||
pub(crate) use self::decoder::DC_METADATA_MTM_TRANSFER_DISCRIMINATOR;
|
pub(crate) use self::decoder::DC_METADATA_MTM_TRANSFER_DISCRIMINATOR;
|
||||||
/// Transfer Out Of Escrow discriminator.
|
/// Transfer Out Of Escrow discriminator.
|
||||||
@@ -1462,8 +1460,6 @@ pub(crate) use self::decoder::DC_SOLANA_CORE_SLASHING_SURFACE_CODE;
|
|||||||
pub(crate) use self::decoder::DC_SOLANA_CORE_STAKE_SURFACE_CODE;
|
pub(crate) use self::decoder::DC_SOLANA_CORE_STAKE_SURFACE_CODE;
|
||||||
/// Stable System Program surface code.
|
/// Stable System Program surface code.
|
||||||
pub(crate) use self::decoder::DC_SOLANA_CORE_SYSTEM_SURFACE_CODE;
|
pub(crate) use self::decoder::DC_SOLANA_CORE_SYSTEM_SURFACE_CODE;
|
||||||
/// Canonical tracing target for this crate.
|
|
||||||
pub(crate) use self::decoder::DC_SOLANA_CORE_TRACING_TARGET;
|
|
||||||
/// Byte length of one secp256k1 offsets entry.
|
/// Byte length of one secp256k1 offsets entry.
|
||||||
pub(crate) use self::decoder::DC_SOLANA_CORE_U8_OFFSETS_BYTES;
|
pub(crate) use self::decoder::DC_SOLANA_CORE_U8_OFFSETS_BYTES;
|
||||||
/// Byte length of one Ed25519 or secp256r1 offsets entry.
|
/// Byte length of one Ed25519 or secp256r1 offsets entry.
|
||||||
@@ -1490,16 +1486,12 @@ pub(crate) use self::decoder::DC_SPL_ATA_MAX_INSTRUCTION_BYTES;
|
|||||||
pub(crate) use self::decoder::DC_SPL_ATA_MAX_TRANSACTION_KEYS;
|
pub(crate) use self::decoder::DC_SPL_ATA_MAX_TRANSACTION_KEYS;
|
||||||
/// Stable protocol and surface code for the Associated Token Account program.
|
/// Stable protocol and surface code for the Associated Token Account program.
|
||||||
pub(crate) use self::decoder::DC_SPL_ATA_SURFACE_CODE;
|
pub(crate) use self::decoder::DC_SPL_ATA_SURFACE_CODE;
|
||||||
/// Canonical tracing target for the Associated Token Account decoder.
|
|
||||||
pub(crate) use self::decoder::DC_SPL_ATA_TRACING_TARGET;
|
|
||||||
/// Current stable SPL ElGamal registry event contract version.
|
/// Current stable SPL ElGamal registry event contract version.
|
||||||
pub(crate) use self::decoder::DC_SPL_ELGAMAL_REGISTRY_EVENT_VERSION;
|
pub(crate) use self::decoder::DC_SPL_ELGAMAL_REGISTRY_EVENT_VERSION;
|
||||||
/// Maximum retained SPL ElGamal registry instruction payload size.
|
/// Maximum retained SPL ElGamal registry instruction payload size.
|
||||||
pub(crate) use self::decoder::DC_SPL_ELGAMAL_REGISTRY_MAX_INSTRUCTION_BYTES;
|
pub(crate) use self::decoder::DC_SPL_ELGAMAL_REGISTRY_MAX_INSTRUCTION_BYTES;
|
||||||
/// Stable SPL ElGamal registry surface code.
|
/// Stable SPL ElGamal registry surface code.
|
||||||
pub(crate) use self::decoder::DC_SPL_ELGAMAL_REGISTRY_SURFACE_CODE;
|
pub(crate) use self::decoder::DC_SPL_ELGAMAL_REGISTRY_SURFACE_CODE;
|
||||||
/// Canonical tracing target for the SPL ElGamal registry decoder.
|
|
||||||
pub(crate) use self::decoder::DC_SPL_ELGAMAL_REGISTRY_TRACING_TARGET;
|
|
||||||
/// Maximum payload prefix retained for bounded Memo diagnostics.
|
/// Maximum payload prefix retained for bounded Memo diagnostics.
|
||||||
pub(crate) use self::decoder::DC_SPL_MEMO_DIAGNOSTIC_PREFIX_BYTES;
|
pub(crate) use self::decoder::DC_SPL_MEMO_DIAGNOSTIC_PREFIX_BYTES;
|
||||||
/// Current stable Memo decoded event contract version.
|
/// Current stable Memo decoded event contract version.
|
||||||
@@ -1508,8 +1500,6 @@ pub(crate) use self::decoder::DC_SPL_MEMO_EVENT_VERSION;
|
|||||||
pub(crate) use self::decoder::DC_SPL_MEMO_MAX_PAYLOAD_BYTES;
|
pub(crate) use self::decoder::DC_SPL_MEMO_MAX_PAYLOAD_BYTES;
|
||||||
/// Stable protocol code shared by Memo generations.
|
/// Stable protocol code shared by Memo generations.
|
||||||
pub(crate) use self::decoder::DC_SPL_MEMO_PROTOCOL_CODE;
|
pub(crate) use self::decoder::DC_SPL_MEMO_PROTOCOL_CODE;
|
||||||
/// Canonical tracing target for the SPL Memo decoder.
|
|
||||||
pub(crate) use self::decoder::DC_SPL_MEMO_TRACING_TARGET;
|
|
||||||
/// Stable Memo v1 surface code.
|
/// Stable Memo v1 surface code.
|
||||||
pub(crate) use self::decoder::DC_SPL_MEMO_V1_SURFACE_CODE;
|
pub(crate) use self::decoder::DC_SPL_MEMO_V1_SURFACE_CODE;
|
||||||
/// Stable Memo v3 surface code.
|
/// Stable Memo v3 surface code.
|
||||||
@@ -1530,8 +1520,6 @@ pub(crate) use self::decoder::DC_SPL_TOKEN_MAX_BATCH_INSTRUCTIONS;
|
|||||||
pub(crate) use self::decoder::DC_SPL_TOKEN_MAX_INSTRUCTION_BYTES;
|
pub(crate) use self::decoder::DC_SPL_TOKEN_MAX_INSTRUCTION_BYTES;
|
||||||
/// Stable protocol and surface code for the classic SPL Token program.
|
/// Stable protocol and surface code for the classic SPL Token program.
|
||||||
pub(crate) use self::decoder::DC_SPL_TOKEN_SURFACE_CODE;
|
pub(crate) use self::decoder::DC_SPL_TOKEN_SURFACE_CODE;
|
||||||
/// Canonical tracing target for the classic SPL Token decoder.
|
|
||||||
pub(crate) use self::decoder::DC_SPL_TOKEN_TRACING_TARGET;
|
|
||||||
/// Maximum prefix retained in bounded Token-2022 diagnostics.
|
/// Maximum prefix retained in bounded Token-2022 diagnostics.
|
||||||
pub(crate) use self::decoder::DC_SPL_TOKEN2022_DIAGNOSTIC_PREFIX_BYTES;
|
pub(crate) use self::decoder::DC_SPL_TOKEN2022_DIAGNOSTIC_PREFIX_BYTES;
|
||||||
/// Current stable Token-2022 decoded event contract version.
|
/// Current stable Token-2022 decoded event contract version.
|
||||||
@@ -1548,14 +1536,26 @@ pub(crate) use self::decoder::DC_SPL_TOKEN2022_MAX_INSTRUCTION_BYTES;
|
|||||||
pub(crate) use self::decoder::DC_SPL_TOKEN2022_MAX_METADATA_STRING_BYTES;
|
pub(crate) use self::decoder::DC_SPL_TOKEN2022_MAX_METADATA_STRING_BYTES;
|
||||||
/// Stable Token-2022 surface code.
|
/// Stable Token-2022 surface code.
|
||||||
pub(crate) use self::decoder::DC_SPL_TOKEN2022_SURFACE_CODE;
|
pub(crate) use self::decoder::DC_SPL_TOKEN2022_SURFACE_CODE;
|
||||||
/// Canonical tracing target for the Token-2022 decoder.
|
|
||||||
pub(crate) use self::decoder::DC_SPL_TOKEN2022_TRACING_TARGET;
|
|
||||||
/// Expected role and privileges for one positional instruction account.
|
/// Expected role and privileges for one positional instruction account.
|
||||||
pub(crate) use self::decoder::DcSolanaCoreAccountRole;
|
pub(crate) use self::decoder::DcSolanaCoreAccountRole;
|
||||||
/// One resolved outer instruction payload and its provenance relative to the target instruction.
|
/// One resolved outer instruction payload and its provenance relative to the target instruction.
|
||||||
pub(crate) use self::decoder::DcSolanaCoreResolvedInstructionPayload;
|
pub(crate) use self::decoder::DcSolanaCoreResolvedInstructionPayload;
|
||||||
/// One parsed SPL ElGamal registry instruction.
|
/// One parsed SPL ElGamal registry instruction.
|
||||||
pub(crate) use self::decoder::DcSplElGamalRegistryParsedRegistryInstruction;
|
pub(crate) use self::decoder::DcSplElGamalRegistryParsedRegistryInstruction;
|
||||||
|
/// Canonical tracing target for this crate.
|
||||||
|
pub(crate) use self::decoder::TRACING_TARGET_DECODER_METADATA_METAPLEX_TOKEN_METADATA;
|
||||||
|
/// Canonical tracing target for this crate.
|
||||||
|
pub(crate) use self::decoder::TRACING_TARGET_DECODER_SOLANA_CORE;
|
||||||
|
/// Canonical tracing target for the Associated Token Account decoder.
|
||||||
|
pub(crate) use self::decoder::TRACING_TARGET_DECODER_SPL_ATA;
|
||||||
|
/// Canonical tracing target for the SPL ElGamal registry decoder.
|
||||||
|
pub(crate) use self::decoder::TRACING_TARGET_DECODER_SPL_ELGAMAL_REGISTRY;
|
||||||
|
/// Canonical tracing target for the SPL Memo decoder.
|
||||||
|
pub(crate) use self::decoder::TRACING_TARGET_DECODER_SPL_MEMO;
|
||||||
|
/// Canonical tracing target for the classic SPL Token decoder.
|
||||||
|
pub(crate) use self::decoder::TRACING_TARGET_DECODER_SPL_TOKEN;
|
||||||
|
/// Canonical tracing target for the Token-2022 decoder.
|
||||||
|
pub(crate) use self::decoder::TRACING_TARGET_DECODER_SPL_TOKEN2022;
|
||||||
/// Crate-root access to `decode` from `instruction`.
|
/// Crate-root access to `decode` from `instruction`.
|
||||||
pub(crate) use self::decoder::decoder_metadata_metaplex_token_metadata_decode;
|
pub(crate) use self::decoder::decoder_metadata_metaplex_token_metadata_decode;
|
||||||
/// Crate-root access to `entry_for_discriminator` from `instruction`.
|
/// Crate-root access to `entry_for_discriminator` from `instruction`.
|
||||||
@@ -1694,22 +1694,22 @@ pub(crate) use self::decoder::decoder_spl_token2022_decode;
|
|||||||
pub(crate) use self::decoder::decoder_spl_token2022_entry_for_tag;
|
pub(crate) use self::decoder::decoder_spl_token2022_entry_for_tag;
|
||||||
/// Returns the first byte of one retained Token-2022 payload.
|
/// Returns the first byte of one retained Token-2022 payload.
|
||||||
pub(crate) use self::decoder::decoder_spl_token2022_payload_tag;
|
pub(crate) use self::decoder::decoder_spl_token2022_payload_tag;
|
||||||
/// Canonical tracing target for this crate.
|
|
||||||
pub(crate) use self::executor::EX_SOLANA_CORE_TRACING_TARGET;
|
|
||||||
/// Canonical SPL Memo tracing target.
|
|
||||||
pub(crate) use self::executor::EX_SPL_ATA_TRACING_TARGET;
|
|
||||||
/// Canonical tracing target for the SPL ElGamal registry executor.
|
|
||||||
pub(crate) use self::executor::EX_SPL_ELGAMAL_REGISTRY_TRACING_TARGET;
|
|
||||||
/// Canonical SPL Memo tracing target.
|
|
||||||
pub(crate) use self::executor::EX_SPL_MEMO_TRACING_TARGET;
|
|
||||||
/// Maximum ordered multisig signer occurrences for SPL Token-2022.
|
/// Maximum ordered multisig signer occurrences for SPL Token-2022.
|
||||||
pub(crate) use self::executor::EX_SPL_TOKEN2022_MAX_MULTISIG_SIGNERS;
|
pub(crate) use self::executor::EX_SPL_TOKEN2022_MAX_MULTISIG_SIGNERS;
|
||||||
/// Maximum transfer-fee source account count for SPL Token-2022.
|
/// Maximum transfer-fee source account count for SPL Token-2022.
|
||||||
pub(crate) use self::executor::EX_SPL_TOKEN2022_MAX_TRANSFER_FEE_SOURCE_ACCOUNTS;
|
pub(crate) use self::executor::EX_SPL_TOKEN2022_MAX_TRANSFER_FEE_SOURCE_ACCOUNTS;
|
||||||
/// Maximum UI amount byte length for SPL Token-2022.
|
/// Maximum UI amount byte length for SPL Token-2022.
|
||||||
pub(crate) use self::executor::EX_SPL_TOKEN2022_MAX_UI_AMOUNT_BYTES;
|
pub(crate) use self::executor::EX_SPL_TOKEN2022_MAX_UI_AMOUNT_BYTES;
|
||||||
|
/// Canonical tracing target for this crate.
|
||||||
|
pub(crate) use self::executor::TRACING_TARGET_EXECUTOR_SOLANA_CORE;
|
||||||
|
/// Canonical SPL Memo tracing target.
|
||||||
|
pub(crate) use self::executor::TRACING_TARGET_EXECUTOR_SPL_ATA;
|
||||||
|
/// Canonical tracing target for the SPL ElGamal registry executor.
|
||||||
|
pub(crate) use self::executor::TRACING_TARGET_EXECUTOR_SPL_ELGAMAL_REGISTRY;
|
||||||
|
/// Canonical SPL Memo tracing target.
|
||||||
|
pub(crate) use self::executor::TRACING_TARGET_EXECUTOR_SPL_MEMO;
|
||||||
/// Canonical SPL Token-2022 tracing target.
|
/// Canonical SPL Token-2022 tracing target.
|
||||||
pub(crate) use self::executor::EX_SPL_TOKEN2022_TRACING_TARGET;
|
pub(crate) use self::executor::TRACING_TARGET_EXECUTOR_SPL_TOKEN2022;
|
||||||
/// Crate-root access to `build_prepared_plan` from `address_lookup_table`.
|
/// Crate-root access to `build_prepared_plan` from `address_lookup_table`.
|
||||||
pub(crate) use self::executor::executor_solana_core_address_lookup_table_build_prepared_plan;
|
pub(crate) use self::executor::executor_solana_core_address_lookup_table_build_prepared_plan;
|
||||||
/// Crate-root access to `build_prepared_plan` from `builder`.
|
/// Crate-root access to `build_prepared_plan` from `builder`.
|
||||||
@@ -1756,31 +1756,31 @@ pub(crate) use self::executor::executor_spl_memo_build_prepared_plan;
|
|||||||
pub(crate) use self::executor::executor_spl_token2022_build_prepared_plan;
|
pub(crate) use self::executor::executor_spl_token2022_build_prepared_plan;
|
||||||
/// Canonical processor name for the native and SPL administration materializer.
|
/// Canonical processor name for the native and SPL administration materializer.
|
||||||
pub(crate) use self::materializer::MT_ADMIN_PROCESSOR_NAME;
|
pub(crate) use self::materializer::MT_ADMIN_PROCESSOR_NAME;
|
||||||
/// Canonical tracing target for the native and SPL administration materializer.
|
|
||||||
pub(crate) use self::materializer::MT_ADMIN_TRACING_TARGET;
|
|
||||||
/// Canonical tracing target for the native compliance audit materializer.
|
|
||||||
pub(crate) use self::materializer::MT_COMPLIANCE_AUDIT_TRACING_TARGET;
|
|
||||||
/// Canonical tracing target for the native lifecycle materializer.
|
|
||||||
pub(crate) use self::materializer::MT_LIFECYCLE_TRACING_TARGET;
|
|
||||||
/// Stable processor name for SPL Token and ATA risk facts.
|
/// Stable processor name for SPL Token and ATA risk facts.
|
||||||
pub(crate) use self::materializer::MT_RISK_PROCESSOR_NAME;
|
pub(crate) use self::materializer::MT_RISK_PROCESSOR_NAME;
|
||||||
/// Stable projection contract version for SPL Token and ATA risk facts.
|
/// Stable projection contract version for SPL Token and ATA risk facts.
|
||||||
pub(crate) use self::materializer::MT_RISK_PROJECTION_VERSION;
|
pub(crate) use self::materializer::MT_RISK_PROJECTION_VERSION;
|
||||||
/// Canonical tracing target for SPL Token and ATA risk facts.
|
|
||||||
pub(crate) use self::materializer::MT_RISK_TRACING_TARGET;
|
|
||||||
/// Canonical tracing target for the native stake and vote materializer.
|
|
||||||
pub(crate) use self::materializer::MT_STAKING_TRACING_TARGET;
|
|
||||||
/// Stable processor name for Token, ATA and Token-2022 account projections.
|
/// Stable processor name for Token, ATA and Token-2022 account projections.
|
||||||
pub(crate) use self::materializer::MT_TOKEN_ACCOUNTS_PROCESSOR_NAME;
|
pub(crate) use self::materializer::MT_TOKEN_ACCOUNTS_PROCESSOR_NAME;
|
||||||
/// Stable projection contract version for Token, ATA and Token-2022 account projections.
|
/// Stable projection contract version for Token, ATA and Token-2022 account projections.
|
||||||
pub(crate) use self::materializer::MT_TOKEN_ACCOUNTS_PROJECTION_VERSION;
|
pub(crate) use self::materializer::MT_TOKEN_ACCOUNTS_PROJECTION_VERSION;
|
||||||
/// Canonical tracing target for Token, ATA and Token-2022 account projections.
|
|
||||||
pub(crate) use self::materializer::MT_TOKEN_ACCOUNTS_TRACING_TARGET;
|
|
||||||
/// Maximum Memo payload accepted by transaction annotations.
|
/// Maximum Memo payload accepted by transaction annotations.
|
||||||
pub(crate) use self::materializer::MT_TRANSACTION_ANNOTATIONS_MAX_MEMO_PAYLOAD_BYTES;
|
pub(crate) use self::materializer::MT_TRANSACTION_ANNOTATIONS_MAX_MEMO_PAYLOAD_BYTES;
|
||||||
/// Stable processor name for transaction annotations.
|
/// Stable processor name for transaction annotations.
|
||||||
pub(crate) use self::materializer::MT_TRANSACTION_ANNOTATIONS_PROCESSOR_NAME;
|
pub(crate) use self::materializer::MT_TRANSACTION_ANNOTATIONS_PROCESSOR_NAME;
|
||||||
/// Stable projection contract version for transaction annotations.
|
/// Stable projection contract version for transaction annotations.
|
||||||
pub(crate) use self::materializer::MT_TRANSACTION_ANNOTATIONS_PROJECTION_VERSION;
|
pub(crate) use self::materializer::MT_TRANSACTION_ANNOTATIONS_PROJECTION_VERSION;
|
||||||
|
/// Canonical tracing target for the native and SPL administration materializer.
|
||||||
|
pub(crate) use self::materializer::TRACING_TARGET_MATERIALIZER_ADMIN;
|
||||||
|
/// Canonical tracing target for the native compliance audit materializer.
|
||||||
|
pub(crate) use self::materializer::TRACING_TARGET_MATERIALIZER_COMPLIANCE_AUDIT;
|
||||||
|
/// Canonical tracing target for the native lifecycle materializer.
|
||||||
|
pub(crate) use self::materializer::TRACING_TARGET_MATERIALIZER_LIFECYCLE;
|
||||||
|
/// Canonical tracing target for SPL Token and ATA risk facts.
|
||||||
|
pub(crate) use self::materializer::TRACING_TARGET_MATERIALIZER_RISK;
|
||||||
|
/// Canonical tracing target for the native stake and vote materializer.
|
||||||
|
pub(crate) use self::materializer::TRACING_TARGET_MATERIALIZER_STAKING;
|
||||||
|
/// Canonical tracing target for Token, ATA and Token-2022 account projections.
|
||||||
|
pub(crate) use self::materializer::TRACING_TARGET_MATERIALIZER_TOKEN_ACCOUNTS;
|
||||||
/// Canonical tracing target for transaction annotations.
|
/// Canonical tracing target for transaction annotations.
|
||||||
pub(crate) use self::materializer::MT_TRANSACTION_ANNOTATIONS_TRACING_TARGET;
|
pub(crate) use self::materializer::TRACING_TARGET_MATERIALIZER_TRANSACTION_ANNOTATIONS;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// file: kb-lib/src/materializer.rs
|
// file: kb-lib/src/materializer.rs
|
||||||
// version: 5
|
// version: 6
|
||||||
|
|
||||||
//! Consolidated materializer modules.
|
//! Consolidated materializer modules.
|
||||||
|
|
||||||
@@ -115,25 +115,25 @@ pub use self::vault::MtVaultMaterializer;
|
|||||||
/// Canonical processor name for the native and SPL administration materializer.
|
/// Canonical processor name for the native and SPL administration materializer.
|
||||||
pub(crate) use self::admin::MT_ADMIN_PROCESSOR_NAME;
|
pub(crate) use self::admin::MT_ADMIN_PROCESSOR_NAME;
|
||||||
/// Canonical tracing target for the native and SPL administration materializer.
|
/// Canonical tracing target for the native and SPL administration materializer.
|
||||||
pub(crate) use self::admin::MT_ADMIN_TRACING_TARGET;
|
pub(crate) use self::admin::TRACING_TARGET_MATERIALIZER_ADMIN;
|
||||||
/// Canonical tracing target for the native compliance audit materializer.
|
/// Canonical tracing target for the native compliance audit materializer.
|
||||||
pub(crate) use self::compliance::MT_COMPLIANCE_AUDIT_TRACING_TARGET;
|
pub(crate) use self::compliance::TRACING_TARGET_MATERIALIZER_COMPLIANCE_AUDIT;
|
||||||
/// Canonical tracing target for the native lifecycle materializer.
|
/// Canonical tracing target for the native lifecycle materializer.
|
||||||
pub(crate) use self::lifecycle::MT_LIFECYCLE_TRACING_TARGET;
|
pub(crate) use self::lifecycle::TRACING_TARGET_MATERIALIZER_LIFECYCLE;
|
||||||
/// Stable processor name for SPL Token and ATA risk facts.
|
/// Stable processor name for SPL Token and ATA risk facts.
|
||||||
pub(crate) use self::risk::MT_RISK_PROCESSOR_NAME;
|
pub(crate) use self::risk::MT_RISK_PROCESSOR_NAME;
|
||||||
/// Stable projection contract version for SPL Token and ATA risk facts.
|
/// Stable projection contract version for SPL Token and ATA risk facts.
|
||||||
pub(crate) use self::risk::MT_RISK_PROJECTION_VERSION;
|
pub(crate) use self::risk::MT_RISK_PROJECTION_VERSION;
|
||||||
/// Canonical tracing target for SPL Token and ATA risk facts.
|
/// Canonical tracing target for SPL Token and ATA risk facts.
|
||||||
pub(crate) use self::risk::MT_RISK_TRACING_TARGET;
|
pub(crate) use self::risk::TRACING_TARGET_MATERIALIZER_RISK;
|
||||||
/// Canonical tracing target for the native stake and vote materializer.
|
/// Canonical tracing target for the native stake and vote materializer.
|
||||||
pub(crate) use self::staking::MT_STAKING_TRACING_TARGET;
|
pub(crate) use self::staking::TRACING_TARGET_MATERIALIZER_STAKING;
|
||||||
/// Stable processor name for Token, ATA and Token-2022 account projections.
|
/// Stable processor name for Token, ATA and Token-2022 account projections.
|
||||||
pub(crate) use self::token::MT_TOKEN_ACCOUNTS_PROCESSOR_NAME;
|
pub(crate) use self::token::MT_TOKEN_ACCOUNTS_PROCESSOR_NAME;
|
||||||
/// Stable projection contract version for Token, ATA and Token-2022 account projections.
|
/// Stable projection contract version for Token, ATA and Token-2022 account projections.
|
||||||
pub(crate) use self::token::MT_TOKEN_ACCOUNTS_PROJECTION_VERSION;
|
pub(crate) use self::token::MT_TOKEN_ACCOUNTS_PROJECTION_VERSION;
|
||||||
/// Canonical tracing target for Token, ATA and Token-2022 account projections.
|
/// Canonical tracing target for Token, ATA and Token-2022 account projections.
|
||||||
pub(crate) use self::token::MT_TOKEN_ACCOUNTS_TRACING_TARGET;
|
pub(crate) use self::token::TRACING_TARGET_MATERIALIZER_TOKEN_ACCOUNTS;
|
||||||
/// Maximum Memo payload accepted by transaction annotations.
|
/// Maximum Memo payload accepted by transaction annotations.
|
||||||
pub(crate) use self::transaction::MT_TRANSACTION_ANNOTATIONS_MAX_MEMO_PAYLOAD_BYTES;
|
pub(crate) use self::transaction::MT_TRANSACTION_ANNOTATIONS_MAX_MEMO_PAYLOAD_BYTES;
|
||||||
/// Stable processor name for transaction annotations.
|
/// Stable processor name for transaction annotations.
|
||||||
@@ -141,7 +141,7 @@ pub(crate) use self::transaction::MT_TRANSACTION_ANNOTATIONS_PROCESSOR_NAME;
|
|||||||
/// Stable projection contract version for transaction annotations.
|
/// Stable projection contract version for transaction annotations.
|
||||||
pub(crate) use self::transaction::MT_TRANSACTION_ANNOTATIONS_PROJECTION_VERSION;
|
pub(crate) use self::transaction::MT_TRANSACTION_ANNOTATIONS_PROJECTION_VERSION;
|
||||||
/// Canonical tracing target for transaction annotations.
|
/// Canonical tracing target for transaction annotations.
|
||||||
pub(crate) use self::transaction::MT_TRANSACTION_ANNOTATIONS_TRACING_TARGET;
|
pub(crate) use self::transaction::TRACING_TARGET_MATERIALIZER_TRANSACTION_ANNOTATIONS;
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// file: kb-lib/src/materializer/admin.rs
|
// file: kb-lib/src/materializer/admin.rs
|
||||||
// version: 5
|
// version: 6
|
||||||
|
|
||||||
//! `admin` materializer family.
|
//! `admin` materializer family.
|
||||||
|
|
||||||
@@ -16,4 +16,4 @@ pub use self::core::materializer_admin_materialize_token2022_state_snapshots;
|
|||||||
/// Canonical processor name for the native and SPL administration materializer.
|
/// Canonical processor name for the native and SPL administration materializer.
|
||||||
pub(crate) use self::constants::MT_ADMIN_PROCESSOR_NAME;
|
pub(crate) use self::constants::MT_ADMIN_PROCESSOR_NAME;
|
||||||
/// Canonical tracing target for the native and SPL administration materializer.
|
/// Canonical tracing target for the native and SPL administration materializer.
|
||||||
pub(crate) use self::constants::MT_ADMIN_TRACING_TARGET;
|
pub(crate) use self::constants::TRACING_TARGET_MATERIALIZER_ADMIN;
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
// file: kb-lib/src/materializer/admin/constants.rs
|
// file: kb-lib/src/materializer/admin/constants.rs
|
||||||
// version: 1
|
// version: 2
|
||||||
|
|
||||||
//! Local constants for the native and SPL administration materializer.
|
//! Local constants for the native and SPL administration materializer.
|
||||||
|
|
||||||
/// Canonical processor name for this component.
|
/// Canonical processor name for this component.
|
||||||
pub(crate) const MT_ADMIN_PROCESSOR_NAME: &str = "solana_native_admin";
|
pub(crate) const MT_ADMIN_PROCESSOR_NAME: &str = "solana_native_admin";
|
||||||
/// Canonical tracing target for this component.
|
/// Canonical tracing target for this component.
|
||||||
pub(crate) const MT_ADMIN_TRACING_TARGET: &str = "kb-lib.materializer.admin";
|
pub(crate) const TRACING_TARGET_MATERIALIZER_ADMIN: &str = "kb-lib.materializer.admin";
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// file: kb-lib/src/materializer/admin/core.rs
|
// file: kb-lib/src/materializer/admin/core.rs
|
||||||
// version: 16
|
// version: 17
|
||||||
|
|
||||||
//! Stable administrative projections derived from exact committed observations.
|
//! Stable administrative projections derived from exact committed observations.
|
||||||
|
|
||||||
@@ -155,7 +155,7 @@ impl crate::MtApiEventMaterializer for crate::MtAdminMaterializer {
|
|||||||
std::option::Option::Some(value) => value,
|
std::option::Option::Some(value) => value,
|
||||||
std::option::Option::None => {
|
std::option::Option::None => {
|
||||||
tracing::debug!(
|
tracing::debug!(
|
||||||
target: crate::MT_ADMIN_TRACING_TARGET,
|
target: crate::TRACING_TARGET_MATERIALIZER_ADMIN,
|
||||||
action = "materialize_admin",
|
action = "materialize_admin",
|
||||||
surface_code = %observation.event.surface_code.0.as_str(),
|
surface_code = %observation.event.surface_code.0.as_str(),
|
||||||
entry_code = %observation.event.event_name.0.as_str(),
|
entry_code = %observation.event.event_name.0.as_str(),
|
||||||
@@ -173,7 +173,7 @@ impl crate::MtApiEventMaterializer for crate::MtAdminMaterializer {
|
|||||||
}
|
}
|
||||||
if observation.transaction_failed || !observation.observation_committed {
|
if observation.transaction_failed || !observation.observation_committed {
|
||||||
tracing::debug!(
|
tracing::debug!(
|
||||||
target: crate::MT_ADMIN_TRACING_TARGET,
|
target: crate::TRACING_TARGET_MATERIALIZER_ADMIN,
|
||||||
action = "materialize_admin",
|
action = "materialize_admin",
|
||||||
surface_code = %observation.event.surface_code.0.as_str(),
|
surface_code = %observation.event.surface_code.0.as_str(),
|
||||||
entry_code = %observation.event.event_name.0.as_str(),
|
entry_code = %observation.event.event_name.0.as_str(),
|
||||||
@@ -223,7 +223,7 @@ impl crate::MtApiEventMaterializer for crate::MtAdminMaterializer {
|
|||||||
}),
|
}),
|
||||||
};
|
};
|
||||||
tracing::debug!(
|
tracing::debug!(
|
||||||
target: crate::MT_ADMIN_TRACING_TARGET,
|
target: crate::TRACING_TARGET_MATERIALIZER_ADMIN,
|
||||||
action = "materialize_admin",
|
action = "materialize_admin",
|
||||||
surface_code = %observation.event.surface_code.0.as_str(),
|
surface_code = %observation.event.surface_code.0.as_str(),
|
||||||
entry_code = %observation.event.event_name.0.as_str(),
|
entry_code = %observation.event.event_name.0.as_str(),
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// file: kb-lib/src/materializer/compliance.rs
|
// file: kb-lib/src/materializer/compliance.rs
|
||||||
// version: 3
|
// version: 4
|
||||||
|
|
||||||
//! `compliance` materializer family.
|
//! `compliance` materializer family.
|
||||||
|
|
||||||
@@ -10,4 +10,4 @@ mod constants;
|
|||||||
pub use self::audit::MtComplianceAuditMaterializer;
|
pub use self::audit::MtComplianceAuditMaterializer;
|
||||||
|
|
||||||
/// Canonical tracing target for the native compliance audit materializer.
|
/// Canonical tracing target for the native compliance audit materializer.
|
||||||
pub(crate) use self::constants::MT_COMPLIANCE_AUDIT_TRACING_TARGET;
|
pub(crate) use self::constants::TRACING_TARGET_MATERIALIZER_COMPLIANCE_AUDIT;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// file: kb-lib/src/materializer/compliance/audit.rs
|
// file: kb-lib/src/materializer/compliance/audit.rs
|
||||||
// version: 7
|
// version: 8
|
||||||
|
|
||||||
//! Stable compliance-audit projections for committed native bytecode mutations and execution profiles.
|
//! Stable compliance-audit projections for committed native bytecode mutations and execution profiles.
|
||||||
|
|
||||||
@@ -113,7 +113,7 @@ impl crate::MtApiEventMaterializer for crate::MtComplianceAuditMaterializer {
|
|||||||
std::option::Option::Some(value) => value,
|
std::option::Option::Some(value) => value,
|
||||||
std::option::Option::None => {
|
std::option::Option::None => {
|
||||||
tracing::debug!(
|
tracing::debug!(
|
||||||
target: crate::MT_COMPLIANCE_AUDIT_TRACING_TARGET,
|
target: crate::TRACING_TARGET_MATERIALIZER_COMPLIANCE_AUDIT,
|
||||||
action = "materialize_compliance_audit",
|
action = "materialize_compliance_audit",
|
||||||
surface_code = %observation.event.surface_code.0.as_str(),
|
surface_code = %observation.event.surface_code.0.as_str(),
|
||||||
entry_code = %observation.event.event_name.0.as_str(),
|
entry_code = %observation.event.event_name.0.as_str(),
|
||||||
@@ -130,7 +130,7 @@ impl crate::MtApiEventMaterializer for crate::MtComplianceAuditMaterializer {
|
|||||||
&& (observation.transaction_failed || !observation.observation_committed)
|
&& (observation.transaction_failed || !observation.observation_committed)
|
||||||
{
|
{
|
||||||
tracing::debug!(
|
tracing::debug!(
|
||||||
target: crate::MT_COMPLIANCE_AUDIT_TRACING_TARGET,
|
target: crate::TRACING_TARGET_MATERIALIZER_COMPLIANCE_AUDIT,
|
||||||
action = "materialize_compliance_audit",
|
action = "materialize_compliance_audit",
|
||||||
surface_code = %observation.event.surface_code.0.as_str(),
|
surface_code = %observation.event.surface_code.0.as_str(),
|
||||||
entry_code = %observation.event.event_name.0.as_str(),
|
entry_code = %observation.event.event_name.0.as_str(),
|
||||||
@@ -178,7 +178,7 @@ impl crate::MtApiEventMaterializer for crate::MtComplianceAuditMaterializer {
|
|||||||
}),
|
}),
|
||||||
};
|
};
|
||||||
tracing::debug!(
|
tracing::debug!(
|
||||||
target: crate::MT_COMPLIANCE_AUDIT_TRACING_TARGET,
|
target: crate::TRACING_TARGET_MATERIALIZER_COMPLIANCE_AUDIT,
|
||||||
action = "materialize_compliance_audit",
|
action = "materialize_compliance_audit",
|
||||||
surface_code = %observation.event.surface_code.0.as_str(),
|
surface_code = %observation.event.surface_code.0.as_str(),
|
||||||
entry_code = %observation.event.event_name.0.as_str(),
|
entry_code = %observation.event.event_name.0.as_str(),
|
||||||
@@ -225,7 +225,7 @@ fn materialize_compute_budget_profile(
|
|||||||
}),
|
}),
|
||||||
};
|
};
|
||||||
tracing::debug!(
|
tracing::debug!(
|
||||||
target: crate::MT_COMPLIANCE_AUDIT_TRACING_TARGET,
|
target: crate::TRACING_TARGET_MATERIALIZER_COMPLIANCE_AUDIT,
|
||||||
action = "materialize_compute_budget_profile",
|
action = "materialize_compute_budget_profile",
|
||||||
surface_code = %observation.event.surface_code.0.as_str(),
|
surface_code = %observation.event.surface_code.0.as_str(),
|
||||||
entry_code = %observation.event.event_name.0.as_str(),
|
entry_code = %observation.event.event_name.0.as_str(),
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
// file: kb-lib/src/materializer/compliance/constants.rs
|
// file: kb-lib/src/materializer/compliance/constants.rs
|
||||||
// version: 1
|
// version: 2
|
||||||
|
|
||||||
//! Local constants for the native compliance audit materializer.
|
//! Local constants for the native compliance audit materializer.
|
||||||
|
|
||||||
/// Canonical tracing target for this component.
|
/// Canonical tracing target for this component.
|
||||||
pub(crate) const MT_COMPLIANCE_AUDIT_TRACING_TARGET: &str = "kb-lib.materializer.compliance";
|
pub(crate) const TRACING_TARGET_MATERIALIZER_COMPLIANCE_AUDIT: &str =
|
||||||
|
"kb-lib.materializer.compliance";
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// file: kb-lib/src/materializer/lifecycle.rs
|
// file: kb-lib/src/materializer/lifecycle.rs
|
||||||
// version: 3
|
// version: 4
|
||||||
|
|
||||||
//! `lifecycle` materializer family.
|
//! `lifecycle` materializer family.
|
||||||
|
|
||||||
@@ -10,4 +10,4 @@ mod core;
|
|||||||
pub use self::core::MtLifecycleMaterializer;
|
pub use self::core::MtLifecycleMaterializer;
|
||||||
|
|
||||||
/// Canonical tracing target for the native lifecycle materializer.
|
/// Canonical tracing target for the native lifecycle materializer.
|
||||||
pub(crate) use self::constants::MT_LIFECYCLE_TRACING_TARGET;
|
pub(crate) use self::constants::TRACING_TARGET_MATERIALIZER_LIFECYCLE;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// file: kb-lib/src/materializer/lifecycle/constants.rs
|
// file: kb-lib/src/materializer/lifecycle/constants.rs
|
||||||
// version: 1
|
// version: 2
|
||||||
|
|
||||||
//! Local constants for the native lifecycle materializer.
|
//! Local constants for the native lifecycle materializer.
|
||||||
|
|
||||||
/// Canonical tracing target for this component.
|
/// Canonical tracing target for this component.
|
||||||
pub(crate) const MT_LIFECYCLE_TRACING_TARGET: &str = "kb-lib.materializer.lifecycle";
|
pub(crate) const TRACING_TARGET_MATERIALIZER_LIFECYCLE: &str = "kb-lib.materializer.lifecycle";
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// file: kb-lib/src/materializer/lifecycle/core.rs
|
// file: kb-lib/src/materializer/lifecycle/core.rs
|
||||||
// version: 14
|
// version: 15
|
||||||
|
|
||||||
//! Stable lifecycle projections derived from exact decoded observations.
|
//! Stable lifecycle projections derived from exact decoded observations.
|
||||||
|
|
||||||
@@ -181,7 +181,7 @@ impl crate::MtApiEventMaterializer for crate::MtLifecycleMaterializer {
|
|||||||
std::option::Option::Some(value) => value,
|
std::option::Option::Some(value) => value,
|
||||||
std::option::Option::None => {
|
std::option::Option::None => {
|
||||||
tracing::debug!(
|
tracing::debug!(
|
||||||
target: crate::MT_LIFECYCLE_TRACING_TARGET,
|
target: crate::TRACING_TARGET_MATERIALIZER_LIFECYCLE,
|
||||||
action = "materialize_lifecycle",
|
action = "materialize_lifecycle",
|
||||||
surface_code = %observation.event.surface_code.0.as_str(),
|
surface_code = %observation.event.surface_code.0.as_str(),
|
||||||
entry_code = %observation.event.event_name.0.as_str(),
|
entry_code = %observation.event.event_name.0.as_str(),
|
||||||
@@ -193,7 +193,7 @@ impl crate::MtApiEventMaterializer for crate::MtLifecycleMaterializer {
|
|||||||
};
|
};
|
||||||
if observation.transaction_failed || !observation.observation_committed {
|
if observation.transaction_failed || !observation.observation_committed {
|
||||||
tracing::debug!(
|
tracing::debug!(
|
||||||
target: crate::MT_LIFECYCLE_TRACING_TARGET,
|
target: crate::TRACING_TARGET_MATERIALIZER_LIFECYCLE,
|
||||||
action = "materialize_lifecycle",
|
action = "materialize_lifecycle",
|
||||||
surface_code = %observation.event.surface_code.0.as_str(),
|
surface_code = %observation.event.surface_code.0.as_str(),
|
||||||
entry_code = %observation.event.event_name.0.as_str(),
|
entry_code = %observation.event.event_name.0.as_str(),
|
||||||
@@ -225,7 +225,7 @@ impl crate::MtApiEventMaterializer for crate::MtLifecycleMaterializer {
|
|||||||
let projection_details =
|
let projection_details =
|
||||||
projection_details(projection, &accounts, ¶meters, operation.as_str());
|
projection_details(projection, &accounts, ¶meters, operation.as_str());
|
||||||
tracing::debug!(
|
tracing::debug!(
|
||||||
target: crate::MT_LIFECYCLE_TRACING_TARGET,
|
target: crate::TRACING_TARGET_MATERIALIZER_LIFECYCLE,
|
||||||
action = "materialize_lifecycle",
|
action = "materialize_lifecycle",
|
||||||
surface_code = %observation.event.surface_code.0.as_str(),
|
surface_code = %observation.event.surface_code.0.as_str(),
|
||||||
entry_code = %observation.event.event_name.0.as_str(),
|
entry_code = %observation.event.event_name.0.as_str(),
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// file: kb-lib/src/materializer/risk.rs
|
// file: kb-lib/src/materializer/risk.rs
|
||||||
// version: 2
|
// version: 3
|
||||||
|
|
||||||
//! `risk` materializer family.
|
//! `risk` materializer family.
|
||||||
|
|
||||||
@@ -14,4 +14,4 @@ pub(crate) use self::constants::MT_RISK_PROCESSOR_NAME;
|
|||||||
/// Stable projection contract version for SPL Token and ATA risk facts.
|
/// Stable projection contract version for SPL Token and ATA risk facts.
|
||||||
pub(crate) use self::constants::MT_RISK_PROJECTION_VERSION;
|
pub(crate) use self::constants::MT_RISK_PROJECTION_VERSION;
|
||||||
/// Canonical tracing target for SPL Token and ATA risk facts.
|
/// Canonical tracing target for SPL Token and ATA risk facts.
|
||||||
pub(crate) use self::constants::MT_RISK_TRACING_TARGET;
|
pub(crate) use self::constants::TRACING_TARGET_MATERIALIZER_RISK;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// file: kb-lib/src/materializer/risk/constants.rs
|
// file: kb-lib/src/materializer/risk/constants.rs
|
||||||
// version: 1
|
// version: 2
|
||||||
|
|
||||||
//! Local constants for fact-only risk projections.
|
//! Local constants for fact-only risk projections.
|
||||||
|
|
||||||
@@ -8,4 +8,4 @@ pub(crate) const MT_RISK_PROCESSOR_NAME: &str = "spl_token_risk";
|
|||||||
/// Stable projection payload contract version.
|
/// Stable projection payload contract version.
|
||||||
pub(crate) const MT_RISK_PROJECTION_VERSION: u32 = 2;
|
pub(crate) const MT_RISK_PROJECTION_VERSION: u32 = 2;
|
||||||
/// Canonical tracing target for this component.
|
/// Canonical tracing target for this component.
|
||||||
pub(crate) const MT_RISK_TRACING_TARGET: &str = "kb-lib.materializer.risk";
|
pub(crate) const TRACING_TARGET_MATERIALIZER_RISK: &str = "kb-lib.materializer.risk";
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// file: kb-lib/src/materializer/risk/core.rs
|
// file: kb-lib/src/materializer/risk/core.rs
|
||||||
// version: 2
|
// version: 3
|
||||||
|
|
||||||
//! Stable fact-only risk projections for committed SPL Token and ATA observations.
|
//! Stable fact-only risk projections for committed SPL Token and ATA observations.
|
||||||
|
|
||||||
@@ -157,7 +157,7 @@ impl crate::MtApiEventMaterializer for crate::MtRiskMaterializer {
|
|||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
};
|
};
|
||||||
tracing::debug!(target: crate::MT_RISK_TRACING_TARGET, action = "materialize_token_risk_fact", risk_kind, operation, ata, "materialize committed SPL Token or ATA risk fact");
|
tracing::debug!(target: crate::TRACING_TARGET_MATERIALIZER_RISK, action = "materialize_token_risk_fact", risk_kind, operation, ata, "materialize committed SPL Token or ATA risk fact");
|
||||||
return crate::MtApiMaterializerExecutionResult {
|
return crate::MtApiMaterializerExecutionResult {
|
||||||
status: crate::MtApiMaterializerOutcomeStatus::Inserted,
|
status: crate::MtApiMaterializerOutcomeStatus::Inserted,
|
||||||
outputs: std::vec![output],
|
outputs: std::vec![output],
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// file: kb-lib/src/materializer/staking.rs
|
// file: kb-lib/src/materializer/staking.rs
|
||||||
// version: 3
|
// version: 4
|
||||||
|
|
||||||
//! `staking` materializer family.
|
//! `staking` materializer family.
|
||||||
|
|
||||||
@@ -10,4 +10,4 @@ mod core;
|
|||||||
pub use self::core::MtStakingMaterializer;
|
pub use self::core::MtStakingMaterializer;
|
||||||
|
|
||||||
/// Canonical tracing target for the native stake and vote materializer.
|
/// Canonical tracing target for the native stake and vote materializer.
|
||||||
pub(crate) use self::constants::MT_STAKING_TRACING_TARGET;
|
pub(crate) use self::constants::TRACING_TARGET_MATERIALIZER_STAKING;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// file: kb-lib/src/materializer/staking/constants.rs
|
// file: kb-lib/src/materializer/staking/constants.rs
|
||||||
// version: 1
|
// version: 2
|
||||||
|
|
||||||
//! Local constants for the native stake and vote materializer.
|
//! Local constants for the native stake and vote materializer.
|
||||||
|
|
||||||
/// Canonical tracing target for this component.
|
/// Canonical tracing target for this component.
|
||||||
pub(crate) const MT_STAKING_TRACING_TARGET: &str = "kb-lib.materializer.staking";
|
pub(crate) const TRACING_TARGET_MATERIALIZER_STAKING: &str = "kb-lib.materializer.staking";
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// file: kb-lib/src/materializer/staking/core.rs
|
// file: kb-lib/src/materializer/staking/core.rs
|
||||||
// version: 7
|
// version: 8
|
||||||
|
|
||||||
//! Instruction-level staking projections for native Stake and Vote observations.
|
//! Instruction-level staking projections for native Stake and Vote observations.
|
||||||
|
|
||||||
@@ -162,7 +162,7 @@ impl crate::MtApiEventMaterializer for crate::MtStakingMaterializer {
|
|||||||
std::option::Option::Some(value) => value,
|
std::option::Option::Some(value) => value,
|
||||||
std::option::Option::None => {
|
std::option::Option::None => {
|
||||||
tracing::debug!(
|
tracing::debug!(
|
||||||
target: crate::MT_STAKING_TRACING_TARGET,
|
target: crate::TRACING_TARGET_MATERIALIZER_STAKING,
|
||||||
action = "materialize_staking",
|
action = "materialize_staking",
|
||||||
surface_code = %observation.event.surface_code.0.as_str(),
|
surface_code = %observation.event.surface_code.0.as_str(),
|
||||||
entry_code = %observation.event.event_name.0.as_str(),
|
entry_code = %observation.event.event_name.0.as_str(),
|
||||||
@@ -177,7 +177,7 @@ impl crate::MtApiEventMaterializer for crate::MtStakingMaterializer {
|
|||||||
}
|
}
|
||||||
if observation.transaction_failed || !observation.observation_committed {
|
if observation.transaction_failed || !observation.observation_committed {
|
||||||
tracing::debug!(
|
tracing::debug!(
|
||||||
target: crate::MT_STAKING_TRACING_TARGET,
|
target: crate::TRACING_TARGET_MATERIALIZER_STAKING,
|
||||||
action = "materialize_staking",
|
action = "materialize_staking",
|
||||||
surface_code = %observation.event.surface_code.0.as_str(),
|
surface_code = %observation.event.surface_code.0.as_str(),
|
||||||
entry_code = %observation.event.event_name.0.as_str(),
|
entry_code = %observation.event.event_name.0.as_str(),
|
||||||
@@ -225,7 +225,7 @@ impl crate::MtApiEventMaterializer for crate::MtStakingMaterializer {
|
|||||||
}),
|
}),
|
||||||
};
|
};
|
||||||
tracing::debug!(
|
tracing::debug!(
|
||||||
target: crate::MT_STAKING_TRACING_TARGET,
|
target: crate::TRACING_TARGET_MATERIALIZER_STAKING,
|
||||||
action = "materialize_staking",
|
action = "materialize_staking",
|
||||||
surface_code = %observation.event.surface_code.0.as_str(),
|
surface_code = %observation.event.surface_code.0.as_str(),
|
||||||
entry_code = %observation.event.event_name.0.as_str(),
|
entry_code = %observation.event.event_name.0.as_str(),
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// file: kb-lib/src/materializer/token.rs
|
// file: kb-lib/src/materializer/token.rs
|
||||||
// version: 4
|
// version: 5
|
||||||
|
|
||||||
//! `token` materializer family.
|
//! `token` materializer family.
|
||||||
|
|
||||||
@@ -19,4 +19,4 @@ pub(crate) use self::constants::MT_TOKEN_ACCOUNTS_PROCESSOR_NAME;
|
|||||||
/// Stable projection contract version for Token, ATA and Token-2022 account projections.
|
/// Stable projection contract version for Token, ATA and Token-2022 account projections.
|
||||||
pub(crate) use self::constants::MT_TOKEN_ACCOUNTS_PROJECTION_VERSION;
|
pub(crate) use self::constants::MT_TOKEN_ACCOUNTS_PROJECTION_VERSION;
|
||||||
/// Canonical tracing target for Token, ATA and Token-2022 account projections.
|
/// Canonical tracing target for Token, ATA and Token-2022 account projections.
|
||||||
pub(crate) use self::constants::MT_TOKEN_ACCOUNTS_TRACING_TARGET;
|
pub(crate) use self::constants::TRACING_TARGET_MATERIALIZER_TOKEN_ACCOUNTS;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// file: kb-lib/src/materializer/token/accounts.rs
|
// file: kb-lib/src/materializer/token/accounts.rs
|
||||||
// version: 3
|
// version: 4
|
||||||
|
|
||||||
//! Stable committed SPL Token mutation and ATA lifecycle projections.
|
//! Stable committed SPL Token mutation and ATA lifecycle projections.
|
||||||
|
|
||||||
@@ -157,7 +157,7 @@ impl crate::MtApiEventMaterializer for crate::MtTokenAccountsMaterializer {
|
|||||||
}),
|
}),
|
||||||
};
|
};
|
||||||
tracing::debug!(
|
tracing::debug!(
|
||||||
target: crate::MT_TOKEN_ACCOUNTS_TRACING_TARGET,
|
target: crate::TRACING_TARGET_MATERIALIZER_TOKEN_ACCOUNTS,
|
||||||
action = "materialize_token_account_mutation",
|
action = "materialize_token_account_mutation",
|
||||||
signature = %observation.event.signature.0,
|
signature = %observation.event.signature.0,
|
||||||
instruction_path = %observation.event.instruction_path.0,
|
instruction_path = %observation.event.instruction_path.0,
|
||||||
@@ -285,7 +285,7 @@ fn materialize_ata(
|
|||||||
}),
|
}),
|
||||||
};
|
};
|
||||||
tracing::debug!(
|
tracing::debug!(
|
||||||
target: crate::MT_TOKEN_ACCOUNTS_TRACING_TARGET,
|
target: crate::TRACING_TARGET_MATERIALIZER_TOKEN_ACCOUNTS,
|
||||||
action = "materialize_ata_lifecycle",
|
action = "materialize_ata_lifecycle",
|
||||||
signature = %observation.event.signature.0,
|
signature = %observation.event.signature.0,
|
||||||
instruction_path = %observation.event.instruction_path.0,
|
instruction_path = %observation.event.instruction_path.0,
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// file: kb-lib/src/materializer/token/constants.rs
|
// file: kb-lib/src/materializer/token/constants.rs
|
||||||
// version: 1
|
// version: 2
|
||||||
|
|
||||||
//! Local constants for classic SPL Token account projections.
|
//! Local constants for classic SPL Token account projections.
|
||||||
|
|
||||||
@@ -8,4 +8,4 @@ pub(crate) const MT_TOKEN_ACCOUNTS_PROCESSOR_NAME: &str = "spl_token_accounts";
|
|||||||
/// Stable projection payload contract version.
|
/// Stable projection payload contract version.
|
||||||
pub(crate) const MT_TOKEN_ACCOUNTS_PROJECTION_VERSION: u32 = 3;
|
pub(crate) const MT_TOKEN_ACCOUNTS_PROJECTION_VERSION: u32 = 3;
|
||||||
/// Canonical tracing target for this component.
|
/// Canonical tracing target for this component.
|
||||||
pub(crate) const MT_TOKEN_ACCOUNTS_TRACING_TARGET: &str = "kb-lib.materializer.token";
|
pub(crate) const TRACING_TARGET_MATERIALIZER_TOKEN_ACCOUNTS: &str = "kb-lib.materializer.token";
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// file: kb-lib/src/materializer/transaction.rs
|
// file: kb-lib/src/materializer/transaction.rs
|
||||||
// version: 2
|
// version: 3
|
||||||
|
|
||||||
//! `transaction` materializer family.
|
//! `transaction` materializer family.
|
||||||
|
|
||||||
@@ -16,4 +16,4 @@ pub(crate) use self::constants::MT_TRANSACTION_ANNOTATIONS_PROCESSOR_NAME;
|
|||||||
/// Stable projection contract version for transaction annotations.
|
/// Stable projection contract version for transaction annotations.
|
||||||
pub(crate) use self::constants::MT_TRANSACTION_ANNOTATIONS_PROJECTION_VERSION;
|
pub(crate) use self::constants::MT_TRANSACTION_ANNOTATIONS_PROJECTION_VERSION;
|
||||||
/// Canonical tracing target for transaction annotations.
|
/// Canonical tracing target for transaction annotations.
|
||||||
pub(crate) use self::constants::MT_TRANSACTION_ANNOTATIONS_TRACING_TARGET;
|
pub(crate) use self::constants::TRACING_TARGET_MATERIALIZER_TRANSACTION_ANNOTATIONS;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// file: kb-lib/src/materializer/transaction/annotations.rs
|
// file: kb-lib/src/materializer/transaction/annotations.rs
|
||||||
// version: 3
|
// version: 4
|
||||||
|
|
||||||
//! Exact committed SPL Memo transaction annotation projection.
|
//! Exact committed SPL Memo transaction annotation projection.
|
||||||
|
|
||||||
@@ -179,7 +179,7 @@ impl crate::MtApiEventMaterializer for crate::MtTransactionAnnotationMaterialize
|
|||||||
}),
|
}),
|
||||||
};
|
};
|
||||||
tracing::debug!(
|
tracing::debug!(
|
||||||
target: crate::MT_TRANSACTION_ANNOTATIONS_TRACING_TARGET,
|
target: crate::TRACING_TARGET_MATERIALIZER_TRANSACTION_ANNOTATIONS,
|
||||||
action = "materialize_transaction_annotation",
|
action = "materialize_transaction_annotation",
|
||||||
signature = %observation.event.signature.0,
|
signature = %observation.event.signature.0,
|
||||||
instruction_path = %observation.event.instruction_path.0,
|
instruction_path = %observation.event.instruction_path.0,
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// file: kb-lib/src/materializer/transaction/constants.rs
|
// file: kb-lib/src/materializer/transaction/constants.rs
|
||||||
// version: 1
|
// version: 2
|
||||||
|
|
||||||
//! Local constants for the transaction annotation materializer.
|
//! Local constants for the transaction annotation materializer.
|
||||||
|
|
||||||
@@ -10,5 +10,5 @@ pub(crate) const MT_TRANSACTION_ANNOTATIONS_PROCESSOR_NAME: &str = "transaction_
|
|||||||
/// Stable projection contract version.
|
/// Stable projection contract version.
|
||||||
pub(crate) const MT_TRANSACTION_ANNOTATIONS_PROJECTION_VERSION: u32 = 1;
|
pub(crate) const MT_TRANSACTION_ANNOTATIONS_PROJECTION_VERSION: u32 = 1;
|
||||||
/// Canonical tracing target for this component.
|
/// Canonical tracing target for this component.
|
||||||
pub(crate) const MT_TRANSACTION_ANNOTATIONS_TRACING_TARGET: &str =
|
pub(crate) const TRACING_TARGET_MATERIALIZER_TRANSACTION_ANNOTATIONS: &str =
|
||||||
"kb-lib.materializer.transaction";
|
"kb-lib.materializer.transaction";
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# file: kb-logging/Cargo.toml
|
# file: kb-logging/Cargo.toml
|
||||||
# version: 1
|
# version: 2
|
||||||
|
|
||||||
[package]
|
[package]
|
||||||
name = "kb-logging"
|
name = "kb-logging"
|
||||||
@@ -8,5 +8,11 @@ edition.workspace = true
|
|||||||
license.workspace = true
|
license.workspace = true
|
||||||
publish.workspace = true
|
publish.workspace = true
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
kb-core = { path = "../kb-core" }
|
||||||
|
tracing.workspace = true
|
||||||
|
tracing-appender.workspace = true
|
||||||
|
tracing-subscriber.workspace = true
|
||||||
|
|
||||||
[lints]
|
[lints]
|
||||||
workspace = true
|
workspace = true
|
||||||
|
|||||||
38
kb-logging/README.md
Normal file
38
kb-logging/README.md
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
<!-- file: kb-logging/README.md -->
|
||||||
|
<!-- version: 5 -->
|
||||||
|
|
||||||
|
# kb-logging
|
||||||
|
|
||||||
|
`kb-logging` initialise le routage `tracing` commun du workspace.
|
||||||
|
|
||||||
|
## Responsabilité
|
||||||
|
|
||||||
|
Le crate transforme la configuration du profil actif en layers `tracing_subscriber` et route les événements vers la console, les fichiers humains et les fichiers JSONL. Le `LoggingGuard` retourné par `init_logging` doit rester vivant pendant toute la durée du processus afin de conserver les writers non bloquants.
|
||||||
|
|
||||||
|
Les décisions de niveau et de target sont appliquées par chaque writer de route, avec un seul filtre d’admission agrégé en amont. Elles ne créent pas un `Filtered` layer par sortie : `tracing-subscriber` réserve seulement 64 identifiants de filtres par subscriber, tandis que la matrice complète comporte désormais plus de 64 routes activables. Le filtrage writer conserve les niveaux, targets exacts, préfixes et overrides configurés sans imposer cette limite au nombre de sorties ; le filtre agrégé évite de formater un événement qu’aucune route n’accepte.
|
||||||
|
|
||||||
|
Les chemins relatifs sont résolus depuis la racine du workspace. L’ANSI est désactivé dans les formatters fichier et retiré une seconde fois par `StripAnsiMakeWriter` afin de nettoyer les messages provenant d’une WebView ou d’une dépendance externe.
|
||||||
|
|
||||||
|
## Contrat de targets
|
||||||
|
|
||||||
|
`kb-logging` utilise le target canonique `kb-logging`, défini dans `src/constants.rs`. Chaque crate qui dépend de `tracing` doit suivre le même contrat avec son propre nom Cargo.
|
||||||
|
|
||||||
|
Le test `every_tracing_crate_has_one_canonical_target_constant` inspecte les manifests du workspace et vérifie qu’une crate déclarant `tracing.workspace = true` possède exactement une constante conforme.
|
||||||
|
|
||||||
|
## Matrice de fichiers
|
||||||
|
|
||||||
|
Chaque profil actif configure :
|
||||||
|
|
||||||
|
```text
|
||||||
|
logs/<profile>/debug.log
|
||||||
|
logs/<profile>/info.log
|
||||||
|
logs/<profile>/error.jsonl
|
||||||
|
logs/<profile>/app.log
|
||||||
|
logs/<profile>/<crate>/debug.log
|
||||||
|
logs/<profile>/<crate>/info.log
|
||||||
|
logs/<profile>/<crate>/error.jsonl
|
||||||
|
```
|
||||||
|
|
||||||
|
Les fichiers sont en rotation quotidienne. Les routes `debug` et `info` sont cumulatives ; les routes `error.jsonl` sont forcées au niveau `error` et n’ajoutent pas les overrides verbeux des dépendances.
|
||||||
|
|
||||||
|
Le contrat détaillé se trouve dans `docs/LOGGING.md` et `docs/TRACING_CONTRACT.md`.
|
||||||
58
kb-logging/src/config.rs
Normal file
58
kb-logging/src/config.rs
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
// file: kb-logging/src/config.rs
|
||||||
|
// version: 4
|
||||||
|
|
||||||
|
//! Logging configuration data structures consumed by the tracing runtime.
|
||||||
|
|
||||||
|
/// Legacy file route shape kept for early callers that only need human file logs.
|
||||||
|
#[derive(Clone, Debug, Eq, PartialEq)]
|
||||||
|
pub struct LogFileRoute {
|
||||||
|
/// Output file path.
|
||||||
|
pub file: std::string::String,
|
||||||
|
/// Logging level filter.
|
||||||
|
pub level: std::string::String,
|
||||||
|
/// Target filters handled by this route.
|
||||||
|
pub targets: std::vec::Vec<std::string::String>,
|
||||||
|
}
|
||||||
|
|
||||||
|
/// One target-level filter shared by routes that include the wildcard target.
|
||||||
|
#[derive(Clone, Debug, Eq, PartialEq)]
|
||||||
|
pub struct LogTargetFilterConfig {
|
||||||
|
/// Tracing target or crate prefix.
|
||||||
|
pub target: std::string::String,
|
||||||
|
/// Minimum level assigned to this target.
|
||||||
|
pub level: std::string::String,
|
||||||
|
}
|
||||||
|
|
||||||
|
/// One logging output route.
|
||||||
|
#[derive(Clone, Debug, Eq, PartialEq)]
|
||||||
|
pub struct LogTargetConfig {
|
||||||
|
/// Route name used for diagnostics.
|
||||||
|
pub name: std::string::String,
|
||||||
|
/// Enables this route.
|
||||||
|
pub enabled: bool,
|
||||||
|
/// Sink kind: `console` or `file`.
|
||||||
|
pub sink: std::string::String,
|
||||||
|
/// Minimum level for this route.
|
||||||
|
pub level: std::string::String,
|
||||||
|
/// File path for file sinks, empty for console sinks.
|
||||||
|
pub path: std::string::String,
|
||||||
|
/// Rotation mode: `none`, `never`, `daily`, or `hourly`.
|
||||||
|
pub rotation: std::string::String,
|
||||||
|
/// Format kind: `human`, `compact`, `pretty`, or `json`.
|
||||||
|
pub format: std::string::String,
|
||||||
|
/// Enables ANSI formatting for this route.
|
||||||
|
pub ansi: bool,
|
||||||
|
/// Included tracing targets or wildcard target globs.
|
||||||
|
pub targets: std::vec::Vec<std::string::String>,
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Logging configuration consumed by `kb-logging` before profile binding exists.
|
||||||
|
#[derive(Clone, Debug, Eq, PartialEq)]
|
||||||
|
pub struct LoggingConfig {
|
||||||
|
/// Default log level used when a route does not provide target directives.
|
||||||
|
pub default_level: std::string::String,
|
||||||
|
/// Output routes.
|
||||||
|
pub targets: std::vec::Vec<crate::LogTargetConfig>,
|
||||||
|
/// Target-specific overrides appended to wildcard routes.
|
||||||
|
pub target_filters: std::vec::Vec<crate::LogTargetFilterConfig>,
|
||||||
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
// file: kb-logging/src/constants.rs
|
// file: kb-logging/src/constants.rs
|
||||||
// version: 1
|
// version: 2
|
||||||
|
|
||||||
/// Canonical tracing target for this crate.
|
/// Canonical tracing target for this crate.
|
||||||
pub(crate) const TRACING_TARGET: &str = "kb-logging";
|
pub(crate) const TRACING_TARGET: &str = "kb-logging";
|
||||||
|
|||||||
@@ -1,17 +1,30 @@
|
|||||||
// file: kb-logging/src/lib.rs
|
// file: kb-logging/src/lib.rs
|
||||||
// version: 1
|
// version: 6
|
||||||
|
|
||||||
#![forbid(unsafe_code)]
|
//! Logging and tracing initialization for applications and workers.
|
||||||
#![deny(unreachable_pub)]
|
|
||||||
#![warn(missing_docs)]
|
#![warn(missing_docs)]
|
||||||
|
#![deny(unreachable_pub)]
|
||||||
|
#![forbid(unsafe_code)]
|
||||||
|
|
||||||
//! Logging contracts for Khadhroony Bot3.
|
mod config;
|
||||||
|
|
||||||
mod constants;
|
mod constants;
|
||||||
|
mod tracing_runtime;
|
||||||
|
|
||||||
/// Canonical tracing target for this crate.
|
/// Canonical tracing target for this crate.
|
||||||
pub(crate) use self::constants::TRACING_TARGET;
|
pub(crate) use self::constants::TRACING_TARGET;
|
||||||
|
|
||||||
|
/// Exposes the legacy file route shape kept for early file-only callers.
|
||||||
|
pub use self::config::LogFileRoute;
|
||||||
|
/// Exposes one configured logging output target.
|
||||||
|
pub use self::config::LogTargetConfig;
|
||||||
|
/// Exposes one configured tracing target filter.
|
||||||
|
pub use self::config::LogTargetFilterConfig;
|
||||||
|
/// Exposes the logging configuration consumed by this crate.
|
||||||
|
pub use self::config::LoggingConfig;
|
||||||
|
/// Exposes the guard that keeps non-blocking logging workers alive.
|
||||||
|
pub use self::tracing_runtime::LoggingGuard;
|
||||||
|
/// Exposes initialization from a raw logging configuration section.
|
||||||
|
pub use self::tracing_runtime::init_logging;
|
||||||
/// Returns the canonical tracing target.
|
/// Returns the canonical tracing target.
|
||||||
pub fn tracing_target() -> &'static str {
|
pub fn tracing_target() -> &'static str {
|
||||||
return crate::TRACING_TARGET;
|
return crate::TRACING_TARGET;
|
||||||
|
|||||||
1120
kb-logging/src/tracing_runtime.rs
Normal file
1120
kb-logging/src/tracing_runtime.rs
Normal file
File diff suppressed because it is too large
Load Diff
@@ -438,13 +438,13 @@ def audit_reserved_executor_scaffolds(root: pathlib.Path) -> list[Violation]:
|
|||||||
"reserved executor must build only an explicit zero-instruction plan",
|
"reserved executor must build only an explicit zero-instruction plan",
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
if reserved_count != 100:
|
if reserved_count != 99:
|
||||||
violations.append(
|
violations.append(
|
||||||
Violation(
|
Violation(
|
||||||
"KH_EX007",
|
"KH_EX007",
|
||||||
"kb-lib/src/executor",
|
"kb-lib/src/executor",
|
||||||
1,
|
1,
|
||||||
f"expected 100 reserved executor boundaries, found {reserved_count}",
|
f"expected 99 reserved executor boundaries, found {reserved_count}",
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
return violations
|
return violations
|
||||||
|
|||||||
Reference in New Issue
Block a user