fix: lower MinTrust thresholds for welati elections, fix CI fmt
Welati MinTrust changes (People Chain 1_020_008 prep): - Presidential: 600→250, Parliamentary: 300→100 - SpeakerElection: 400→200, ConstitutionalCourt: 750→275 - OfficialRole: 250→75, Endorser: 100→40 Also fix grant_noter_tiki.rs formatting for CI quick-checks.
This commit is contained in:
@@ -160,6 +160,12 @@ Note: Mnemonic stored locally, NOT in repo. Check /home/mamostehp/res/
|
||||
4. [x] People Chain runtime upgrade 1_020_006 → 1_020_007 (noter delegasyonu deploy)
|
||||
5. [x] Relay Chain: pezpallet_staking_score runtime'dan cikarildi (kod temizlendi, sonraki build'de aktif)
|
||||
6. [ ] Bot + noter workflow gelistir (staking verisi toplama ve People Chain'e gonderme)
|
||||
7. [ ] People Chain runtime upgrade 1_020_007 → 1_020_008 (MinTrust degerleri duzeltildi, deploy bekliyor)
|
||||
- Welati secim MinTrust: Serok 600→250, Parlementer 300→100, SerokiMeclise 400→200, EndameDiwane 750→275
|
||||
- OfficialRole MinTrust: 250→75
|
||||
- Endorser MinTrust: 100→40
|
||||
- Degisiklik: `pezpallet-welati/src/lib.rs`, `types.rs`, `tests.rs` (kod hazir, runtime upgrade gerekli)
|
||||
8. [ ] Relay Chain runtime upgrade: `pezpallet_staking_async_ah_client` index 67'ye ekle (AH async staking XCM loop duzeltmesi)
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -692,7 +692,7 @@ pub mod pezpallet {
|
||||
);
|
||||
|
||||
let endorser_trust = T::TrustScoreSource::trust_score_of(endorser);
|
||||
ensure!(endorser_trust >= 100u128, Error::<T>::InsufficientTrustScore);
|
||||
ensure!(endorser_trust >= 40u128, Error::<T>::InsufficientTrustScore);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1219,10 +1219,10 @@ pub mod pezpallet {
|
||||
/// Minimum Trust Score by election type
|
||||
pub fn get_required_trust_score(election_type: &ElectionType) -> u128 {
|
||||
match election_type {
|
||||
ElectionType::Presidential => 600,
|
||||
ElectionType::Parliamentary => 300,
|
||||
ElectionType::SpeakerElection => 400,
|
||||
ElectionType::ConstitutionalCourt => 750,
|
||||
ElectionType::Presidential => 250,
|
||||
ElectionType::Parliamentary => 100,
|
||||
ElectionType::SpeakerElection => 200,
|
||||
ElectionType::ConstitutionalCourt => 275,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -365,11 +365,11 @@ fn vote_on_proposal_works() {
|
||||
#[test]
|
||||
fn get_required_trust_score_works() {
|
||||
ExtBuilder::default().build().execute_with(|| {
|
||||
assert_eq!(Welati::get_required_trust_score(&ElectionType::Presidential), 600);
|
||||
assert_eq!(Welati::get_required_trust_score(&ElectionType::Presidential), 250);
|
||||
|
||||
assert_eq!(Welati::get_required_trust_score(&ElectionType::Parliamentary), 300);
|
||||
assert_eq!(Welati::get_required_trust_score(&ElectionType::Parliamentary), 100);
|
||||
|
||||
assert_eq!(Welati::get_required_trust_score(&ElectionType::ConstitutionalCourt), 750);
|
||||
assert_eq!(Welati::get_required_trust_score(&ElectionType::ConstitutionalCourt), 275);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -1334,7 +1334,7 @@ pub trait OfficialRoleInfo {
|
||||
|
||||
impl OfficialRoleInfo for OfficialRole {
|
||||
fn required_trust_score(&self) -> u128 {
|
||||
250 // Anayasada belirtilen genel şart
|
||||
75 // Anayasada belirtilen genel şart
|
||||
}
|
||||
|
||||
fn nominating_minister(&self) -> MinisterRole {
|
||||
|
||||
+3
-6
@@ -161,11 +161,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
|
||||
// Batch all 21 calls
|
||||
let batch_call = encode_batch_all(grant_calls);
|
||||
println!(
|
||||
"\nBatch call: {} bytes (0x{}...)",
|
||||
batch_call.len(),
|
||||
hex::encode(&batch_call[..8])
|
||||
);
|
||||
println!("\nBatch call: {} bytes (0x{}...)", batch_call.len(), hex::encode(&batch_call[..8]));
|
||||
|
||||
// Connect to relay chain
|
||||
let api = OnlineClient::<PezkuwiConfig>::from_insecure_url(&relay_url).await?;
|
||||
@@ -199,7 +195,8 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
println!("Submitting sudo(xcm.send(batch_all(grant_tiki × 21)))...");
|
||||
|
||||
use pezkuwi_subxt::tx::TxStatus;
|
||||
let tx_progress = api.tx().sign_and_submit_then_watch_default(&sudo_call, &sudo_keypair).await?;
|
||||
let tx_progress =
|
||||
api.tx().sign_and_submit_then_watch_default(&sudo_call, &sudo_keypair).await?;
|
||||
|
||||
println!("TX: 0x{}", hex::encode(tx_progress.extrinsic_hash().as_ref()));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user