Skip to content

chore: put celestia features into 0.38.x#1672

Merged
rach-id merged 54 commits intov0.38.x-celestiafrom
marko/core_changes_v3
Mar 31, 2025
Merged

chore: put celestia features into 0.38.x#1672
rach-id merged 54 commits intov0.38.x-celestiafrom
marko/core_changes_v3

Conversation

@tac0turtle
Copy link
Copy Markdown
Collaborator

@tac0turtle tac0turtle commented Mar 12, 2025

Description

This Pr took the diff files from 0.34.x -> 0.34.x-celestia and applied the changes on top of 0.38.x branch of comet.

This contains 95% of the changes.

Missing Features that will be PRed into this branch

  • cat mempool
  • priority mempool

@tac0turtle tac0turtle changed the title Marko/core changes v3 chore: put celestia features into 0.38.x Mar 12, 2025
Copy link
Copy Markdown
Member

@evan-forbes evan-forbes left a comment

Choose a reason for hiding this comment

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

[blocking]
where does the app mempool live now? do we just need to move cat and v1 to app? how does that work with the multiplexer?

I removed most of the changes to the e2e test in #1609 , and it simplified things.

overall I think we're good to merge, had a few minor blocking questions/comments. its difficult to ensure that everything was added, but I didn't see anything that shouldn't have been added. If there are things missing, we'll find them when we sync or connect to node and can handle them quickly then.

Comment thread types/block.go Outdated
Comment thread p2p/base_reactor.go Outdated
Comment on lines +50 to +57
// QueueUnprocessedEnvelope is called by the switch when an unprocessed
// envelope is received. Unprocessed envelopes are immediately buffered in a
// queue to avoid blocking. Incoming messages are then passed to a
// processing function. The default processing function unmarshals the
// messages in the order the sender sent them and then calls Receive on the
// reactor. The queue size and the processing function can be changed via
// passing options to the base reactor.
// QueueUnprocessedEnvelope(e UnprocessedEnvelope)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

leaving a comment to link piece of code and PR to an issue. we need to handle this at some point. either remove it or re-add it

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

+1

There is a lot of commented code in here. We could either remove the commented code and create an issue, or uncomment it.

If we decide to remove it, then we should remove all references to the parallel processing including the queue sizes, etc

Comment thread blocksync/reactor.go Outdated
Comment on lines +516 to +518
stateMachineValid, err = bcR.blockExec.ProcessProposal(first, state)
if !stateMachineValid {
err = fmt.Errorf("application has rejected syncing block (%X) at height %d", first.Hash(), first.Height)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

👍

Comment thread mempool/reactor.go Outdated

// NewReactor returns a new Reactor with the given config and mempool.
func NewReactor(config *cfg.MempoolConfig, mempool *CListMempool) *Reactor {
func NewReactor(config *cfg.MempoolConfig, mempool *CListMempool, traceClient trace.Tracer) *Reactor {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

[not blocking]

I guess it doesn't hurt to add the tracer here, but we don't have any plans to trace this mempool, and we aren't adding any traces here afaict so we could also remove it

Comment thread test/e2e/docker/Dockerfile Outdated
# We use Debian instead of Alpine, so that we can use binary database packages
# instead of spending time compiling them.
FROM cometbft/cometbft-db-testing:v0.14.2
FROM cometbft/cometbft-db-testing:latest
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I had to switch to the standard golang one to get this to work. #1609

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

is this a reason to use latest instead of the exact version? With latest, we might not be aware when there is a new version that breaks the tests

Comment thread consensus/byzantine_test.go Outdated
}
func (br *ByzantineReactor) InitPeer(peer p2p.Peer) p2p.Peer { return peer }

// func (br *ByzantineReactor) QueueUnprocessedEnvelope(e p2p.UnprocessedEnvelope) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

why was this commented?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

ill remove this, it was for testing but then wasnt sure if i should try to add it back. there was an issue with some tests that i couldnt figure out the issue

Comment thread consensus/replay.go Outdated
Comment thread mempool/reactor_test.go
Comment thread node/setup.go
Comment thread p2p/base_reactor.go Outdated
Comment on lines +50 to +57
// QueueUnprocessedEnvelope is called by the switch when an unprocessed
// envelope is received. Unprocessed envelopes are immediately buffered in a
// queue to avoid blocking. Incoming messages are then passed to a
// processing function. The default processing function unmarshals the
// messages in the order the sender sent them and then calls Receive on the
// reactor. The queue size and the processing function can be changed via
// passing options to the base reactor.
// QueueUnprocessedEnvelope(e UnprocessedEnvelope)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

+1

There is a lot of commented code in here. We could either remove the commented code and create an issue, or uncomment it.

If we decide to remove it, then we should remove all references to the parallel processing including the queue sizes, etc

Comment thread rpc/client/rpc_test.go Outdated
Comment thread rpc/client/rpc_test.go
Comment thread rpc/core/blocks_test.go Outdated
Comment thread state/execution.go Outdated
Comment thread test/e2e/docker/Dockerfile Outdated
# We use Debian instead of Alpine, so that we can use binary database packages
# instead of spending time compiling them.
FROM cometbft/cometbft-db-testing:v0.14.2
FROM cometbft/cometbft-db-testing:latest
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

is this a reason to use latest instead of the exact version? With latest, we might not be aware when there is a new version that breaks the tests

Copy link
Copy Markdown
Collaborator

@damiannolan damiannolan left a comment

Choose a reason for hiding this comment

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

quick question

Comment thread types/block.go Outdated
tac0turtle and others added 2 commits March 17, 2025 12:56
)

This pr extends abci Checktx in order to facilitate priority ordering in
core for p2p dissemination.
@rach-id
Copy link
Copy Markdown
Member

rach-id commented Mar 26, 2025

Still looking good to me 👍 👍

@evan-forbes
Copy link
Copy Markdown
Member

I think we're just waiting on the e2e test @tac0turtle

it looks like a silly failure, happy to fix this to help push this through if needed

@tac0turtle
Copy link
Copy Markdown
Collaborator Author

I think we're just waiting on the e2e test @tac0turtle

it looks like a silly failure, happy to fix this to help push this through if needed

i havent had a moment to properly debug, but the flag is there so not sure what is missing.

@tac0turtle
Copy link
Copy Markdown
Collaborator Author

e2e is fixed and made the tests work with pebble as well

this pr adds the header to finalize block as its stored in state. since
abci++ does not contain the whole header it was breaking sync of v3

---------

Co-authored-by: Marko Baricevic <markobaricevic@Markos-MacBook-Pro.local>
rootulp
rootulp previously approved these changes Mar 27, 2025
evan-forbes
evan-forbes previously approved these changes Mar 28, 2025
Comment on lines +47 to +50
s.server = grpc.NewServer(
grpc.MaxRecvMsgSize(math.MaxInt32),
grpc.MaxSendMsgSize(math.MaxInt32),
)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

do these need to be set to MaxInt32 or can we use some const like (max block size + some delta)

Copy link
Copy Markdown
Collaborator Author

@tac0turtle tac0turtle Mar 28, 2025

Choose a reason for hiding this comment

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

send is already int32, i set the main version to 75, i can do it here.

Comment thread consensus/replay_file.go
handshaker := NewHandshaker(stateStore, state, blockStore, gdoc)
handshaker.SetEventBus(eventBus)
err = handshaker.Handshake(proxyApp)
_, err = handshaker.Handshake(proxyApp)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

what is the ignored arg? 🤔

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

the version in the responseInfo

@tac0turtle tac0turtle dismissed stale reviews from evan-forbes and rootulp via 7335c6c March 28, 2025 14:25
Comment thread blocksync/reactor_test.go
// Copied unchanged from reactor.go so the correct respondToPeer is called.
func (bcR *ByzantineReactor) Receive(e p2p.Envelope) { //nolint: dupl
func (bcR *ByzantineReactor) Receive(e p2p.Envelope) {
fmt.Println("Receive", e.Message)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

looks to be a residual print

Comment thread evidence/reactor.go
Comment on lines +258 to +260
func (evR *Reactor) OnStop() {
evR.BaseReactor.OnStop()
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

this feels redundant since OnStop() is already called automatically when stopping a reactor

@rach-id rach-id merged commit bbd3b9b into v0.38.x-celestia Mar 31, 2025
24 of 26 checks passed
@rach-id rach-id deleted the marko/core_changes_v3 branch March 31, 2025 17:26
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.

8 participants