Skip to content

Conversation

@JonathanOppenheimer
Copy link
Member

@JonathanOppenheimer JonathanOppenheimer commented Aug 7, 2025

This PR syncs:

Tthis PR brings in a lot of changes that aren't particular useful for subnet-evm, like the extender. This is intended, as I am trying to minimize the difference between coreth's version of these files, and subnet-evms. The eventual goal is the complete merger of all of these files, which is why I am making these changes now.

This PR introduces practically 0 "originally written by me code" - this is a culmination of the code of many other people (and in effect, has already been reviewed)

Also syncs this PR: ava-labs/coreth#1338 as surfaced by @alarso16

MetadataDB: vm.metadataDB,
Acceptor: vm,
Parser: vm.extensionConfig.SyncableParser,
Extender: nil,
Copy link
Member Author

Choose a reason for hiding this comment

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

image

@JonathanOppenheimer JonathanOppenheimer marked this pull request as ready for review August 8, 2025 21:13
@JonathanOppenheimer JonathanOppenheimer requested a review from a team as a code owner August 8, 2025 21:13
@JonathanOppenheimer JonathanOppenheimer requested a review from a team as a code owner August 11, 2025 14:53
Copy link
Contributor

@alarso16 alarso16 left a comment

Choose a reason for hiding this comment

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

This PR is kinda big, and really seems like two different ideas (block extension, sync extensions). I would feel more confident if it was split up, but it might not be worth the effort at this size.

@JonathanOppenheimer
Copy link
Member Author

This PR is kinda big, and really seems like two different ideas (block extension, sync extensions). I would feel more confident if it was split up, but it might not be worth the effort at this size.

Gotcha - I can split it up further but thought the extension stuff in general could be a single PR. If you think it's worth the effort I will, otherwise will let be!

JonathanOppenheimer and others added 3 commits October 14, 2025 12:42
Co-authored-by: Austin Larson <[email protected]>
Signed-off-by: Jonathan Oppenheimer <[email protected]>
Co-authored-by: Austin Larson <[email protected]>
Signed-off-by: Jonathan Oppenheimer <[email protected]>
JonathanOppenheimer and others added 2 commits October 14, 2025 12:48
Co-authored-by: Austin Larson <[email protected]>
Signed-off-by: Jonathan Oppenheimer <[email protected]>
Copy link
Collaborator

@ceyonur ceyonur left a comment

Choose a reason for hiding this comment

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

I was in the middle of reviewing but it seems this has some invalid and unrelated changes. It also is too big and it reverts some of previous PRs.

Can we focus on each of these sync PRs one-by-one maybe not mechanically but conceptually. A directy cherry-pick could be end up with massive conflicts.

@JonathanOppenheimer JonathanOppenheimer marked this pull request as draft October 14, 2025 18:48
@JonathanOppenheimer JonathanOppenheimer marked this pull request as ready for review November 16, 2025 06:06
@JonathanOppenheimer JonathanOppenheimer marked this pull request as draft November 16, 2025 06:06
@JonathanOppenheimer
Copy link
Member Author

I was in the middle of reviewing but it seems this has some invalid and unrelated changes. It also is too big and it reverts some of previous PRs.

Can we focus on each of these sync PRs one-by-one maybe not mechanically but conceptually. A directy cherry-pick could be end up with massive conflicts.

This has been broken up significantly with 3 other PRs eating into this -- is this focused enough now?

@JonathanOppenheimer JonathanOppenheimer marked this pull request as ready for review November 17, 2025 17:08
Comment on lines -1373 to -1393
func (vm *VM) Connected(ctx context.Context, nodeID ids.NodeID, version *version.Application) error {
vm.vmLock.Lock()
defer vm.vmLock.Unlock()

if err := vm.uptimeTracker.Connect(nodeID); err != nil {
return fmt.Errorf("uptime tracker failed to connect node %s: %w", nodeID, err)
}

return vm.Network.Connected(ctx, nodeID, version)
}

func (vm *VM) Disconnected(ctx context.Context, nodeID ids.NodeID) error {
vm.vmLock.Lock()
defer vm.vmLock.Unlock()

if err := vm.uptimeTracker.Disconnect(nodeID); err != nil {
return fmt.Errorf("uptime tracker failed to disconnect node %s: %w", nodeID, err)
}

return vm.Network.Disconnected(ctx, nodeID)
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

these should not be deleted

Copy link
Member Author

Choose a reason for hiding this comment

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

Why? They were deleted from coreth and they are never used anywhere

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

coreth sync state-sync-migration Migration of state sync code to `avalanchego`.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants