Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
multiple parentchain handlers (#1420)
* [enclave-runtime/initialization] lift some code out of the innermost function * [enclave-runtime/initialization] rename `EnclaveIndirectExecutor` to `TeerexParentchainIndirectExecutor` * [enclave-runtime/initialization] rename stuff that is only for the primary parentchain containing the teerex pallet * [enclave-runtime/initialization] naively add second set of components needed for a second parachain * [enclave-runtime/initialization] introduce second nonce cache for the second parachain * [enclave-runtime/initialization/global_components] fix wrong type arg * [indirect-calls-executor] fix `DenyAll` implementation * [enclave-runtime/initialization] code compiles for instantiating a secondary parachain parentchain handler. * [enclave-runtime/initialization] fmt * [enclave-runtime/initialization] add second set of solochain parentchain handler * [enclave-runtime/initialization] extend parentchain init params with the secondary parentchains * [enclave-runtime/initialization] add second light-client seal * change parentchain init params enum, and add full code for initialization. * fix some comments and naming * [service] add cli options for the secondary node * extract `init_parentchain` function in service and add `parentchain_id` to `set_nonce` and `set_metadata` ecalls (id is not used yet in the enclave) * rename `get_node_metadata_repository_from_solo_or_parachain` to `get_node_metadata_repository_from_teerex_solo_or_parachain` and add `get_node_metadata_repository_from_secondary_solo_or_parachain` * [enclave-runtime] `set_nonce` takes into account the parentchain id now * fix test compilation * add complete code for secondary parentchain * [service/config] fix cli naming * [service] indicate in logs that they are for the secondary parentchain * [service] fix clippy * [service] fix tests * [enclave-runtime] fix: don't initialize second light client seal on the global for the first client * [service/setup] fix purging second light client db. * [service] print block number at which the enclave registered. * [parentchain] remove some unnecessary trait bounds (simplify error message) * [enclave-runtime] remove unused unit test * OnchainOcallApi does not take a paramenter such that it nows, which parentchain to talk to. * [stf-executor] remove code that executes a state update upon before stf execution as it is apparently no longer needed * [service] propagate parentchain id throughout the codebase * [service] fix tests * [local-setup] prepare configs to run multiple nodes * [stf-executor/executor] fix wrong import * [local-setup] add a config that spawns two nodes * [service] remove unnecessary traitbounds * [service] minor logging fixes * `sync_parentchain` and `trigger_parentchain_block_import` have the `ParentchainId` are too now. * [service/worker_onchain_ocall] log to which parentchain we want to send the extrinsic * [service/ocall_bridge] fix log typo * [enclave-runtime] supress clippy warning * [service] fix: fund enclave on secondary parentchain * [service/worker_on_chain_ocall] improve log for extrinsic * [local-setup] sleep 18 between setting up nodes, so that the logs are easier to distinguish * add new indirect calls filer, which checks for transfers to alice to shield these funds * [indirect-executor] use correct type in `TransferToAliceShieldsFundsFilter` * [indirect-executor] better logging * [local-setup/tmux_logger_two_nodes] only use three panes as the last one was unused * [indirect-executor] remove unused imports * [indirect-executor/transfer_to_alice_shields_funds] fix alice account * [local-setup] use trace in indirect executor * [cli] add `demo_shielding_unshielding_two_nodes` (working) * rename `ParentchainId` enum variants to `Integritee` and `TargetA` * [node-api/metadata] format pallet_balances licence header. * [indirect-calls-executor] fix documentation * [indirect-calls-executor] rename `ALICE_ENCODED` to `ALICE_SEED` * [Enclave.edl] fix indents * rename `get_node_metadata_from_teerex_solo_or_parachain` to `get_node_metadata_repository_from_integritee_solo_or_parachain` * [enclave-runtime] rename error `NoTeerexParentchainAssigned` to `NoIntegriteeParentchainAssigned` * [enclave-runtime] rename error `NoSecondaryParentchainAssigned` to `NoTargetAParentchainAssigned` * [itp-nonce-cache] rename caches to `INTEGRITEE_NONCE_CACHE` and `TARGET_A_PARENTCHAIN_NONCE_CACHE` * move nonce caches to the enclave-runtimes global components * [enclave-runtime] change doc comments to regular comments were suitable * [itp-settings] rename light-client db paths * [enclave-runtime/initialization] rename parachain.rs to integritee_parachain.rs and `FullParachainHandler` to `IntegriteeParachainHandler` * [enclave-runtime/initialization] rename parachain2.rs to target_a_parachain.rs and `FullParachainHandler2` to `TargetAParachainHandler` * [enclave-runtime/initialization] rename solochain.rs to integritee_solochain.rs and `FullSolochainHandler` to `IntegriteeSolochainHandler` * [enclave-runtime/initialization] rename solochain2.rs to target_a_solochain.rs and `FullSolochainHandler2` to `TargetASolochainHandler` * [enclave-runtime/initialization] reflect previous changes in global components naming * [enclave-runtime/initialization] consistent naming in global components * [enclave-runtime/initialization] rename Teerex... types to Integritee... types * [enclave-runtime/initialization] rename Secondary... types to TargetA... types * [enclave-runtime/initialization] better distinguish the two light-client seals * [enclave-runtime] some more minor renamings for new scheme * [itp-settings] fix naming of target_a light client db path * [enclave-runtime/global_components] fix grammar in doc * [enclave-runtime/global_components] minor doc fixes * [enclave-runtime/initialization] fix naming of light-client-db variables * [cli] rename cli args in demo scripts to be more readable and use new names for parentchains * fmt * [enclave-runtime] more ergonomic code due to shorter variable names. * [indirect-calls-executor] simplify creation of alice's account id * [indirect-calls-executor] add an assert_eq in the doc test * [service] update cli arguments to new parentchain naming * [service/config] fix missing renamings * [service/node_api_factory] add endpoint renamings * [service/main] rename node_api to integritee_rpc_api * [service/main] rename `init_parentchain` and `init_secondary_parentchain` to `init_integritee_parentchain` and `init_target_a_parentchain` * [service/config] fix naming * [service/main] fix moving of variables * [service] fix tests * [service/bridge-api] rename error to new chain naming * [service/ocall_bridge] rename api factories for new naming * consisten naming change remaning: target_a_chain -> target_a_parentchain * fix missing minor renamings * clippy * [enclave-runtime/global-components] fix misallocation of `IntegriteeBlockImporter` to a Target A parentchain type. (this did not have any effect in the offchain-worker case)
- Loading branch information