Skip to content
Snippets Groups Projects
Select Git revision
  • 92d0fe5e74baf7b9cc4211d8eb955e8c4c207f7e
  • master default protected
  • network/gtest-1000 protected
  • upgradable-multisig
  • runtime/gtest-1000
  • network/gdev-800 protected
  • cgeek/issue-297-cpu
  • gdev-800-tests
  • update-docker-compose-rpc-squid-names
  • fix-252
  • 1000i100-test
  • hugo/tmp-0.9.1
  • network/gdev-803 protected
  • hugo/endpoint-gossip
  • network/gdev-802 protected
  • hugo/distance-precompute
  • network/gdev-900 protected
  • tuxmain/anonymous-tx
  • debug/podman
  • hugo/195-doc
  • hugo/195-graphql-schema
  • gtest-1000-0.8.0 protected
  • gtest-1000 protected
  • gdev-900-0.10.1 protected
  • gdev-900-0.10.0 protected
  • gdev-900-0.9.2 protected
  • gdev-800-0.8.0 protected
  • gdev-900-0.9.1 protected
  • gdev-900-0.9.0 protected
  • gdev-803 protected
  • gdev-802 protected
  • runtime-801 protected
  • gdev-800 protected
  • runtime-800-bis protected
  • runtime-800 protected
  • runtime-800-backup protected
  • runtime-701 protected
  • runtime-700 protected
  • runtime-600 protected
  • runtime-500 protected
  • v0.4.1 protected
41 results

cross-build-arm.sh

Blame
    • Éloïs's avatar
      57ac5589
      Add weights benchmarks (step 1) (!73) · 57ac5589
      Éloïs authored
      * feat(weights): use our benchmarks for pallet proxy
      
      * feat(weights): use our benchmarks for pallet multisig
      
      * fix(benchmarks): some pallets benchmarking need access to system.remark
      
      * feat(weights): use our benchmarks for pallet timestamp
      
      * feat(weights): use our benchmarks for pallet scheduler
      
      * fix(weights): impl proper weights & benchmarks for pallet upgrade origin
      
      * doc(dev):weights-bench: reference machine should use an SSD with USB3
      
      * style(clippy): allow unnecessary_cast for WeighInfo implementations
      
      * doc(dev): add "how to benchmarks weights of a Call/Hook/Pallet"
      
      * feat(runtimes): use our benchmarks for pallet universal dividend
      
      * feat(pallet_ud): add weights info
      
      * feat(pallet_ud): add benchmarking
      
      * fix(weights): use our own extrinsic base weights constant
      
      * feat(weights): use our benchmarks for frame_system
      
      * feat(weights): use our benchmarks for pallet balance
      
      * fix(accounts): providers should be inc as soon as the account recv money
      
      providers should be incremented as soon as the account receive funds
      
      * fix(gdev): fix runtime benchmarks compilation
      57ac5589
      History
      Add weights benchmarks (step 1) (!73)
      Éloïs authored
      * feat(weights): use our benchmarks for pallet proxy
      
      * feat(weights): use our benchmarks for pallet multisig
      
      * fix(benchmarks): some pallets benchmarking need access to system.remark
      
      * feat(weights): use our benchmarks for pallet timestamp
      
      * feat(weights): use our benchmarks for pallet scheduler
      
      * fix(weights): impl proper weights & benchmarks for pallet upgrade origin
      
      * doc(dev):weights-bench: reference machine should use an SSD with USB3
      
      * style(clippy): allow unnecessary_cast for WeighInfo implementations
      
      * doc(dev): add "how to benchmarks weights of a Call/Hook/Pallet"
      
      * feat(runtimes): use our benchmarks for pallet universal dividend
      
      * feat(pallet_ud): add weights info
      
      * feat(pallet_ud): add benchmarking
      
      * fix(weights): use our own extrinsic base weights constant
      
      * feat(weights): use our benchmarks for frame_system
      
      * feat(weights): use our benchmarks for pallet balance
      
      * fix(accounts): providers should be inc as soon as the account recv money
      
      providers should be incremented as soon as the account receive funds
      
      * fix(gdev): fix runtime benchmarks compilation
    data_handler.ts 26.49 KiB
    import { strict as assert } from 'assert';
    import { In } from "typeorm";
    import {
      Account,
      Cert,
      CertEvent,
      ChangeOwnerKey,
      Event,
      EventType,
      Identity,
      IdentityStatus,
      MembershipEvent,
      SmithEvent,
      SmithEventType,
      Smith,
      SmithCert,
      SmithStatus,
      PopulationHistory,
      Transfer,
      TxComment,
      UdReeval,
      UniversalDividend,
      Validator,
    } from "./model";
    import { Address, BlockNumber, Ctx, Data, IdtyIndex, NewData } from "./types_custom";
    import { hexToString } from "./utils";
    import { events } from "./types";
    import { getCommentType } from "./comment";
    
    export class DataHandler {
      private data: Data;
    
      constructor() {
        this.data = {
          accounts: new Map(),
          identities: new Map(),
          smiths: new Map(),
          populationHistories: [],
          validators: new Map(),
          membershipEvents: [],
          smithEvents: [],
          changeOwnerKey: [],
          transfers: new Map(),
          certification: new Map(),
          certEvent: [],
          smithCert: new Map(),
          universalDividend: [],
          udReeval: [],
          comments: []
        };
      }
    
      async processNewData(newData: NewData, ctx: Ctx) {
    
        // Process population history by adding the value
        // of the last point in database.
        if (newData.populationHistories) {
          const lastHistory = await ctx.store.findOneOrFail(PopulationHistory, {
            where: {},
            order: { blockNumber: 'DESC' }
          });
    
          this.data.populationHistories = newData.populationHistories.map(history => (new PopulationHistory({
            activeAccountCount: history.activeAccountCount + lastHistory.activeAccountCount,
            memberCount: history.memberCount + lastHistory.memberCount,
            smithCount: history.smithCount + lastHistory.smithCount,
            blockNumber: history.blockNumber,
            id: `population-${history.blockNumber}`,
          })));
        }