Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

positive updates to reputations when good things happen #258

Merged
merged 4 commits into from
May 15, 2019
Merged

positive updates to reputations when good things happen #258

merged 4 commits into from
May 15, 2019

Conversation

montekki
Copy link
Contributor

@montekki montekki commented May 9, 2019

Fixes #251

I've assigned some constants with the intuition that bad things should matter more than symmetrical good things (10x), but probably that should change.

@montekki montekki requested a review from rphmeier May 9, 2019 15:26
network/src/lib.rs Outdated Show resolved Hide resolved
@montekki
Copy link
Contributor Author

montekki commented May 9, 2019

Also in the real Context the probably reputation values should have upper and lower bounds so we don't overflow the i32 into the opposite sign.

@@ -427,7 +428,7 @@ impl PolkadotProtocol {
) {
match self.in_flight.remove(&(req_id, who.clone())) {
Some(mut req) => {
ctx.report_peer(who, cost::EXPECTED_MESSAGE);
ctx.report_peer(who, benefit::EXPECTED_MESSAGE);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not necessarily a good response -- I think we should branch:

  • if pov_block is None, a small bump to reputation
  • if pov_block is Some and is good, a big bump to reputation
  • if pov_block is Some and is bad, a big hit to reputation.

@gavofyork gavofyork merged commit 1d97345 into paritytech:master May 15, 2019
tomusdrw pushed a commit that referenced this pull request Mar 26, 2021
* replace debug printlns with traces

* cargo fmt --all

* fixed traces

* update RUST_LOG in docker-compose

* only print hex data if error has occured

* updated OE hash
imstar15 pushed a commit to imstar15/polkadot that referenced this pull request Aug 25, 2021
* HRMP message ingestion

* Plumb hrmp_watermark to build_collation

* Plumb hrmp_watermark to ValidationResult

* Plumb hrmp outbound messages

* Implement message-broker part of HRMP

* Kill UPWARD_MESSAGES as well

Otherwise, they will get resent each block

* Add sudo versions for easier testing

* Remove the xcmp module

Not useful for the moment

* Doc for HRMP message handler

* Estimate the weight upper bound for on_finalize

* Remove a redundant type annotation

* fix spelling of a method

* Apply suggestions from code review

Co-authored-by: Bastian Köcher <[email protected]>

* Deabbreviate dmp and hrmp in the message ingestion type

* Don't use binary_search since it's broken by a following rotate

Instead use the linear search. We can afford linear search here since
due to limited scalability of HRMP we can only have at most a couple of
dozens of channels.

* Fix the watermark

Co-authored-by: Bastian Köcher <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Positive reputation changes when good things happen
3 participants