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

contract accounting removal#2230

Merged
pepyakin merged 59 commits intomasterfrom
gui-contract-accounting-removal
Apr 30, 2019
Merged

contract accounting removal#2230
pepyakin merged 59 commits intomasterfrom
gui-contract-accounting-removal

Conversation

@gui1117
Copy link
Contributor

@gui1117 gui1117 commented Apr 8, 2019

Fix #1882

  • a contract can be in two state: tombstone or alive
  • a contract can be deleted on calls when paying rents
  • the contract is evicted if:
    • he can't withdraw its rent (rents are up to rent_allowance)
    • rent_allowance is reached
      then if it got enough free_balance to make tombstone it makes it
  • introduce ext_set_rent_allowance, ext_rent_allowance

Another PR:

  • maybe add a new unbalance associated type

TODO:

  • document pay_rent better

@gui1117 gui1117 added the A3-in_progress Pull request is in progress. No review needed at this stage. label Apr 8, 2019
@gui1117 gui1117 requested a review from pepyakin April 8, 2019 14:39
bkchr and others added 3 commits April 8, 2019 17:11
Co-Authored-By: thiolliere <gui.thiolliere@gmail.com>
Copy link
Contributor

@pepyakin pepyakin left a comment

Choose a reason for hiding this comment

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

Great start! Expect another round of comments since I didn't yet grasp the logic changes

gui1117 and others added 3 commits April 29, 2019 15:15
Co-Authored-By: pepyakin <s.pepyakin@gmail.com>
…ch/substrate into gui-contract-accounting-removal
@pepyakin pepyakin added A8-looksgood and removed A0-please_review Pull request needs code review. labels Apr 30, 2019
@pepyakin pepyakin merged commit 563e787 into master Apr 30, 2019
@pepyakin pepyakin deleted the gui-contract-accounting-removal branch April 30, 2019 07:41
MTDK1 pushed a commit to bdevux/substrate that referenced this pull request Jul 10, 2019
* first partial implementation

* update rent allowance

* fmt

Co-Authored-By: thiolliere <gui.thiolliere@gmail.com>

* remove comments

* reward surcharge claims

* remove rent allowance in param + code_hash changed

* Fix bug

* fix tests

* fmt

* impl getter setter rent allowance

* fmt

Co-Authored-By: thiolliere <gui.thiolliere@gmail.com>

* comments

* doc + be->le

* doc

* doc

* fix improve fast return

* renamings

* rename + COMPLEXITY

* COMPLEXITY

* add test

* etrinsic claim surcharge delay configurable

* comment addressed

* move and rewrite of pay_rent

* remove child trie

* fmt

* use derive

* arithmetic operation

* fix

* fix storage root + checked_mul + test

* WIP: test

* WIP

* add tests and fix

* fmt

* typo and doc suggestions

Co-Authored-By: thiolliere <gui.thiolliere@gmail.com>

* WIP

* address some comments

divide tests + some docs

* use br_table

* remove unused function

* Bump the runtime version

* insert_with

* Add some comments.

* Refactor

* Shuffle and fix comments

* More comment fixes.

* dues limited

* Add comment

* Handicap

* Docs.

* Apply suggestions from code review

Co-Authored-By: pepyakin <s.pepyakin@gmail.com>

* Coalesce block_passed in a block

* Fix build

* Paid → Ok

* match → if

* Imrpove handicap description
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.

Implementation of accounting and removal

8 participants