Skip to content
Snippets Groups Projects
Select Git revision
  • master default protected
  • 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
  • hugo-tmp-dockerfile-cache
  • release/client-800.2 protected
  • release/runtime-800 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
  • runtime-401 protected
  • v0.4.0 protected
40 results

distance-oracle

  • Clone with SSH
  • Clone with HTTPS
  • Benjamin Gallois's avatar
    Benjamin Gallois authored
    * update metadata
    
    * rename echec in failure
    
    * fix #174
    
    * replace session by pool
    
    * fix #207
    
    * update client
    
    * update distance-oracle
    
    * update documentation
    
    * add weight accounting
    
    * fix end2end tests
    
    * make tests independent of EvaluationPeriod
    
    * change distance evaluation period from Sessions to Blocks
    3669c6a6
    History
    Name Last commit Last update
    ..
    src
    Cargo.toml
    README.md
    wot.deflate

    Distance oracle

    for explanation about the Duniter web of trust, see https://duniter.org/wiki/web-of-trust/deep-dive-wot/

    Distance computation on the Duniter web of trust is an expensive operation that should not be included in the runtime for multiple reasons:

    • it could exceed the time available for a block computation
    • it takes a lot of resource from the host machine
    • the result is not critical to the operation of Ğ1

    It is then separated into an other program that the user (a duniter smith) can choose to run or not. This program publishes its result in a inherent and the network selects the median of the results given by the smith who published some.

    Structure

    This feature is organized in multiple parts:

    • /distance-oracle/ (here): binary executing the distance algorithm
    • /primitives/distance/: primitive types used both by client and runtime
    • /client/distance/: exposes the create_distance_inherent_data_provider which provides data to the runtime
    • /pallets/distance/: distance pallet exposing type, traits, storage/calls/hooks executing in the runtime

    Usage (with Docker)

    See docker-compose.yml for an example of how to run the distance oracle with Docker.

    Output:

    2023-12-09T14:45:05.942Z INFO [distance_oracle] Nothing to do: Pool does not exist
    Waiting 1800 seconds before next execution...