Skip to content
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

Block proposing moved from Node to Consensus. #4698

Merged
merged 1 commit into from
Jun 25, 2024
Merged

Conversation

Frozen
Copy link
Contributor

@Frozen Frozen commented Jun 21, 2024

  1. Block proposing uses 99% consensus and 1% node code, but it is located within the node.
  2. The chained protocol requires block proposing from consensus, causing a circular dependency error.

@Frozen Frozen self-assigned this Jun 21, 2024
func GetPendingCXKey(shardID uint32, blockNum uint64) string {
key := strconv.FormatUint(uint64(shardID), 10) + "-" + strconv.FormatUint(blockNum, 10)
return key
func GetPendingCXKey(shardID uint32, blockNum uint64) CXKey {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can the difference of key format returned cause any issue in our codebase calling that function ?

Copy link
Contributor Author

@Frozen Frozen Jun 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cache keeped only in the memory, so, restart will erase everything.
Exactly in this case, we have 4 memory allocations for no reason. My version has no allocations.

@ONECasey ONECasey merged commit d6da9ff into dev Jun 25, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants