-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Relay Mining] Implement Supplier driven RelayMiningDifficulty #818
Comments
@red-0ne Will review this in detail by EOD. Please hold off from starting work on it just yet |
Copying this from a message on discord last week: I just put up [1] for review as part of the ticket I'm handing off in [2] (related to proportional rewards), which is a pre-req for [3] that @Red0ne put together earlier this week. Note that I left a lot of TODO(arash) in the PR as a guideline for where/what needs to be implemented. This is ULTRA critical for tokenomics to work properly. |
@adshmh I wanted to call out that we need to finish #771 before this can be started.
|
min/max mined relays per claim are described here [1] TL;DR; MinMinedRelaysPerClaim: Since a MaxMindedRelaysPerClaim: On the other hand prevents the Example The supplier is not allowed to to submit the following claims:
But is allowed to submit:
Min and max are TBD though. |
Min/Max mined relays per claim are the equivalent of the |
@red-0ne As discussed offline, do you think this is something we can do POST Mainnet? |
…on difficulty (#771) ## Summary No real business logic changes, but preparation + tests + helpesr + TODOs for #781. ## Issue - Preparation for #781 - Pre-requisite for #818 --------- Co-authored-by: Bryan White <[email protected]> Co-authored-by: Redouane Lakrache <[email protected]>
Objective
Prevent malicious
Gateway
s from abusing on-chainRelayMiningDifficulty
to get freeRelay
s by sending low enough volumes toSupplier
s that result in empty trees.Origin Document
Potential Exploit in On-Chain Relay Mining Difficulty: Unclaimable Relays
The current on-chain
RelayMiningDifficulty
mechanism may be vulnerable to abuse, makingSuppliers
perform unclaimable work.Malicious
Gateways
could exploit this by sending relays with volumes low enough to avoid triggering a relay mining process. By duplicating this process across multipleApplications
, they could scale the exploit, leading to free work performed bySuppliers
.For more details, please refer to RelayMiningDifficulty-and-low-volume Notion document.
Goals
Deliverables
RelayMiningDifficuly
available in the correspondingClaim
.RelayMiningDifficul
available in theClaim
to calculate the estimated volume; see [Tokenomics] Preparation for proportional relay mining rewards based on difficulty #771ServiceRelayMiningDifficulty
toSuggestedRelayMiningDifficulty
based on overall on-chain usageImeplementation Direction
Implement Supplier-Driven Relay Mining Difficulty
Claim
should specify the mining difficulty used to construct theSparseMerkleSumTree
, which will be included in theMsgCreateClaim
message.Claim
and used to verify whether theRelay
satisfies the expected difficulty.RelayMiningDifficulty
should be updated to "suggested_difficulty"Additionally, this difficulty will be utilized to estimate the processing volume for the corresponding session. This is done in #771Non-goals / Non-deliverables
General deliverables
Creator: @adshmh
Co-Owners: @bryanchriswhite, @red-0ne
The text was updated successfully, but these errors were encountered: