-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
feat(consensus): add consensus logic optimization proposal #6141
base: develop
Are you sure you want to change the base?
Conversation
if (!forkController.pass(ForkBlockVersionEnum.VERSION_4_8_0)) { | ||
throw new ContractValidateException( | ||
"Bad chain parameter id [CONSENSUS_LOGIC_OPTIMIZATION]"); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[CONSENSUS_LOGIC_OPTIMIZATION] has been valid, no need to propose again.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I have seen many proposals that do not implement this judgment logic, such as ALLOW_TVM_SHANGHAI
, ALLOW_OPTIMIZED_RETURN_VALUE_OF_CHAIN_ID
new BytesCapsule(ByteArray.fromLong(value))); | ||
} | ||
|
||
public long getConsensusLogicOptimization() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public boolean allowConsensusLogicOptimization() {
return getConsensusLogicOptimization() == 1L;
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK
@@ -27,6 +24,8 @@ | |||
import org.tron.core.capsule.BlockCapsule; | |||
import org.tron.core.capsule.WitnessCapsule; | |||
|
|||
import static org.tron.core.config.Parameter.ChainConstant.*; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check style do not allow *
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, but the local check style is passed.
What does this PR do?
Add consensus logic optimization proposal.
Why are these changes required?
This PR has been tested by:
Follow up
Extra details