diff --git a/CLI.md b/CLI.md index 6925e5e77179..f6e265cb6712 100644 --- a/CLI.md +++ b/CLI.md @@ -32,7 +32,6 @@ This document contains the help content for the `linera` command-line program. * [`linera read-data-blob`↴](#linera-read-data-blob) * [`linera create-application`↴](#linera-create-application) * [`linera publish-and-create`↴](#linera-publish-and-create) -* [`linera request-application`↴](#linera-request-application) * [`linera keygen`↴](#linera-keygen) * [`linera assign`↴](#linera-assign) * [`linera retry-pending-block`↴](#linera-retry-pending-block) @@ -57,7 +56,7 @@ This document contains the help content for the `linera` command-line program. * [`linera storage initialize`↴](#linera-storage-initialize) * [`linera storage list_namespaces`↴](#linera-storage-list_namespaces) * [`linera storage list_blob_ids`↴](#linera-storage-list_blob_ids) -* [`linera storage list_chain_ids`↴](#linera-storage-list_chain_ids) +* [`linera storage list_root_keys`↴](#linera-storage-list_root_keys) ## `linera` @@ -94,8 +93,7 @@ A Byzantine-fault tolerant sidechain with low-latency finality and high throughp * `read-data-blob` — Verify that a data blob is readable * `create-application` — Create an application * `publish-and-create` — Create an application, and publish the required bytecode -* `request-application` — Request an application from another chain, so it can be used on this one -* `keygen` — Create an unassigned key pair +* `keygen` — Create an unassigned key-pair * `assign` — Link an owner with a key pair in the wallet to a chain that was created for that owner * `retry-pending-block` — Retry a block we unsuccessfully tried to propose earlier * `wallet` — Show the contents of the wallet @@ -368,7 +366,7 @@ Show the version and genesis config hash of a new validator, and print a warning ###### **Options:** -* `--public-key ` — The public key of the validator. If given, the signature of the chain query info will be checked +* `--name ` — The public key of the validator. If given, the signature of the chain query info will be checked @@ -404,11 +402,11 @@ Synchronizes a validator with the local state of chains Add or modify a validator (admin only) -**Usage:** `linera set-validator [OPTIONS] --public-key --address
` +**Usage:** `linera set-validator [OPTIONS] --name --address
` ###### **Options:** -* `--public-key ` — The public key of the validator +* `--name ` — The public key of the validator * `--address
` — Network address * `--votes ` — Voting power @@ -421,11 +419,11 @@ Add or modify a validator (admin only) Remove a validator (admin only) -**Usage:** `linera remove-validator --public-key ` +**Usage:** `linera remove-validator --name ` ###### **Options:** -* `--public-key ` — The public key of the validator +* `--name ` — The public key of the validator @@ -681,26 +679,9 @@ Create an application, and publish the required bytecode -## `linera request-application` - -Request an application from another chain, so it can be used on this one - -**Usage:** `linera request-application [OPTIONS] ` - -###### **Arguments:** - -* `` — The ID of the application to request - -###### **Options:** - -* `--target-chain-id ` — The target chain on which the application is already registered. If not specified, the chain on which the application was created is used -* `--requester-chain-id ` — The owned chain on which the application is missing - - - ## `linera keygen` -Create an unassigned key pair +Create an unassigned key-pair **Usage:** `linera keygen` @@ -932,10 +913,7 @@ Start a Local Linera Network * `--external-protocol ` — External protocol used, either `grpc` or `grpcs` Default value: `grpc` -* `--with-faucet` — If present, a faucet is started using the chain provided by --faucet-chain, or `ChainId::root(1)` if not provided, as root 0 is usually the admin chain - - Default value: `false` -* `--faucet-chain ` — When using --with-faucet, this specifies the chain on which the faucet will be started. The chain is specified by its root number (0 for the admin chain, 1 for the first non-admin initial chain, etc) +* `--with-faucet-chain ` — If present, a faucet is started using the given chain root number (0 for the admin chain, 1 for the first non-admin initial chain, etc) * `--faucet-port ` — The port on which to run the faucet server Default value: `8080` @@ -961,20 +939,20 @@ Operation on the storage ###### **Subcommands:** -* `delete_all` — Delete all the namespaces in the database +* `delete_all` — Delete all the namespaces of the database * `delete_namespace` — Delete a single namespace from the database * `check_existence` — Check existence of a namespace in the database * `check_absence` — Check absence of a namespace in the database * `initialize` — Initialize a namespace in the database -* `list_namespaces` — List the namespaces in the database -* `list_blob_ids` — List the blob IDs in the database -* `list_chain_ids` — List the chain IDs in the database +* `list_namespaces` — List the namespaces of the database +* `list_blob_ids` — List the blobs of the database +* `list_root_keys` — List the root keys of the database ## `linera storage delete_all` -Delete all the namespaces in the database +Delete all the namespaces of the database **Usage:** `linera storage delete_all --storage ` @@ -1034,7 +1012,7 @@ Initialize a namespace in the database ## `linera storage list_namespaces` -List the namespaces in the database +List the namespaces of the database **Usage:** `linera storage list_namespaces --storage ` @@ -1046,7 +1024,7 @@ List the namespaces in the database ## `linera storage list_blob_ids` -List the blob IDs in the database +List the blobs of the database **Usage:** `linera storage list_blob_ids --storage ` @@ -1056,11 +1034,11 @@ List the blob IDs in the database -## `linera storage list_chain_ids` +## `linera storage list_root_keys` -List the chain IDs in the database +List the root keys of the database -**Usage:** `linera storage list_chain_ids --storage ` +**Usage:** `linera storage list_root_keys --storage ` ###### **Options:** diff --git a/examples/fungible/src/lib.rs b/examples/fungible/src/lib.rs index 7578ada5e3a0..efd7dbcd5548 100644 --- a/examples/fungible/src/lib.rs +++ b/examples/fungible/src/lib.rs @@ -75,8 +75,6 @@ pub async fn create_with_accounts( .await; for (chain, account, initial_amount) in &accounts { - chain.register_application(application_id).await; - let claim_certificate = chain .add_block(|block| { block.with_operation( diff --git a/linera-client/src/client_context.rs b/linera-client/src/client_context.rs index 78dda4b5b0b1..2b84e9363be6 100644 --- a/linera-client/src/client_context.rs +++ b/linera-client/src/client_context.rs @@ -942,49 +942,6 @@ where .expect("should execute block with Transfer operations"); } self.update_wallet_from_client(&chain_client).await?; - // Make sure all chains have registered the application now. - let mut join_set = task::JoinSet::new(); - for (chain_id, chain_client) in chain_clients.iter() { - let chain_id = *chain_id; - let chain_client = chain_client.clone(); - join_set.spawn(async move { - let mut delay_ms = 0; - let mut total_delay_ms = 0; - loop { - linera_base::time::timer::sleep(Duration::from_millis(delay_ms)).await; - chain_client.process_inbox().await?; - let chain_state = chain_client.chain_state_view().await?; - if chain_state - .execution_state - .system - .registry - .known_applications - .contains_key(&application_id) - .await? - { - return Ok::<_, Error>(()); - } - - total_delay_ms += delay_ms; - // If we've been waiting already for more than 10 seconds, give up. - if total_delay_ms > 10_000 { - break; - } - - if delay_ms == 0 { - delay_ms = 100; - } else { - delay_ms *= 2; - } - } - panic!("Could not instantiate application on chain {chain_id:?}"); - }); - } - join_set - .join_all() - .await - .into_iter() - .collect::, _>>()?; Ok(()) } diff --git a/linera-execution/src/execution_state_actor.rs b/linera-execution/src/execution_state_actor.rs index c3f3a69f0778..6eb20bd18ac9 100644 --- a/linera-execution/src/execution_state_actor.rs +++ b/linera-execution/src/execution_state_actor.rs @@ -3,8 +3,9 @@ //! Handle requests from the synchronous execution thread of user applications. +use std::collections::BTreeMap; #[cfg(with_metrics)] -use std::{collections::BTreeMap, sync::LazyLock}; +use std::sync::LazyLock; use custom_debug_derive::Debug; use futures::channel::mpsc; diff --git a/linera-execution/tests/revm.rs b/linera-execution/tests/revm.rs index 727f9d9c00ee..67803044b3a3 100644 --- a/linera-execution/tests/revm.rs +++ b/linera-execution/tests/revm.rs @@ -146,11 +146,7 @@ contract ExampleCounter { .into_view_with(ChainId::root(0), ExecutionRuntimeConfig::default()) .await; let (app_desc, contract_blob, service_blob) = create_dummy_user_application_description(1); - let app_id = view - .system - .registry - .register_application(app_desc.clone()) - .await?; + let app_id = From::from(&app_desc); let contract = EvmContractModule::Revm { module: module.clone(), @@ -210,7 +206,7 @@ contract ExampleCounter { }; for increment in &increments { - let mut txn_tracker = TransactionTracker::new(0, Some(Vec::new())); + let mut txn_tracker = TransactionTracker::new(0, 0, Some(Vec::new())); value += increment; let operation = incrementCall { input: *increment }; let bytes = operation.abi_encode();