-
Notifications
You must be signed in to change notification settings - Fork 649
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Account_history plugin: notify all related accounts after a new account is created #265
Comments
i was watching this issue since a few days and i see your point, however i don't have an actual solution by now to the problem. i want to add @elmato here he maybe haves an idea. |
@abit It can cause problems if the 3rd party stores the ids in database and
use them as identifier for the operation itself. (use the 1.11.X id to
identify each operation, instead of (block,trx_in_block,op_in_trx) tuple)
The only one i can think of is cryptofresh.
Maybe we can ask them?
The code for this to work is already in impacted.cpp.
...
void operator()( const account_create_operation& op )
{
_impacted.insert( op.registrar );
_impacted.insert( op.referrer );
add_authority_accounts( _impacted, op.owner );
add_authority_accounts( _impacted, op.active );
}
...
…On Fri, May 5, 2017 at 7:42 PM, oxarbitrage ***@***.***> wrote:
i was watching this issue since a few days and i see your point, however i
don't have an actual solution by now to the problem. i want to add @elmato
<https://github.com/elmato> here he maybe haves an idea.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#265 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAOUohcAC4zdtoNKC01IHK-52zREubv6ks5r26XCgaJpZM4NEMWr>
.
|
Now that i'm looking at the code: The id of the account_transaction_history_object is never returned (2.9.X), instead we always return the operation_history_object id (1.11.X). |
Afaik bittrex is storing object ID's (1.11.x) for withdrawals (edit: and deposits). It could be OK if the patch doesn't affect this ID. |
It's possible that |
Just to make it clear, because my previous comment was misleading. 1.11.X objects are part of the state, so they preserve the I'd no matter what we do in any plugin. 2.9.X objects are implementation details and they can change if we modify the plugin as you posted in the first comment. The RPC API always return 1.11.X objects so we can rest assured that 3rd parties can rely on this id. 2.9.X objects are never returned by the RPC api |
OK, I got it. The 2.9.X ID's are not being returned by However, the |
Hi guys, 2.9.X just for your consideration objects are yes returned by the api already. here is a sample, request an account will return between other things a statistics object.
Inside this statistic object most_recent_op is a 2.9.X object.
By now, i think it is exposed just as last op. The client may be relying on the object id itself or not but it is possible for some that a change here can break their programs. |
This impacts |
#276 is related. |
I think we can add an option to the plugin that provides the missed data when enabled, but disabled by default. |
i am going to work on this as an additional plugin option disabled by default as i am already making some work in the account_history_plugin and this should not be very hard to add. |
Lately I think it's better to fix the issue in a consensus-upgrade style, although strictly it's not a consensus change, because many 3rd-party applications rely on consistent numbering in account history. That said, only track all related accounts (for newly created accounts) after a defined time. |
The primary purpose of account_transaction_history is to provide an auditable log of balance changes. I think we shouldn't abuse it as some form of generic notification infrastructure, especially because of the numbering issue. |
On the contrary I don't think it's abuse, but is fair use. I agree with a separate mechanism though. For example, classify the events in account history. |
Fixed by #2480. |
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:
It should be:
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 onaccount_transaction_history_object::sequence
andaccount_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).The text was updated successfully, but these errors were encountered: