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 all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 0 additions & 30 deletions FULL_HELP_DOCS.md
Original file line number Diff line number Diff line change
Expand Up @@ -354,16 +354,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
* `--rpc-header <RPC_HEADERS>` — RPC Header(s) to include in requests to the RPC provider
* `--network-passphrase <NETWORK_PASSPHRASE>` — Network passphrase to sign the transaction sent to the rpc server
Expand Down Expand Up @@ -782,16 +772,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
* `--rpc-header <RPC_HEADERS>` — RPC Header(s) to include in requests to the RPC provider
* `--network-passphrase <NETWORK_PASSPHRASE>` — Network passphrase to sign the transaction sent to the rpc server
Expand All @@ -816,16 +796,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 @@ -83,10 +83,10 @@ 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
2 changes: 1 addition & 1 deletion cmd/crates/soroban-test/tests/it/integration/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ pub async fn extend_contract(sandbox: &TestEnv, id: &str) {
}

pub async fn extend(sandbox: &TestEnv, id: &str, value: Option<&str>) {
let mut args = vec!["--id", id, "--ledgers-to-extend", "100001"];

if let Some(value) = value {
args.push("--key");
args.push(value);
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 @@ -214,7 +214,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
Expand Up @@ -3,7 +3,6 @@ use crate::xdr::{
ScVal,
};
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