Add payment support for kv storage#9298
Conversation
jeffreyssmith2nd
left a comment
There was a problem hiding this comment.
These changes seem to be causing unit test failures
| void apply_context::update_disk_usage( account_name account, int64_t disk_delta, const storage_usage_trace& trace ) { | ||
|
|
||
| if (disk_delta > 0 && !privileged) { | ||
| EOS_ASSERT(receiver == act->account, subjective_block_production_exception, |
There was a problem hiding this comment.
This should not be a subjective failure. The similar check in update_db_usage is a subjective mitigation for before RAM_RESTRICTIONS is activated. Since DISK in new, we don't need subjective mitigations and can always apply the restriction. The actual check that you should copy is in exec_one.
There was a problem hiding this comment.
The behaviour of the check in exec_one is slightly different from the subjective check in update_db_usage. Unless we've decided that that was a mistake it would be better to change exec_one, so the behaviour of DISK matches RAM.
jeffreyssmith2nd
left a comment
There was a problem hiding this comment.
This needs an updated kv_test.wasm file
| context_free = trace.context_free; | ||
| } | ||
|
|
||
| template <typename Excpetion> |
| counter = 0; | ||
| } | ||
| if (entry.delta > 0 && entry.account != receiver) { | ||
| EOS_ASSERT(not_in_notify_context, Excpetion, |
| "${account}", | ||
| ("resource", resource) | ||
| ("account", entry.account)); | ||
| EOS_ASSERT(has_authorization(entry.account), Excpetion, |
# Conflicts: # libraries/chain/include/eosio/chain/exceptions.hpp
Change Description
Allow application developers to choose who pays for resources (feature parity with multi-index table functionality).
EPE-218
Change Type
Select ONE
Consensus Changes
API Changes
Documentation Additions