Skip to content

Commit

Permalink
0.7.0-release (#226)
Browse files Browse the repository at this point in the history
* style: for release

* style: 0.7.0 testnet json

* style: update testnet spec json file
  • Loading branch information
ytqaljn committed Aug 31, 2023
1 parent 5bd2dc1 commit 6d240f3
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 19 deletions.
4 changes: 0 additions & 4 deletions c-pallets/file-bank/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -747,8 +747,6 @@ pub mod pallet {

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

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

Expand Down Expand Up @@ -822,8 +820,6 @@ pub mod pallet {

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

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

Expand Down
6 changes: 1 addition & 5 deletions c-pallets/sminer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -328,11 +328,7 @@ pub mod pallet {
};

let encoding = space_proof_info.encode();
// FOR TESTING
log::info!("original text: {:?}", encoding);
let original_text = sp_io::hashing::sha2_256(&encoding);
// FOR TESTING
log::info!("original text: {:?}", original_text);
let tee_puk = T::TeeWorkerHandler::get_tee_publickey()?;
ensure!(verify_rsa(&tee_puk, &original_text, &tee_sig), Error::<T>::VerifyTeeSigFailed);

Expand Down Expand Up @@ -736,7 +732,7 @@ pub mod pallet {
n: u64,
d: u64,
) -> DispatchResult {
let _ = ensure_signed(origin)?;
let _ = ensure_root(origin)?;

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

Expand Down
7 changes: 4 additions & 3 deletions c-pallets/tee-worker/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -224,19 +224,20 @@ pub mod pallet {
pub fn force_register(
origin: OriginFor<T>,
stash_account: AccountOf<T>,
controller_account: AccountOf<T>,
node_key: NodePublicKey,
peer_id: PeerId,
) -> DispatchResult {
let sender = ensure_signed(origin)?;
let _ = ensure_root(origin)?;

let tee_worker_info = TeeWorkerInfo::<T> {
controller_account: sender.clone(),
controller_account: controller_account.clone(),
peer_id: peer_id.clone(),
node_key,
stash_account: stash_account,
};

TeeWorkerMap::<T>::insert(&sender, tee_worker_info);
TeeWorkerMap::<T>::insert(&controller_account, tee_worker_info);

Ok(())
}
Expand Down
9 changes: 5 additions & 4 deletions node/ccg/cess-testnet-spec-raw.json

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion primitives/common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ pub type TeeRsaSignature = [u8; 256];
pub const M_BYTE: u128 = 1_048_576;
pub const G_BYTE: u128 = 1_048_576 * 1024;
pub const T_BYTE: u128 = 1_048_576 * 1024 * 1024;
// FOR TESTING
pub const IDLE_SEG_SIZE: u128 = M_BYTE * 64;
pub const SEGMENT_SIZE: u128 = M_BYTE * 16;
pub const FRAGMENT_SIZE: u128 = M_BYTE * 8;
Expand Down
4 changes: 2 additions & 2 deletions runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
// `spec_version`, and `authoring_version` are the same between Wasm and native.
// This value is set to 100 to notify Polkadot-JS App (https://polkadot.js.org/apps) to use
// the compatible custom types.
spec_version: 106,
spec_version: 100,
impl_version: 1,
apis: RUNTIME_API_VERSIONS,
transaction_version: 1,
Expand Down Expand Up @@ -643,7 +643,7 @@ impl pallet_membership::Config<pallet_membership::Instance1> for Runtime {
parameter_types! {
pub const ProposalBond: Permill = Permill::from_percent(5);
pub const ProposalBondMinimum: Balance = 1 * DOLLARS;
// For TEST
// For TESTING
pub const SpendPeriod: BlockNumber = 1 * MINUTES;
pub const Burn: Permill = Permill::from_percent(50);
pub const TipCountdown: BlockNumber = 1 * DAYS;
Expand Down

0 comments on commit 6d240f3

Please sign in to comment.