dhiway / cord

CORD - Enterprise Blockchain Framework
https://cord.network
GNU General Public License v3.0
161 stars 112 forks source link

Benchmarking Fails with error: not all trait items implemented, missing: `plan_config_change`, `report_equivocation` #448

Closed vatsa287 closed 6 months ago

vatsa287 commented 6 months ago

Ran benchmarking for 8GB #446 and 16GB #447 with scripts ./scripts/run_benches_for_pallets.sh & ./scripts/runt_benches_for_runtime.sh, but it fails to pass CI.

Due to missing trait implementation in pallet_babe.

Error O/P below:

error[E0407]: method `check_equivocation_proof` is not a member of trait `pallet_babe::WeightInfo`
    --> /home/runner/work/cord/cord/runtime/src/weights/pallet_babe.rs:53:2
     |
  53 | /     fn check_equivocation_proof(_x: u32, ) -> Weight {
  54 | |         // Proof Size summary in bytes:
  55 | |         //  Measured:  `0`
  56 | |         //  Estimated: `0`
  ...  |
  59 | |             .saturating_add(Weight::from_parts(0, 0))
  60 | |     }
     | |_____^ not a member of trait `pallet_babe::WeightInfo`

  error[E0046]: not all trait items implemented, missing: `plan_config_change`, `report_equivocation`
    --> /home/runner/work/cord/cord/runtime/src/weights/pallet_babe.rs:51:1
     |
  51 | impl<T: frame_system::Config> pallet_babe::WeightInfo for WeightInfo<T> {
     | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `plan_config_change`, `report_equivocation` in implementation
     |
     = help: implement the missing item: `fn plan_config_change() -> Weight { todo!() }`
     = help: implement the missing item: `fn report_equivocation(_: u32, _: u32) -> Weight { todo!() }`

  Some errors have detailed explanations: E0046, E0407.

@smohan-dw @amarts ^^

vatsa287 commented 6 months ago

Resolved by implementation change according to polkadot-idk v1.10.0 default_weights.