Conversation
|
And what about the RPCs? |
|
I Implemented five RPCs requested in the issue#1414 with the name |
|
Why do you implement them on the account while I designed it on the mempool? |
|
I changed wrongly implemented account RPCs to intended mempool RPCs. |
|
@HoOngEe Please give a reason if your implementation is different from the spec. |
|
I renamed the |
|
LGTM. But let me merge it after the next release. |
b969477 to
5565f6b
Compare
core/src/miner/miner.rs
Outdated
| .read() | ||
| .is_local_transaction(hash) | ||
| .expect("The tx is clearly fetched from the mem pool") => {} | ||
| _ => { |
There was a problem hiding this comment.
Other errors are safe to ban the error creators?
And what can we do to reduce some bugs when we add a new RuntimeError?
There was a problem hiding this comment.
Currently I cannot sure that the left runtime errors are considered as malicious behaviors. It's better to use the blacklist method when some errors are problematic.
There was a problem hiding this comment.
I picked the two problematic runtime errors RuntimeError::AssetSupplyOverflow and RuntimeError::InvalidScript and blacklisted them.
There was a problem hiding this comment.
@foriequal0 @sgkim126 What do you think about judging a malicious user only if the user's transaction failed with the blacklisted error?
There was a problem hiding this comment.
I think it can be fixed later.
| self.importer.miner.register_immune_users(immune_user_vec) | ||
| } | ||
|
|
||
| fn get_network_id(&self) -> NetworkId { |
There was a problem hiding this comment.
Network id can be retrieved with EngineInfo::common_params(Latest)?.network_id()
There was a problem hiding this comment.
I meant that get_network_id() is unnecessary.
core/src/client/client.rs
Outdated
| self.importer.miner.get_malicious_users() | ||
| } | ||
|
|
||
| fn release_trusty_users(&self, trusty_vec: Vec<Address>) { |
There was a problem hiding this comment.
The objective trusty user is not matching with the malicious user.
It is actually a method that releases a malicious user before.
And it doesn't match with the RPC method name unban_accounts
There was a problem hiding this comment.
I changed the name of release_trusty_users to release_malicious_users. For internal function names, I used "imprison" and "release" in a pair unlike the rpc name "ban" and "unban". Hence, I kept the verb "release" here. Is it better to unify the rpc name and the name of the internally called function?
There was a problem hiding this comment.
I think unifying it would be better.
b8e9911 to
e50b9ed
Compare
Immune users are immune from getting banned.
|
I judged the two runtime errors |
It closes #1414