Skip to content

Commit 6d240f3

Browse files
authored
0.7.0-release (#226)
* style: for release * style: 0.7.0 testnet json * style: update testnet spec json file
1 parent 5bd2dc1 commit 6d240f3

File tree

6 files changed

+12
-19
lines changed

6 files changed

+12
-19
lines changed

c-pallets/file-bank/src/lib.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -747,8 +747,6 @@ pub mod pallet {
747747

748748
let original = idle_sig_info.encode();
749749
let original = sp_io::hashing::sha2_256(&original);
750-
// FOR TEST
751-
// log::info!("sha2_256 original: {:?}", original);
752750

753751
let tee_puk = T::TeeWorkerHandler::get_tee_publickey()?;
754752

@@ -822,8 +820,6 @@ pub mod pallet {
822820

823821
let original = idle_sig_info.encode();
824822
let original = sp_io::hashing::sha2_256(&original);
825-
// FOR TEST
826-
log::info!("sha2_256 original: {:?}", original);
827823

828824
let tee_puk = T::TeeWorkerHandler::get_tee_publickey()?;
829825

c-pallets/sminer/src/lib.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -328,11 +328,7 @@ pub mod pallet {
328328
};
329329

330330
let encoding = space_proof_info.encode();
331-
// FOR TESTING
332-
log::info!("original text: {:?}", encoding);
333331
let original_text = sp_io::hashing::sha2_256(&encoding);
334-
// FOR TESTING
335-
log::info!("original text: {:?}", original_text);
336332
let tee_puk = T::TeeWorkerHandler::get_tee_publickey()?;
337333
ensure!(verify_rsa(&tee_puk, &original_text, &tee_sig), Error::<T>::VerifyTeeSigFailed);
338334

@@ -736,7 +732,7 @@ pub mod pallet {
736732
n: u64,
737733
d: u64,
738734
) -> DispatchResult {
739-
let _ = ensure_signed(origin)?;
735+
let _ = ensure_root(origin)?;
740736

741737
Expenders::<T>::put((k, n, d));
742738

c-pallets/tee-worker/src/lib.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -224,19 +224,20 @@ pub mod pallet {
224224
pub fn force_register(
225225
origin: OriginFor<T>,
226226
stash_account: AccountOf<T>,
227+
controller_account: AccountOf<T>,
227228
node_key: NodePublicKey,
228229
peer_id: PeerId,
229230
) -> DispatchResult {
230-
let sender = ensure_signed(origin)?;
231+
let _ = ensure_root(origin)?;
231232

232233
let tee_worker_info = TeeWorkerInfo::<T> {
233-
controller_account: sender.clone(),
234+
controller_account: controller_account.clone(),
234235
peer_id: peer_id.clone(),
235236
node_key,
236237
stash_account: stash_account,
237238
};
238239

239-
TeeWorkerMap::<T>::insert(&sender, tee_worker_info);
240+
TeeWorkerMap::<T>::insert(&controller_account, tee_worker_info);
240241

241242
Ok(())
242243
}

node/ccg/cess-testnet-spec-raw.json

Lines changed: 5 additions & 4 deletions
Large diffs are not rendered by default.

primitives/common/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@ pub type TeeRsaSignature = [u8; 256];
112112
pub const M_BYTE: u128 = 1_048_576;
113113
pub const G_BYTE: u128 = 1_048_576 * 1024;
114114
pub const T_BYTE: u128 = 1_048_576 * 1024 * 1024;
115-
// FOR TESTING
116115
pub const IDLE_SEG_SIZE: u128 = M_BYTE * 64;
117116
pub const SEGMENT_SIZE: u128 = M_BYTE * 16;
118117
pub const FRAGMENT_SIZE: u128 = M_BYTE * 8;

runtime/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
172172
// `spec_version`, and `authoring_version` are the same between Wasm and native.
173173
// This value is set to 100 to notify Polkadot-JS App (https://polkadot.js.org/apps) to use
174174
// the compatible custom types.
175-
spec_version: 106,
175+
spec_version: 100,
176176
impl_version: 1,
177177
apis: RUNTIME_API_VERSIONS,
178178
transaction_version: 1,
@@ -643,7 +643,7 @@ impl pallet_membership::Config<pallet_membership::Instance1> for Runtime {
643643
parameter_types! {
644644
pub const ProposalBond: Permill = Permill::from_percent(5);
645645
pub const ProposalBondMinimum: Balance = 1 * DOLLARS;
646-
// For TEST
646+
// For TESTING
647647
pub const SpendPeriod: BlockNumber = 1 * MINUTES;
648648
pub const Burn: Permill = Permill::from_percent(50);
649649
pub const TipCountdown: BlockNumber = 1 * DAYS;

0 commit comments

Comments
 (0)