Open trustfarm-dev opened 3 years ago
@trustfarm-dev Thanks for the proposal! First of all, this is the first proposal from outside of Klaytn core developers!
However, we have to discuss the benefit of this proposal.
@kjhman21 Answers
I also found many recent blocks has at least 1Tx. So, it is considered with validator economy models latest updates on KIP55.
core consensus change means no revert old things, changes to future. it is blockchain.
need to debug, when proposal has approved and start to implementation. so, many QA process will figure out.
it depends on you. this KIP is draft, there's many things will be modified , improved. base on this deadline idea.
I'm not a inhouse person, so I don't have full implementation to Klaytn, but, Psedo Code which described in KIP, middle level of engineer does coding for feasibility of new consensus. It also depends on your side.
I think more important things are validator economy model , not technical implementation, as you also developer, you experienced many development change little or more things than what started plan.
@trustfarm-dev Thanks for your suggestion.
As I understood, you suggested this idea to resolve the time for syncing Cypress.
In shorterm, syncing time of 30 second block time chain is faster than 1 second block time chain.
However, In longterm, both ways takes O(N)
time to sync N
blocks.
So we need to consider other approach is not related with N
block count.
In geth
, there is a fast sync to download the latest state trie. It takes O(M)
, M
is the number of state trie node.
Also, recent geth
released snap sync
that just downloads all useful state data (leaf trie nodes) and reconstructs the Merkle trie locally. It can decreased the download time to O(K)
from O(M)
, K
is the number of leaf trie node, K << M
.
Of course, it takes the time to reconstruct the merkle trie. But it is faster than download all parent trie nodes.
Therefore, I expect fast sync
and snap sync
approaches can reduce syncing time dramatically.
If possible, I will implement the features soon.
@trustfarm-dev I think this approach is more suitable for Service Chain or Baobab Network than MainNet. In a private network, there may be no transaction for a while if its service time is limited. In that case, this approach could save storage wasted by the empty block.
However, it is hard to apply the idea to the network using Istanbul Consensus with weight-random proposer selection (used in Cypress Network). As @kjhman21 remarked, CNs should have the ability to distinguish whether the block generation halt is originated from "Malfunction of the proposer" or "No transactions". It means that the consensus algorithm also should be revised to support your idea. Indeed, we should consider token economy also. In the CN's perspective, generating a block with a garbage transaction created by the node is more profitable than halting block generation because the mining reward is greater than the transaction fee. We should handle the problem also.
Fortunately, your idea is suitable for other consensus mechanisms that don't support fault-tolerance for the block proposer or have the proposer change timeout logger than "default blocktime" you suggested. For those mechanisms, your approach can be applied without the change of the consensus algorithm.
I would be grateful if you can develop your idea considering my comments. Thank you!
Klaytn [Forum Topic #790]((https://forum.klaytn.com/t/topic/790)
PullRequest on this issue is PR55. Please review and discuss on this core consensus changes.
In the view of technical, network stability, and Validator Economic model.
Especially, It will give a motivation on transaction mining to Validator. Validator will promote ECO for get more transaction fees and Block Rewards.
I call it TX Mining. To Validators Do action , Get more. No action, Little Staking Rewards.
It means this KIP , or Alternated KIP will drive validator more active.