GolosChain / golos

Socio-economic mediablockchain
https://developers.golos.io
Other
59 stars 36 forks source link

Totally remove key changing code #274

Closed bitphage closed 6 years ago

bitphage commented 7 years ago

Changing keys for any account via hardfork mechanism should not be used ever. We need to get rid of the key changing code involving in processing compromised_accounts

libraries/chain/database.cpp:

                   for (const std::string &acc : hardfork16::get_compromised_accounts()) {
                        const account_object *account = find_account(acc);
                        if (account == nullptr) {
                            continue;
                        }

                        update_owner_authority(*account, authority(1, public_key_type(
                                "GLS8hLtc7rC59Ed7uNVVTXtF578pJKQwMfdTvuzYLwUi8GkNTh5F6"), 1));

                        modify(get<account_authority_object, by_account>(account->name),
                               [&](account_authority_object &auth) {
                                   auth.active = authority(1, public_key_type(
                                           "GLS8hLtc7rC59Ed7uNVVTXtF578pJKQwMfdTvuzYLwUi8GkNTh5F6"), 1);
                                   auth.posting = authority(1, public_key_type(
                                           "GLS8hLtc7rC59Ed7uNVVTXtF578pJKQwMfdTvuzYLwUi8GkNTh5F6"), 1);
                               });
ghost commented 7 years ago

Как возвращать деньги инвестору, потерявшему ключи? Предположим он может доказать, что он это он?

On1x commented 7 years ago

Nobody can't change keys in blockchain with any reason. It's about blockchain mechanism.

ghost commented 7 years ago

let the flame begin!

On1x commented 7 years ago

@tomarcafe Это его проблемы. Он знал, на что идет. Потерял ключи = потерял деньги. Иначе к блокчейну никакого доверия.

ghost commented 7 years ago

мне кажется, надо нафиг отменять эту дурню с комментированием на английском.

как пишет в чате vvk - лучше бы подтянуть описания комитов

ghost commented 7 years ago

@On1x и тут я так пониманию команда голоса попадает в нехорошую западню, имени В. Бутерина - плохо продаётся серьезным инвесторам такая инвестиция.

chiliec commented 7 years ago

Ага, а следующем ХФ ещё кому-нибудь сменят? 😃

ghost commented 7 years ago

@Chiliec прецеденты, к сожалению, были.

nemothenoone commented 7 years ago

@bitfag Changing the lost keys set of LiveJournal pre-claimed accounts was a consensus stuff. Do you really think we need to remove this?

VIM-Arcange commented 7 years ago

@Nemo1369 A consensus? Which were the parties of this consensus?

nemothenoone commented 6 years ago

@VIM-Arcange It was announced even for 16-th version. And 16-th version worked fine with it. Two additional accounts were removed, now it is just a LiveJournal users list.

chiliec commented 6 years ago

Why this code generally exists? It's a blockchain or what? If you lost your keys — it's your fault, create another account or goodbye. Nobody tries to embed such bookmarks in the hardfork code of Bitcoin, what's wrong with Golos blockchain?

bitphage commented 6 years ago

Such a code creates a "bed smell" and bad reputation and should be removed and forgotten as a bad dream.

VIM-Arcange commented 6 years ago

@Nemo1369 You are not replying to the question "Which were the parties of this consensus?"

nemothenoone commented 6 years ago

@VIM-Arcange @bitfag @Chiliec @On1x Account public keys reset removed.

VIM-Arcange commented 6 years ago

@Nemo1369 Thank you for the feedback

bitphage commented 6 years ago

Why HF-16 related code was not removed? Is it intended to be a historical reminder? https://github.com/GolosChain/golos/blob/master/libraries/chain/database.cpp#L4641

nemothenoone commented 6 years ago

@bitfag It is not going to be removed because of backward compatibility requirements.

bitphage commented 6 years ago

Backward compatibility with what? Please describe in more detail.

As I understand, replaying blockchain with removed HF-16 related key-changing code will result in reverting "compromised accounts" keys back to the previous versions. And problem may arise whether keys was manually changed again via the built-in mechanism after HF-change. Thus, node may reject these key-changing transactions as invalid, so it may result in chain split. Am I correct?