Skip to content

Account_history plugin: notify all related accounts after a new account is created #265

Description

@abitmore

It's ideal to notify the new account, the registrar, the referrer and the ones in the owner authorities and the active authorities. Now only the new account and the registrar get notified.

Related code is here:

      if( op.op.which() == operation::tag< account_create_operation >::value )
         impacted.insert( oho.result.get<object_id_type>() );
      else
         graphene::app::operation_get_impacted_accounts( op.op, impacted );

It should be:

      if( op.op.which() == operation::tag< account_create_operation >::value )
         impacted.insert( oho.result.get<object_id_type>() );
      graphene::app::operation_get_impacted_accounts( op.op, impacted );

However, if we simply fix it this way, after a replay, there will be more account_transaction_history_object objects inserted into the object database, so object IDs of individual records will be changed, which will cause trouble for 3rd applications that rely on the consistence of the IDs.

Please discuss.

Update: This impacts history_api::get_relative_account_history API which relies on account_transaction_history_object::sequence and account_statistics_object::total_ops.

Update: PR #406 is trying to add an option to the plugin that provides the missed data when enabled, but disabled by default.

Update: fixed by PR #2480 - after the hard fork time (HARDFORK_CORE_265_TIME), new account creation operations will notify all impacted accounts (note: voting_account is still not in the impacted accounts list).

Metadata

Metadata

Assignees

Labels

6 PluginImpact flag identifying at least one plugin6 ProtocolImpact flag identifying the blockchain logic, consensus, validation, etc.featurehardforkplugin

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions