Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Durability bump issue # ODHACK #1639

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 0 additions & 30 deletions FULL_HELP_DOCS.md
Original file line number Diff line number Diff line change
Expand Up @@ -350,16 +350,6 @@ If no keys are specified the contract itself is extended.
* `--key-xdr <KEY_XDR>` — Storage key (base64-encoded XDR)
* `--wasm <WASM>` — Path to Wasm file of contract code to extend
* `--wasm-hash <WASM_HASH>` — Path to Wasm file of contract code to extend
* `--durability <DURABILITY>` — Storage entry durability

Default value: `persistent`

Possible values:
- `persistent`:
Persistent
- `temporary`:
Temporary

* `--rpc-url <RPC_URL>` — RPC server endpoint
* `--network-passphrase <NETWORK_PASSPHRASE>` — Network passphrase to sign the transaction sent to the rpc server
* `--network <NETWORK>` — Name of network to use from config
Expand Down Expand Up @@ -772,16 +762,6 @@ Print the current value of a contract-data ledger entry
* `--key-xdr <KEY_XDR>` — Storage key (base64-encoded XDR)
* `--wasm <WASM>` — Path to Wasm file of contract code to extend
* `--wasm-hash <WASM_HASH>` — Path to Wasm file of contract code to extend
* `--durability <DURABILITY>` — Storage entry durability

Default value: `persistent`

Possible values:
- `persistent`:
Persistent
- `temporary`:
Temporary

* `--rpc-url <RPC_URL>` — RPC server endpoint
* `--network-passphrase <NETWORK_PASSPHRASE>` — Network passphrase to sign the transaction sent to the rpc server
* `--network <NETWORK>` — Name of network to use from config
Expand All @@ -807,16 +787,6 @@ If no keys are specificed the contract itself is restored.
* `--key-xdr <KEY_XDR>` — Storage key (base64-encoded XDR)
* `--wasm <WASM>` — Path to Wasm file of contract code to extend
* `--wasm-hash <WASM_HASH>` — Path to Wasm file of contract code to extend
* `--durability <DURABILITY>` — Storage entry durability

Default value: `persistent`

Possible values:
- `persistent`:
Persistent
- `temporary`:
Temporary

* `--ledgers-to-extend <LEDGERS_TO_EXTEND>` — Number of ledgers to extend the entry
* `--ttl-ledger-only` — Only print the new Time To Live ledger
* `--rpc-url <RPC_URL>` — RPC server endpoint
Expand Down
8 changes: 4 additions & 4 deletions cmd/crates/soroban-test/tests/it/integration/cookbook.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,10 @@ async fn run_command(
modified_args.push(key_xdr.to_string());
skip_next = true;
}
"<DURABILITY>" => {
modified_args.push("persistent".to_string());
skip_next = false;
}
// "<DURABILITY>" => {
// modified_args.push("persistent".to_string());
// skip_next = false;
// }
"<KEY>" => {
modified_args.push("COUNTER".to_string());
skip_next = false;
Expand Down
4 changes: 2 additions & 2 deletions cmd/crates/soroban-test/tests/it/integration/hello_world.rs
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ fn contract_data_read_failure(sandbox: &TestEnv, id: &str) {
.arg("--id")
.arg(id)
.arg("--key=COUNTER")
.arg("--durability=persistent")
// .arg("--durability=persistent")
.assert()
.failure()
.stderr(
Expand All @@ -273,7 +273,7 @@ async fn contract_data_read() {
.arg(id)
.arg("--key")
.arg(KEY)
.arg("--durability=persistent")
// .arg("--durability=persistent")
.assert()
.success()
.stdout(predicates::str::starts_with("COUNTER,1"));
Expand Down
4 changes: 2 additions & 2 deletions cmd/crates/soroban-test/tests/it/integration/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ pub async fn extend(sandbox: &TestEnv, id: &str, value: Option<&str>) {
let mut args = vec![
"--id",
id,
"--durability",
"persistent",
// "--durability",
// "persistent",
"--ledgers-to-extend",
"100001",
];
Expand Down
1 change: 0 additions & 1 deletion cmd/soroban-cli/src/commands/contract/install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,6 @@ impl NetworkRunnable for Cmd {
key_xdr: None,
wasm: Some(self.wasm.wasm.clone()),
wasm_hash: None,
durability: super::Durability::Persistent,
},
config: config.clone(),
fee: self.fee.clone(),
Expand Down
6 changes: 1 addition & 5 deletions cmd/soroban-cli/src/key.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use crate::{
commands::contract::Durability,
config::{locator, network::Network},
wasm,
};
Expand Down Expand Up @@ -59,9 +58,6 @@ pub struct Args {
conflicts_with = "wasm"
)]
pub wasm_hash: Option<String>,
/// Storage entry durability
#[arg(long, value_enum, default_value = "persistent")]
pub durability: Durability,
}

impl Args {
Expand Down Expand Up @@ -105,7 +101,7 @@ impl Args {
.map(|key| {
LedgerKey::ContractData(LedgerKeyContractData {
contract: ScAddress::Contract(xdr::Hash(contract.0)),
durability: (&self.durability).into(),
durability: xdr::ContractDataDurability::Persistent,
key,
})
})
Expand Down
Loading