Skip to content
Snippets Groups Projects
  1. Feb 28, 2025
    • Alexander Theißen's avatar
      pallet_revive: Change address derivation to use hashing (#7662) · 4087e2d9
      Alexander Theißen authored
      
      Fixes https://github.com/paritytech/polkadot-sdk/issues/6723
      
      ## Motivation
      
      Internal auditors recommended to not truncate Polkadot Addresses when
      deriving Ethereum addresses from it. Reasoning is that they are raw
      public keys where truncating could lead to collisions when weaknesses in
      those curves are discovered in the future. Additionally, some pallets
      generate account addresses in a way where only the suffix we were
      truncating contains any entropy. The changes in this PR act as a safe
      guard against those two points.
      
      ## Changes made
      
      We change the `to_address` function to first hash the AccountId32 and
      then use trailing 20 bytes as `AccountId20`. If the `AccountId32` ends
      with 12x 0xEE we keep our current behaviour of just truncating those
      trailing bytes.
      
      ## Security Discussion
      
      This will allow us to still recover the original `AccountId20` because
      those are constructed by just adding those 12 bytes. Please note that
      generating an ed25519 key pair where the trailing 12 bytes are 0xEE is
      theoretically possible as 96bits is not a huge search space. However,
      this cannot be used as an attack vector. It will merely allow this
      address to interact with `pallet_revive` without registering as the
      fallback account is the same as the actual address. The ultimate vanity
      address. In practice, this is not relevant since the 0xEE addresses are
      not valid public keys for sr25519 which is used almost everywhere.
      
      tl:dr: We keep truncating in case of an Ethereum address derived account
      id. This is safe as those are already derived via keccak. In every other
      case where we have to assume that the account id might be a public key.
      Therefore we first hash and then take the trailing bytes.
      
      ## Do we need a Migration for Westend
      
      No. We changed the name of the mapping. This means the runtime will not
      try to read the old data. Ethereum keys are unaffected by this change.
      We just advise people to re-register their AccountId32 in case they need
      to use it as it is a very small circle of users (just 3 addresses
      registered). This will not cause disturbance on Westend.
      
      ---------
      
      Co-authored-by: default avatarcmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
    • Egor_P's avatar
      [Release|CI/CD] Update pgpgkms to the latest version (#7745) · 95be69ce
      Egor_P authored
      This PR updates `pgpgkms`, tool to sign releases, to the latest version
      to fix the issue wiht the `debian` publishing form the pipeline.
      Address: https://github.com/paritytech/release-engineering/issues/248
    • Serban Iorga's avatar
      Derive `DecodeWithMemTracking` for `Block` (#7655) · c11b1f85
      Serban Iorga authored
      Related to https://github.com/paritytech/polkadot-sdk/issues/7360
      
      This PR adds `DecodeWithMemTracking` as a trait bound for `Header`,
      `Block` and `TransactionExtension` and
      derives it for all the types that implement these traits in
      `polkadot-sdk`.
  2. Feb 27, 2025
  3. Feb 26, 2025
  4. Feb 25, 2025
  5. Feb 24, 2025
  6. Feb 23, 2025
    • Davide Galassi's avatar
      Bandersnatch hot fix (#7670) · 21f6f070
      Davide Galassi authored
      
      Essentially, this locks `bandersnatch_vrfs` to a specific branch of a
      repository I control. This is a temporary workaround to avoid issues
      like https://github.com/paritytech/polkadot-sdk/issues/7653 until
      https://github.com/paritytech/polkadot-sdk/pull/7669 is ready.
      
      Closes: https://github.com/paritytech/polkadot-sdk/issues/7653 
      
      @drskalman
      
      ---------
      
      Co-authored-by: default avatarOliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
  7. Feb 22, 2025
    • Al's avatar
      Changed Rotko Networks bootnodes addresses (#7432) · f385a3ed
      Al authored
      # Description
      
      Creating this PR to changed Rotko Networks bootnode addresses to the new
      structure.
      
      Rotko bootnode addresses tested with this results:
      
      ```
      {
          "asset-hub-kusama": {
            "bootnode": "/dns/asset-hub-kusama.boot.rotko.net/tcp/30435/wss/p2p/12D3KooWJUFnjR2PNbsJhudwPVaWCoZy1acPGKjM2cSuGj345BBu",
            "discovered_peers": 3,
            "error_details": null,
            "id": "rotko",
            "network": "asset-hub-kusama",
            "status": "success",
            "test_duration_ms": 19394,
            "valid": true
          },
          "asset-hub-polkadot": {
            "bootnode": "/dns/asset-hub-polkadot.boot.rotko.net/tcp/30435/wss/p2p/12D3KooWKkzLjYF6M5eEs7nYiqEtRqY8SGVouoCwo3nCWsRnThDW",
            "discovered_peers": 5,
            "error_details": null,
            "id": "rotko",
            "network": "asset-hub-polkadot",
            "status": "success",
            "test_duration_ms": 5024,
            "valid": true
          },
          "asset-hub-westend": {
            "bootnode": "/dns/asset-hub-westend.boot.rotko.net/tcp/30435/wss/p2p/12D3KooWE4UDXqgtTcMCyUQ8S4uvaT8VMzzTBA6NWmKuYwTacWuN",
            "discovered_peers": 3,
            "error_details": null,
            "id": "rotko",
            "network": "asset-hub-westend",
            "status": "success",
            "test_duration_ms": 5023,
            "valid": true
          },
          "bridge-hub-kusama": {
            "bootnode": "/dns/bridge-hub-kusama.boot.rotko.net/tcp/30435/wss/p2p/12D3KooWAmBp54mUEYtvsk2kxNEsDbAvdUMcaghxKXgUQxmPEQ66",
            "discovered_peers": 4,
            "error_details": null,
            "id": "rotko",
            "network": "bridge-hub-kusama",
            "status": "success",
            "test_duration_ms": 6049,
            "valid": true
          },
          "bridge-hub-polkadot": {
            "bootnode": "/dns/bridge-hub-polkadot.boot.rotko.net/tcp/30435/wss/p2p/12D3KooWMxZY7tDc2Rh454VaJJ7RexKAXVS6xSBEvTnXSGCnuGDw",
            "discovered_peers": 2,
            "error_details": null,
            "id": "rotko",
            "network": "bridge-hub-polkadot",
            "status": "success",
            "test_duration_ms": 9112,
            "valid": true
          },
          "bridge-hub-westend": {
            "bootnode": "/dns/bridge-hub-westend.boot.rotko.net/tcp/30435/wss/p2p/12D3KooWJyeRHpxZZbfBCNEgeUFzmRC5AMSAs2tJhjJS1k5hULkD",
            "discovered_peers": 2,
            "error_details": null,
            "id": "rotko",
            "network": "bridge-hub-westend",
            "status": "success",
            "test_duration_ms": 9106,
            "valid": true
          },
          "collectives-polkadot": {
            "bootnode": "/dns/collectives-polkadot.boot.rotko.net/tcp/30435/wss/p2p/12D3KooWKrm3XmuGzJH17Wcn4HRDGsEjLZGDgN77q3ZhwnnQP7y1",
            "discovered_peers": 4,
            "error_details": null,
            "id": "rotko",
            "network": "collectives-polkadot",
            "status": "success",
            "test_duration_ms": 6044,
            "valid": true
          },
          "collectives-westend": {
            "bootnode": "/dns/collectives-westend.boot.rotko.net/tcp/30435/wss/p2p/12D3KooWPG85zhuSRoyptjLkFD4iJFistjiBmc15JgQ96B4fdXYr",
            "discovered_peers": 2,
            "error_details": null,
            "id": "rotko",
            "network": "collectives-westend",
            "status": "success",
            "test_duration_ms": 6044,
            "valid": true
          },
          "coretime-kusama": {
            "bootnode": "/dns/coretime-kusama.boot.rotko.net/tcp/30435/wss/p2p/12D3KooWCyPSkk5cq2eEdw1qHizfa6UT4QggSarCEtcvNXpnod8B",
            "discovered_peers": 3,
            "error_details": null,
            "id": "rotko",
            "network": "coretime-kusama",
            "status": "success",
            "test_duration_ms": 6036,
            "valid": true
          },
          "coretime-polkadot": {
            "bootnode": "/dns/coretime-polkadot.boot.rotko.net/tcp/30435/wss/p2p/12D3KooWPk5pR5QxWGVJ1YVWnXd4rkVTZ194iay58rAfcSHDpky3",
            "discovered_peers": 4,
            "error_details": null,
            "id": "rotko",
            "network": "coretime-polkadot",
            "status": "success",
            "test_duration_ms": 6045,
            "valid": true
          },
          "coretime-westend": {
            "bootnode": "/dns/coretime-westend.boot.rotko.net/tcp/30435/wss/p2p/12D3KooWFmGg7EGzxGDawuJ9EfyEznCrZfMJgGa4eHpMWjcJmg85",
            "discovered_peers": 2,
            "error_details": null,
            "id": "rotko",
            "network": "coretime-westend",
            "status": "success",
            "test_duration_ms": 6050,
            "valid": true
          },
          "kusama": {
            "bootnode": "/dns/kusama.boot.rotko.net/tcp/30335/wss/p2p/12D3KooWAa5THTw8HPfnhEei23HdL8P9McBXdozG2oTtMMksjZkK",
            "discovered_peers": 9,
            "error_details": null,
            "id": "rotko",
            "network": "kusama",
            "status": "success",
            "test_duration_ms": 5024,
            "valid": true
          },
          "paseo": {
            "bootnode": "/dns/paseo.boot.rotko.net/tcp/30335/wss/p2p/12D3KooWRH8eBMhw8c7bucy6pJfy94q4dKpLkF3pmeGohHmemdRu",
            "discovered_peers": 2,
            "error_details": null,
            "id": "rotko",
            "network": "paseo",
            "status": "success",
            "test_duration_ms": 12939,
            "valid": true
          },
          "people-kusama": {
            "bootnode": "/dns/people-kusama.boot.rotko.net/tcp/30435/wss/p2p/12D3KooWSKQwgoydfbN6mNN2aNwdqfkR2ExAnTRs8mmdrPQTtDLo",
            "discovered_peers": 5,
            "error_details": null,
            "id": "rotko",
            "network": "people-kusama",
            "status": "success",
            "test_duration_ms": 6053,
            "valid": true
          },
          "people-polkadot": {
            "bootnode": "/dns/people-polkadot.boot.rotko.net/tcp/30435/wss/p2p/12D3KooWLg9NPeDFoL54A7WfuHSM3YNxPBGVRAd9ZY6rmVfdT6GJ",
            "discovered_peers": 3,
            "error_details": null,
            "id": "rotko",
            "network": "people-polkadot",
            "status": "success",
            "test_duration_ms": 12195,
            "valid": true
          },
          "people-westend": {
            "bootnode": "/dns/people-westend.boot.rotko.net/tcp/30435/wss/p2p/12D3KooWHwUXBUo2WRMUBwPLC2ttVbnEk1KvDyESYAeKcNoCn7WS",
            "discovered_peers": 2,
            "error_details": null,
            "id": "rotko",
            "network": "people-westend",
            "status": "success",
            "test_duration_ms": 7059,
            "valid": true
          },
          "polkadot": {
            "bootnode": "/dns/polkadot.boot.rotko.net/tcp/30335/wss/p2p/12D3KooWPyEvPEXghnMC67Gff6PuZiSvfx3fmziKiPZcGStZ5xff",
            "discovered_peers": 6,
            "error_details": null,
            "id": "rotko",
            "network": "polkadot",
            "status": "success",
            "test_duration_ms": 11147,
            "valid": true
          },
          "westend": {
            "bootnode": "/dns/westend.boot.rotko.net/tcp/30335/wss/p2p/12D3KooWLK8Zj1uZ46phU3vQwiDVda8tB76S8J26rXZQLHpwWkDJ",
            "discovered_peers": 2,
            "error_details": null,
            "id": "rotko",
            "network": "westend",
            "status": "success",
            "test_duration_ms": 5021,
            "valid": true
          }
      }
      ```
  8. Feb 21, 2025
  9. Feb 20, 2025
    • Utkarsh Bhardwaj's avatar
      [AHM] Poke deposits: Indices pallet (#7587) · b9b73eb2
      Utkarsh Bhardwaj authored
      
      # Description
      
      * This PR adds a new extrinsic `reconsider` to `pallet-indices`. This
      extrinsic will be used to re-adjust the deposits made in the pallet.
      * Part of #5591 
      
      ## Review Notes
      
      * Added a new extrinsic `reconsider` in `pallet-indices`.
      * Added a new event `DepositReconsidered` to be emitted upon a
      successful call of the extrinsic.
      * Although the immediate use of the extrinsic will be to give back some
      of the deposit after the AH-migration, the extrinsic is written such
      that it can work if the deposit decreases or increases (both).
      * The call to the extrinsic would be `free` if an actual adjustment is
      made to the deposit and `paid` otherwise.
      * Added tests to test all scenarios.
      * Added a benchmark to test the "worst case" (maximum compute) flow of
      the extrinsic which is when the deposit amount is updated to a new
      value.
      
      ## TO-DOs
      
      * [x] Run CI cmd bot to benchmark
      
      ---------
      
      Co-authored-by: default avatarcmd[bot] <41898282+github-actions[bot]@users.noreply.github...>
    • Alexandru Vasile's avatar
      net/litep2p: Bring the latest compatibility fixes via v0.9.1 (#7640) · 42e9de7f
      Alexandru Vasile authored
      This PR updates litep2p to version 0.9.1. The yamux config is entirely
      removed to mirror the libp2p yamux upstream version.
      While at it, I had to bump indexmap and URL as well. 
      
      
      ## [0.9.1] - 2025-01-19
      
      This release enhances compatibility between litep2p and libp2p by using
      the latest Yamux upstream version. Additionally, it includes various
      improvements and fixes to boost the stability and performance of the
      WebSocket stream and the multistream-select protocol.
      
      ### Changed
      
      - yamux: Switch to upstream implementation while keeping the controller
      API ([#320](https://github.com/paritytech/litep2p/pull/320))
      - req-resp: Replace SubstreamSet with FuturesStream
      ([#321](https://github.com/paritytech/litep2p/pull/321))
      - cargo: Bring up to date multiple dependencies
      ([#324](https://github.com/paritytech/litep2p/pull/324))
      - build(deps): bump hickory-proto from 0.24.1 to 0.24.3
      ([#323](https://github.com/paritytech/litep2p/pull/323))
      - build(...