Skip to content

Commit

Permalink
Rename a env var
Browse files Browse the repository at this point in the history
  • Loading branch information
kvinwang committed May 16, 2023
1 parent 809f52c commit c5f3a10
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
4 changes: 2 additions & 2 deletions crates/phala-trie-storage/src/kvdb/database.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,9 @@ pub(crate) fn with_cache_dir<T>(cache_dir: &str, f: impl FnOnce() -> T) -> T {

pub(crate) fn create_db() -> (TransactionDB<MultiThreaded>, usize) {
let test_path = test_cached_path::with(|path| path.clone());
// The PRUNTIME_TRIE_CACHE_PATH would be hardcoded in the manifest when running in gramine.
// The PHACTORY_TRIE_CACHE_PATH would be hardcoded in the manifest when running in gramine.
let cache_path = &test_path
.or_else(|| std::env::var("PRUNTIME_TRIE_CACHE_PATH").ok())
.or_else(|| std::env::var("PHACTORY_TRIE_CACHE_PATH").ok())
.unwrap_or_else(|| "data/protected_files/caches".to_string());
static NEXT_SN: AtomicUsize = AtomicUsize::new(0);
let sn = NEXT_SN.fetch_add(1, Ordering::SeqCst);
Expand Down
6 changes: 0 additions & 6 deletions crates/phala-trie-storage/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,6 @@ where
TrieBackendBuilder::new(DatabaseAdapter::Rocks(RocksHashDB::load(mdb)), root).build()
}

#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
enum TrieState<V0, V1> {
V0(V0),
V1(V1),
}

#[cfg(feature = "serde")]
pub fn serialize_trie_backend<H: Hasher, S>(
trie: &KvdbBackend<H>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ serving the async tasks.
#}
ROCKET_WORKERS = "8"
PINK_RUNTIME_PATH = "{{ pink_runtime_mount_dir }}"
PRUNTIME_TRIE_CACHE_PATH = "{{ trie_cache_dir }}"
PHACTORY_TRIE_CACHE_PATH = "{{ trie_cache_dir }}"
{#
When enable, the pruntime will only logs with targets in the hardcoded whitelist.
So, log from thirdparty crates will be ignored to avoid unexpected information leaks.
Expand Down

0 comments on commit c5f3a10

Please sign in to comment.