This repository has been archived by the owner on Aug 30, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 574
Powerup rename #536
Merged
+557
−244
Merged
Powerup rename #536
Changes from 3 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
7692a8a
rename rentbw to powerup
280fe9e
Add configure and usage guide for powerup
b17f0d3
add back a comment removed in error
065e865
Removing the word `rent` from comments/error messages. Fixing some mi…
0992ba3
Correctly provide weight over the asset received. This will be more u…
c357f9b
Add an Overview and Processing Expired Orders section.
ce5588b
Remove some rental language.
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
contracts/eosio.system/include/eosio.system/powerup.results.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#pragma once | ||
|
||
#include <eosio/asset.hpp> | ||
#include <eosio/eosio.hpp> | ||
#include <eosio/name.hpp> | ||
|
||
using eosio::action_wrapper; | ||
using eosio::asset; | ||
using eosio::name; | ||
|
||
/** | ||
* The action `powerresult` of `power.results` is a no-op. | ||
* It is added as an inline convenience action to `power` rental. | ||
* This inline convenience action does not have any effect, however, | ||
* its data includes the result of the parent action and appears in its trace. | ||
*/ | ||
class [[eosio::contract("powup.results")]] powup_results : eosio::contract { | ||
public: | ||
|
||
using eosio::contract::contract; | ||
|
||
/** | ||
* powupresult action. | ||
* | ||
* @param fee - rental fee amount | ||
* @param powup_net - amount of powup NET tokens | ||
* @param powup_cpu - amount of powup CPU tokens | ||
*/ | ||
[[eosio::action]] | ||
void powupresult( const asset& fee, const asset& powup_net, const asset& powup_cpu ); | ||
|
||
using powupresult_action = action_wrapper<"powupresult"_n, &powup_results::powupresult>; | ||
}; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renaming tables will break testnets which deployed rentbw
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new
powup.state
table will be inconsistent with the other resource-related tables and the weights already assigned to existing accounts which have outstanding rents.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there an option to deploy a modified
rentbw-1.9
contract that disables renting and wait for orders to all expire and then deploy the changed contract? It is not ideal but I believe that would work to migrate.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Never mind that would effectively stop all traffic on the network for 30 days.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tests could run a patched version which renames the tables back, but that would create a noticeable difference to tooling which runs on both test nets and non-test nets.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A modified
rentbw-1.9
could disable new rentals and allowrentbwexec
to expire existing rentals prematurely. An account with unlimited cpu & net would have to manage this. All normal accounts would be unusable because ofeosio.reserv
untilpowerup-1.9
is installed and activated.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, the modified version needs to clear out the
eosio.reserv
allocation orpowerup-1.9
will malfunction.