Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
5366aad
Plan of action
tcsenpai Jun 4, 2025
b228b2e
added database structure for offline messages
Jun 5, 2025
8ff4f1d
just an addition to the ignore
Jun 5, 2025
d1ca864
Updated action plan for better l2ps imp
Jun 8, 2025
fcfa880
started new l2ps structure
Jun 12, 2025
e9ef066
dubious integration of ucrypto transaction type into this branch
Jun 14, 2025
30ffc92
l2ps implementation status tracking
Jun 14, 2025
c83be55
version bumps
Jun 14, 2025
1cb1e95
refactoring of parallelNetworks l2ps wrapper using the new l2ps logic…
Jun 14, 2025
4b8eaa8
dependant files update following the upgrade to the new l2ps
Jun 14, 2025
029625a
ignoring sensitive files
Jun 14, 2025
7c14d9e
documented the class
Jun 14, 2025
2209e06
Merge branch 'testnet' into imp_persistent
Jun 14, 2025
55851d2
better approach to transaction class
Jun 14, 2025
b2c10df
claude.md ignored
Jun 14, 2025
3c66730
using the generic transaction validation
Jun 14, 2025
8fd6941
Merge branch 'testnet' into imp_persistent
tcsenpai Jun 14, 2025
0f55d6b
ignored sensitive files
Jun 24, 2025
8153c52
dtr first test
Jun 24, 2025
ec4d2bf
Merge branch 'testnet' into dtr
Jun 24, 2025
6e76832
updated docs
Jun 25, 2025
30adaaf
entrypoint for background tx relaying
Jun 25, 2025
486dd01
added deletion method
Jun 25, 2025
c5dfa3d
hardened DTR logic
Jun 25, 2025
da25b2a
relayRetryService implementation for background relay of txs
Jun 25, 2025
665171e
Merge branch 'testnet' into l2ps_simplified
Jun 25, 2025
81c39af
fixed import with the new tx type
Jun 25, 2025
5f4bf76
Merge branch 'dtr' into l2ps_simplified
Jun 25, 2025
12b05b5
Improved l2ps loading when handling a L2PSTransaction
Jun 25, 2025
c2ffb2b
simplified action plan for l2ps based on DTR
Jun 26, 2025
70d8beb
created l2ps mempool object and entity
Jun 26, 2025
73b9f1e
corrected some implementation details
Jun 28, 2025
1b0c155
Merge branch 'testnet' into l2ps_simplified
tcsenpai Jul 2, 2025
3650f9e
added L2PS Hash service to periodically create hashes of l2ps tables
Jul 8, 2025
b1bc29e
added new tx type for distributing the L2PS hashes to the DTR
Jul 8, 2025
c7d1ee6
updated plan
Jul 8, 2025
5c5fe27
ignored files
Jul 8, 2025
262620a
improved hash service and sdk version bump
tcsenpai Jul 10, 2025
333f108
Merge branch 'testnet' into l2ps_simplified
tcsenpai Jul 10, 2025
51b93f1
Implement Phase 3b: Validator Hash Storage for L2PS
Nov 6, 2025
42d42ee
Implement Phase 3c-1: Complete L2PS NodeCall Endpoints
Nov 6, 2025
a54044d
Implement Phase 3c-2: Create L2PS Concurrent Sync Service
Nov 6, 2025
80bc0d6
Implement Phase 3c-3: Integrate L2PS Sync with Blockchain Sync
Nov 6, 2025
36b03f2
docs: Complete L2PS implementation documentation and testing guide
Nov 6, 2025
ff9b927
added memories
Nov 6, 2025
09b871c
configured serena
Nov 6, 2025
7862b05
ignores
Nov 6, 2025
0c8895d
lints
Nov 6, 2025
93a74e0
added onboarding for l2ps
Nov 6, 2025
00022c6
saved session for l2ps
Nov 6, 2025
f11afe5
Fix L2PS return type and pre-existing issues
Nov 6, 2025
d6e95fd
Fix DTR validator shuffle algorithm (fix dtr behavior)
Nov 6, 2025
b9c63cc
ignores
Nov 6, 2025
940b9f8
committed pr fixes
Nov 7, 2025
48d344f
Fix 9 critical and high-priority issues from PR review
Nov 7, 2025
2362537
Fix 16 critical and high-priority issues from CodeRabbit PR review
Nov 7, 2025
750eb91
fixed some files due to reviews
Nov 7, 2025
3793c6a
Fix 3 issues from CodeRabbit validation review
Nov 8, 2025
e114000
Fix 8 critical and high-priority issues from CodeRabbit PR review
Nov 8, 2025
24c7a19
Fix CodeRabbit Issue #1: Make blockchain storage mandatory for both p…
Nov 8, 2025
62b5978
ignores
Nov 8, 2025
27fef3a
Merge branch 'testnet' into l2ps_simplified
tcsenpai Nov 8, 2025
53d71e6
Merge branch 'testnet' into l2ps_simplified
tcsenpai Nov 10, 2025
f0ae38f
updated with beads
Dec 6, 2025
330ae8a
ignored
Dec 6, 2025
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
29 changes: 29 additions & 0 deletions .beads/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# SQLite databases
*.db
*.db?*
*.db-journal
*.db-wal
*.db-shm

# Daemon runtime files
daemon.lock
daemon.log
daemon.pid
bd.sock

# Legacy database files
db.sqlite
bd.db

# Merge artifacts (temporary files from 3-way merge)
beads.base.jsonl
beads.base.meta.json
beads.left.jsonl
beads.left.meta.json
beads.right.jsonl
beads.right.meta.json

# Keep JSONL exports and config (source of truth for git)
!issues.jsonl
!metadata.json
!config.json
1 change: 1 addition & 0 deletions .beads/.local_version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.29.0
1 change: 1 addition & 0 deletions .beads/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sync-branch: beads-sync
4 changes: 4 additions & 0 deletions .beads/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"database": "beads.db",
"jsonl_export": "beads.left.jsonl"
}
45 changes: 45 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -108,14 +108,32 @@ src/GTAGS
# Output files
output/*
.env
bun.lockb

# L2PS files
CLAUDE.md
data/l2ps/example/config.json
data/l2ps/example/iv.key
data/l2ps/example/config.json
data/l2ps/example/iv.key
data/l2ps/*

# Claude specific files
CLAUDE.md
GEMINI.md

architecture.gitbook-cache.json
architecture
architecture
Comment on lines +114 to 127
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Remove duplicate ignore entries.

Several entries are duplicated, creating redundancy and suggesting the file wasn't carefully reviewed before commit:

  • Line 114 (CLAUDE.md) duplicates line 122
  • Lines 115–116 (data/l2ps/example/*) duplicate lines 117–118
  • Line 126 (architecture) duplicates line 127
  • Line 119 (data/l2ps/*) already covers the example/ subdirectory entries, making lines 115–118 partially redundant

Clean up the duplicates and consolidate patterns where feasible to keep the file maintainable.

Suggested cleanup:

 # L2PS files
-CLAUDE.md
-data/l2ps/example/config.json
-data/l2ps/example/iv.key
 data/l2ps/example/config.json
 data/l2ps/example/iv.key
 data/l2ps/*
 
 # Claude specific files
 CLAUDE.md
-architecture
 architecture

Or, if the broader pattern data/l2ps/* is preferred, remove the more specific example/ entries entirely.

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In .gitignore around lines 114 to 127, there are duplicate and redundant entries
(CLAUDE.md repeated, data/l2ps/example/config.json and iv.key duplicated,
data/l2ps/* already covers the example/ entries, and architecture repeated);
remove the duplicated lines and consolidate by keeping a single CLAUDE.md,
remove the specific data/l2ps/example/* lines if you keep data/l2ps/* (or vice
versa), and keep only one architecture entry so each ignore pattern appears
once.

.DS_Store
.serena-backup
PR_COMMENTS
bridges_docs
claudedocs
dist
docs
local_tests
omniprotocol_fixtures_scripts
blocked_ips.json
SMART_CONTRACTS_*.md
.gitbook*
Expand All @@ -138,6 +156,20 @@ src/features/bridges/EVMSmartContract/out
src/features/bridges/EVMSmartContract/test
src/features/bridges/EVMSmartContract/GASLESS_BRIDGE_FLOW_DIAGRAM.md
src/features/bridges/EVMSmartContract/USAGE.md
src/features/bridges/SolanaTankProgram/solana_tank/target
src/features/bridges/SolanaTankProgram/SOLANA_TANK_PHASES.md
src/features/bridges/SolanaTankProgram/SOLANA_TANK_SCHEMA.md
src/features/bridges/SolanaTankProgram/SOLANA_TO_PORT.md
src/features/bridges/LiquidityTank_UserGuide.md
src/features/contracts/CONTRACT_PHASES.md
src/features/multichain/chainwares/aptoswares/TECHNICAL_PROPOSAL_APTOS_INTEGRATION.md
temp
.gitbook-cache.json
APTOS_INTEGRATION_PLAN.md
CLAUDE.sync-conflict-20250901-171031-7JPPSQB.md
D402_HTTP_PHASES.md
STORAGE_PROGRAMS_PHASES.md
STORAGE_PROGRAMS_SPEC.md
CLAUDE.sync-conflict-20250901-171031-7JPPSQB.md
.serena/cache/typescript/document_symbols_cache_v23-06-25.pkl
docs/src/
Expand All @@ -158,5 +190,18 @@ captraf.sh
http-capture-1762006580.pcap
http-capture-1762008909.pcap
http-traffic.json
PR_PRE_EXISTING_ISSUES.md
PR_REVIEW.md
REVIEWER_QUESTIONS_ANSWERED.md
PR_REVIEW_RAW.md
PR_REVIEW_FINAL.md
PR_REVIEW_FINAL.md
REVIEWER_QUESTIONS_ANSWERED.md
AGENTS.md
BUGS_AND_SECURITY_REPORT.md
CEREMONY_COORDINATION.md
PR_REVIEW_COMPREHENSIVE.md
ZK_CEREMONY_GIT_WORKFLOW.md
ZK_CEREMONY_GUIDE.md
attestation_20251204_125424.txt
prop_agent
2 changes: 1 addition & 1 deletion .serena/memories/code_style_conventions.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@
- **License**: CC BY-NC-ND 4.0 header in all source files
- **JSDoc**: Expected for public APIs and complex functions
- **Review Comments**: Use `// REVIEW:` for new features needing attention
- **FIXME Comments**: For temporary workarounds needing later fixes
- **FIXME Comments**: For temporary workarounds needing later fixes
2 changes: 1 addition & 1 deletion .serena/memories/codebase_structure.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,4 @@ src/
- **Runtime Data**: `data/` (chain.db, logs)
- **Identity Files**: `.demos_identity`, `public.key`
- **Peer Configuration**: `demos_peerlist.json`
- **Environment**: `.env` file
- **Environment**: `.env` file
175 changes: 175 additions & 0 deletions .serena/memories/development_guidelines.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,175 @@
# Development Guidelines

## Core Principles

### 1. Maintainability First
- Prioritize clean, readable, well-documented code
- Use descriptive names for variables, functions, and types
- Follow established project patterns and conventions
- Document significant architectural decisions

### 2. Planning and Workflow
- **Plan before coding**: Create implementation plans for complex features
- **Phases workflow**: Use *_PHASES.md files for actionable, short but useful steps
- **Incremental development**: Make focused, reviewable changes
- **Seek confirmation**: Ask for clarification on ambiguous requirements
- **Wait for confirmations**: When following phases, complete one phase at a time
- **Context awareness**: This is Demos Network node/RPC software

### 3. Code Quality Standards
- **Error handling**: Comprehensive error handling and validation required
- **Type safety**: Full TypeScript type coverage mandatory
- **Testing**: Follow existing test patterns and maintain coverage
- **Linting**: Run `bun run lint:fix` after changes (MANDATORY)

## Architecture Principles

### Follow Existing Patterns
- Look at similar implementations in the codebase
- Use established utility functions and helpers
- Integrate with existing SDK methods and APIs
- Maintain consistency with current patterns

### Integration Guidelines
- **SDK Integration**: Use @kynesyslabs/demosdk correctly
- **Database**: Follow TypeORM patterns for entities and queries
- **Features**: Place new features in appropriate src/features/ subdirectory
- **Types**: Define types in src/types/ for shared interfaces

## Best Practices

### 1. Clean Imports
**CRITICAL**: Use `@/` path aliases instead of relative imports
```typescript
// ✓ Correct
import { helper } from "@/libs/utils/helper"
import { Feature } from "@/features/incentive/types"

// ✗ Wrong
import { helper } from "../../../libs/utils/helper"
```

### 2. Code Review Markers
Add `// REVIEW:` before newly added features or significant code blocks
```typescript
// REVIEW: New authentication flow implementation
async function authenticateUser(credentials: UserCredentials) {
// Implementation
}
```

### 3. Documentation Standards
- **JSDoc**: Required for all new methods and functions
- **Inline comments**: Required for complex logic or business rules
- **Decision documentation**: Document non-obvious implementation choices

### 4. Error Messages
- Provide clear, actionable error messages
- Include context for debugging
- Use professional language for user-facing errors

### 5. Naming Conventions
- Variables/functions: camelCase
- Classes/types/interfaces: PascalCase
- No "I" prefix for interfaces
- Descriptive names that express intent

### 6. Code Comments for Cross-Language Understanding
When coding in non-TypeScript/JavaScript languages (e.g., Rust for Solana):
- Always comment with analogies to Solidity/TypeScript/JavaScript
- Help developers from TS/JS/Solidity background grasp code quickly
- Example: "// Similar to TypeScript's async/await pattern"

### 7. Diagrams for Complex Features
When following phases workflow and feature is complex:
- Create markdown file with ASCII/Unicode diagram
- Label with function names
- Number with phase numbers
- Use blocks and lines to show flow
- Place alongside implementation

## Repository-Specific Notes

### Version References
- **GCR**: Always refers to GCRv2 methods unless specified
- **Consensus**: Always refers to PoRBFTv2 if present
- **SDK**: @kynesyslabs/demosdk from npm, sources at ../sdks/

### Branch-Specific Notes
- **native_bridges branch**: Reference ./bridges_docs/ for status and phases
- **native_bridges imports**: When importing from ../sdks/build, add:
```typescript
// FIXME Once we have a proper SDK build, use the correct import path
```

## Testing Guidelines

### CRITICAL: Never Start Node During Development
- **NEVER** run `./run` or `bun run start` during development
- **Use** `bun run lint:fix` to check for errors
- **Node startup** only in production or controlled environments
- **ESLint validation** is the primary method for code correctness

### Testing Workflow
```bash
# 1. Make changes
# 2. Validate syntax and quality
bun run lint:fix

# 3. Run tests if applicable
bun run test:chains

# 4. Only in production/controlled environment
./run
```

## Tools and Agents

### MCP Servers Available
- Use MCP servers when needed (e.g., aptos-docs-mcp for Aptos documentation)
- Reference demosdk-references for SDK-specific lookups
- Use demosdk-gitbook for snippets and examples

### Specialized Agents
- Use specialized agents when beneficial (e.g., rust-pro for Rust code)
- Only invoke when they add value to the task

## Communication and Collaboration

### When to Ask Questions
- Requirements are unclear
- Multiple valid approaches exist
- Complex implementation decisions needed
- Non-obvious code choices being made

### Documentation Requirements
- Explain complex implementation decisions
- Provide context for non-obvious code choices
- Document deviations from standard patterns
- Note any technical debt or future improvements

## Development Workflow Summary

1. **Understand the task and context**
2. **Plan the implementation** (create *_PHASES.md if complex)
3. **Follow established patterns** from existing code
4. **Implement with proper documentation** (JSDoc, comments, REVIEW markers)
5. **Use @/ import aliases** (never relative paths)
6. **Validate with linting** (`bun run lint:fix`)
7. **Test if applicable** (`bun run test:chains`)
8. **Report completion** with summary of changes
9. **Wait for confirmation** before next phase

## Code Organization

### File Placement
- Tests: Place in `src/tests/` directory
- Scripts: Place in `src/utilities/` directory
- Documentation: Place in `claudedocs/` for Claude-generated reports
- Features: Place in appropriate `src/features/` subdirectory

### Structure Consistency
- Check for existing directories before creating new ones
- Follow the established directory patterns
- Maintain separation of concerns
- Keep related code together
Loading