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

Decision txs in proposal blocks #2432

Closed
wants to merge 5 commits into from
Closed

Conversation

abi87
Copy link
Contributor

@abi87 abi87 commented Dec 6, 2023

Why this should be merged

How this works

Tentative end state:

  • Version Timestamp changes + standardTx changes under proposal Block ID
  • Version commit/aboirt specific changes under commit/abort blockID

How this was tested

@abi87 abi87 self-assigned this Dec 6, 2023
@@ -84,7 +85,38 @@ func (v *verifier) BanffProposalBlock(b *block.BanffProposalBlock) error {
onAbortState.SetTimestamp(nextChainTime)
changes.Apply(onAbortState)

return v.proposalBlock(&b.ApricotProposalBlock, onCommitState, onAbortState)
// Step 2: process standard transactions, if any
Copy link
Contributor Author

Choose a reason for hiding this comment

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

a very dummy implementation, just to build UTs around it

@@ -29,7 +29,7 @@ import (
"github.com/ava-labs/avalanchego/vms/platformvm/txs/mempool"
)

func TestVerifierVisitProposalBlock(t *testing.T) {
func TestApricotVerifierVisitProposalBlock(t *testing.T) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

As usual this tests are not well maintained.
Introducing the following convention:
The first word after test is the fork that the test targets. We use LatestFork it the test is meant to be carried out across forks, so to remember to update the test.

@@ -59,7 +59,8 @@ func TestVerifierVisitProposalBlock(t *testing.T) {
verifier := &verifier{
txExecutorBackend: &executor.Backend{
Config: &config.Config{
BanffTime: mockable.MaxTime, // banff is not activated
BanffTime: mockable.MaxTime, // banff is not activated
DurangoTime: mockable.MaxTime, // durango is not activated
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Withint this Banff won't be active but Durango would be in tests.
We gotta remember to update configs in LatestFork* tests when introducing new forks

@abi87
Copy link
Contributor Author

abi87 commented Dec 7, 2023

Replaced by #2442

@abi87 abi87 closed this Dec 7, 2023
@dhrubabasu dhrubabasu deleted the standard_txs_in_proposal_blocks branch January 9, 2024 02:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

1 participant