Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
84fec1a
feat: Update checksum version to 2 and hardcode protocol version for …
neerajvipparla Mar 26, 2026
1241e26
refactor: update sync protocol with extended transaction fields, ZK c…
neerajvipparla Mar 30, 2026
375cbfa
fix: update sync version parameters to ensure correct transport selec…
neerajvipparla Mar 30, 2026
2bf189a
Merge branch 'Fastsync' into fix/Fastsync
neerajvipparla Mar 30, 2026
6c51c62
chore: update priorsyncVersion to 2 in fastsyncv2.go
neerajvipparla Mar 30, 2026
a3f6c09
Merge branch 'fix/Fastsync' of https://github.com/JupiterMetaLabs/jmd…
neerajvipparla Mar 30, 2026
c4fc2be
fix: implement force update logic for existing blocks in immudb writers
neerajvipparla Mar 30, 2026
f285a59
feat: implement event-driven vote collection and notification system
neerajvipparla Mar 31, 2026
51cc6a0
feat: implement incremental startup sync in FastsyncV2 to catch up on…
neerajvipparla Apr 1, 2026
1e26941
Merge branch 'fix/Fastsync' of https://github.com/JupiterMetaLabs/jmd…
neerajvipparla Apr 1, 2026
eda70ca
chore: add project planning documentation and workspace configuration…
neerajvipparla Apr 2, 2026
05afeb9
docs: add documentation for consensus architecture and MCP tools, and…
neerajvipparla Apr 8, 2026
6990e9c
feat: implement fastsyncv2 CLI command and add nil-safety checks for …
neerajvipparla Apr 8, 2026
7649dde
fix: handle key not found errors in immudb account manager by returni…
neerajvipparla Apr 8, 2026
133ca81
refactor: update PoTS to use commsVersion and resolve full peer addre…
neerajvipparla Apr 10, 2026
00caaaf
feat: add script to scan accounts database for duplicate nonces
neerajvipparla Apr 10, 2026
ac5334a
feat: add detailed account listing and simplify duplicate nonce repor…
neerajvipparla Apr 10, 2026
7a3128a
fix: implement robust block marker reconciliation and increase databa…
saishibunb Apr 14, 2026
815deee
feat: introduce FastSync V2 configuration and initialization
neerajvipparla Apr 17, 2026
82d4a72
feat: enhance FastSync V2 configuration with new settings and conditi…
neerajvipparla Apr 17, 2026
54d0856
refactor(config): standardize fastsync defaults and struct order
i-naman Apr 17, 2026
3d559ea
fix: prevent HeaderSync from prematurely advancing the latest_block m…
neerajvipparla Apr 17, 2026
186e28c
Merge branch 'fix/Fastsync' of https://github.com/JupiterMetaLabs/jmd…
neerajvipparla Apr 17, 2026
5211afa
refactor: simplify GetLatestBlockNumber by removing retry logic and r…
neerajvipparla Apr 21, 2026
d7cb4cb
refactor: remove manual block reconciliation logic from immudb_adapte…
neerajvipparla Apr 21, 2026
02f5ad6
chore(deps): pin JMDN-FastSync to fix/auth-error-handling branch comm…
i-naman Apr 21, 2026
9abee45
chore(deps): upgrade JMDN-FastSync to e464cfd (auth propagation fix)
i-naman Apr 21, 2026
bef6f93
refactor: add Timestamp field to Transaction struct in multiple files…
neerajvipparla May 13, 2026
eeba3e0
chore: update dependencies in go.mod and go.sum, including upgrades t…
neerajvipparla May 13, 2026
ace63c0
Merge branch 'fix/Fastsync' of https://github.com/JupiterMetaLabs/jmd…
neerajvipparla May 13, 2026
cd96609
feat: implement account management features in immudb_account_manager…
neerajvipparla May 18, 2026
09c1325
chore: clean up go.mod and go.sum by removing unused dependencies and…
neerajvipparla May 18, 2026
31546a9
feat: enhance account retrieval and header synchronization in immudb
neerajvipparla May 18, 2026
99b300c
feat: enhance account fetching and local account creation in fastsyncv2
neerajvipparla May 18, 2026
397a7ac
Revert "feat: enhance account fetching and local account creation in …
neerajvipparla May 18, 2026
afe109c
feat: add account synchronization command and functionality in fastsy…
neerajvipparla May 18, 2026
07a92de
feat: add AccountSync method to CLIService for account synchronization
neerajvipparla May 18, 2026
d2818b1
feat: implement accountsync command and functionality for account syn…
neerajvipparla May 18, 2026
f411014
chore: update JMDN-FastSync dependency version in go.mod and go.sum
neerajvipparla May 19, 2026
dc4ee51
feat(fastsync): enforce strict read-only/serve-only sync guardrails
i-naman May 19, 2026
9dce864
refactor(fastsync): standardize config naming to clarify network dire…
i-naman May 19, 2026
0576279
feat(scripts): add merkle_check.go for post-sync block integrity vali…
i-naman May 19, 2026
e04f9aa
chore: increase HTTP server read and write timeouts to 60 seconds
i-naman May 19, 2026
60ca959
feat: enhance BatchRestoreAccounts with deduplication and chunked ope…
neerajvipparla May 20, 2026
6199ee4
Merge branch 'fix/Fastsync' of https://github.com/JupiterMetaLabs/jmd…
neerajvipparla May 20, 2026
1641351
feat: optimize BatchRestoreAccounts with pre-fetching of existing acc…
neerajvipparla May 20, 2026
7cec217
chore: update JMDN-FastSync dependency version in go.mod and go.sum
neerajvipparla May 21, 2026
b3f546c
feat: introduce cursor-based pagination for account listing
saishibunb May 21, 2026
d51407c
Fix/accountsync/performance (#35)
neerajvipparla May 26, 2026
a5a5f95
feat(logging): add custom headers support to OTEL config and upgrade …
i-naman May 26, 2026
18ace20
Add/redisstreams (#37)
neerajvipparla May 26, 2026
b137dfe
Remove unused functions for transaction and access list conversion in…
neerajvipparla May 26, 2026
a564546
feat(config): add Redis authentication and complete Viper env bindings
i-naman May 27, 2026
4d931e8
fix(fastsync): map missing ChainID, AccessList, and LogsBloom fields
i-naman May 28, 2026
abe2d6d
fix(accountsdb): preserve DIDs and metadata during sync
i-naman May 28, 2026
49e269c
refactor(account_sync): streamline account sync worker initialization…
neerajvipparla Jun 2, 2026
7cda66e
Merge branch 'fix/Fastsync' of https://github.com/JupiterMetaLabs/jmd…
neerajvipparla Jun 2, 2026
f8a155f
chore(deps): update JMDN-FastSync to v0.0.0-20260601052219-40e74741de…
neerajvipparla Jun 2, 2026
fab4188
Implement bounded enqueue for account synchronization
neerajvipparla Jun 5, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
192 changes: 192 additions & 0 deletions .cursor/plans/sequencer_fastsync-style_refactor_7924dc46.plan.md

Large diffs are not rendered by default.

23 changes: 22 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,25 @@ __debug_bin
vendor/

# Internal team references
docs/SONARQUBE_SETUP_GUIDE.md
docs/SONARQUBE_SETUP_GUIDE.md
ADR-001-JMDT-Native-EVM-Smart-Contracts.docx
jmdn.yaml
contract_storage_pebble/000004.log
*.log
*.logs
*.db
*.db-wal
contract_storage_pebble/CURRENT
contract_storage_pebble/LOCK
contract_storage_pebble/MANIFEST-000001
contract_storage_pebble/MANIFEST-000005
contract_storage_pebble/*
SmartContract/artifacts/*
SmartContract/artifacts/HelloWorld.json
/SmartContract/artifacts
SmartContract/artifacts/HelloWorld.json
docs/refactor-contractDBOps.md
internal/WAL/.tmp/*
.claude/*
.code-review-graph/*
.cursor/*
13 changes: 12 additions & 1 deletion AVC/BuddyNodes/MessagePassing/ListenerHandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -1110,6 +1110,13 @@ func (lh *ListenerHandler) handleSubmitVote(logger_ctx context.Context, s networ
ion.String("topic", TOPIC),
ion.String("function", "MessagePassing.handleSubmitVote"))

// Notify the sequencer's vote collector (if this node IS the sequencer)
NotifyVoteCollector(AVCStruct.VoteNotification{
PeerID: remotePeer.String(),
BlockHash: blockHash,
Vote: int8(voteValue),
})

// Now publish the vote to pubsub so ALL other buddy nodes can receive it
if pubSubNode != nil && pubSubNode.PubSub != nil {
logger().NamedLogger.Info(voteSpanCtx, "Republishing vote to pubsub for all buddy nodes",
Expand Down Expand Up @@ -1904,7 +1911,11 @@ func (lh *ListenerHandler) TriggerForBFTFromSequencer(s network.Stream, message
if err := json.Unmarshal([]byte(msg.Message), &resultData); err == nil {
if result, ok := resultData["result"].(float64); ok {
voteResult := int8(result)
Maps.StoreVoteResult(buddyID.String(), voteResult)
resultBlockHash := ""
if bh, ok := resultData["block_hash"].(string); ok {
resultBlockHash = bh
}
Maps.StoreVoteResult(resultBlockHash, buddyID.String(), voteResult)
fmt.Printf("✅ Stored vote result for peer %s: %d\n", buddyID.String(), voteResult)
responsesMutex.Lock()
responsesReceived++
Expand Down
53 changes: 53 additions & 0 deletions AVC/BuddyNodes/MessagePassing/vote_collector.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
package MessagePassing

import (
"log"
"sync"

PubSubMessages "gossipnode/config/PubSubMessages"
)

// activeVoteCollector is the channel the sequencer registers to receive
// vote notifications pushed from handleSubmitVote. Only one consensus
// round is active per node at a time, so a single global channel is safe.
var (
activeVoteCollector chan<- PubSubMessages.VoteNotification
voteCollectorMu sync.RWMutex
)

// RegisterVoteCollector sets the active vote notification channel.
// The sequencer calls this at the start of its event-driven vote collection loop.
func RegisterVoteCollector(ch chan<- PubSubMessages.VoteNotification) {
voteCollectorMu.Lock()
activeVoteCollector = ch
voteCollectorMu.Unlock()
}

// UnregisterVoteCollector nils out the active collector.
// Called via defer when the consensus round completes or times out.
func UnregisterVoteCollector() {
voteCollectorMu.Lock()
activeVoteCollector = nil
voteCollectorMu.Unlock()
}

// NotifyVoteCollector sends a vote notification to the active collector
// (if one is registered). The send is non-blocking; if the channel is full
// or no collector is registered, the notification is dropped with a log warning.
func NotifyVoteCollector(notification PubSubMessages.VoteNotification) {
voteCollectorMu.RLock()
collector := activeVoteCollector
voteCollectorMu.RUnlock()

if collector == nil {
return
}

select {
case collector <- notification:
log.Printf("VoteCollector: notified sequencer of vote from %s for block %s (vote=%d)",
notification.PeerID, notification.BlockHash, notification.Vote)
default:
log.Printf("VoteCollector: channel full, dropping vote notification from %s", notification.PeerID)
}
}
39 changes: 39 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,3 +179,42 @@ Proto definitions live in `proto/`. The gRPC services are:
## Linter Notes

Active linters: `govet`, `ineffassign`, `unused`, `nolintlint`. `staticcheck`, `errcheck`, and `gosec` are disabled pending backlog cleanup — do not re-enable them in a PR without addressing existing violations first.

<!-- code-review-graph MCP tools -->
## MCP Tools: code-review-graph

**IMPORTANT: This project has a knowledge graph. ALWAYS use the
code-review-graph MCP tools BEFORE using Grep/Glob/Read to explore
the codebase.** The graph is faster, cheaper (fewer tokens), and gives
you structural context (callers, dependents, test coverage) that file
scanning cannot.

### When to use graph tools FIRST

- **Exploring code**: `semantic_search_nodes` or `query_graph` instead of Grep
- **Understanding impact**: `get_impact_radius` instead of manually tracing imports
- **Code review**: `detect_changes` + `get_review_context` instead of reading entire files
- **Finding relationships**: `query_graph` with callers_of/callees_of/imports_of/tests_for
- **Architecture questions**: `get_architecture_overview` + `list_communities`

Fall back to Grep/Glob/Read **only** when the graph doesn't cover what you need.

### Key Tools

| Tool | Use when |
|------|----------|
| `detect_changes` | Reviewing code changes — gives risk-scored analysis |
| `get_review_context` | Need source snippets for review — token-efficient |
| `get_impact_radius` | Understanding blast radius of a change |
| `get_affected_flows` | Finding which execution paths are impacted |
| `query_graph` | Tracing callers, callees, imports, tests, dependencies |
| `semantic_search_nodes` | Finding functions/classes by name or keyword |
| `get_architecture_overview` | Understanding high-level codebase structure |
| `refactor_tool` | Planning renames, finding dead code |

### Workflow

1. The graph auto-updates on file changes (via hooks).
2. Use `detect_changes` for code review.
3. Use `get_affected_flows` to understand impact.
4. Use `query_graph` pattern="tests_for" to check coverage.
Loading
Loading