AntelopeIO / leap

C++ implementation of the Antelope protocol
Other
113 stars 69 forks source link

Draft: Slim accounts #2328

Open quocle108 opened 3 months ago

quocle108 commented 3 months ago

Change Description

This MR introduces a significant optimization in RAM usage by implementing a new account structure. The changes are designed to enhance efficiency and reduce the memory. The key modifications include:

API Changes

Documentation Additions

Note

There is an unresolved issues:

cc32d9 commented 1 week ago

as discussed in the chat:

  1. namespace reservation must not be hardcoded. It needs a configurable way, if needed at all:

     // system account only can be created by newaccount
      EOS_ASSERT( name_str.find( "eosio." ) != 0, action_validate_exception,
                     "only newaccount action can create account with name start with 'eosio.'" );
  2. Odd placement of create_slim_account() inside libraries/chain/webassembly/privileged.cpp. It belongs where newaccount() sits.

  3. State history plugin needs to be able to read the data created by previous Leap versions.