patch: add dag visualisation and fix vite build#121
Conversation
Signed-off-by: Abhishek <bumblebee31304@gmail.com>
Signed-off-by: Abhishek <bumblebee31304@gmail.com>
|
|
Otherwise, it looks good to me 🫡🚀 |
|
the tooltip was dynamic earlier but it seems to mess everything up once there's a lot of data, by going out of the view, hence i have pinned it to the bottom-left, and will be visible only when you hover over it |
|
I don't see anything wrong that stands out. Looks good |
Can we break some code into multiple files? It will be easier to manipulate changes in the future since we are using React. |
Yeah we can totally modularize it further as we go |
* patch: add dag visualisation and fix vite build Signed-off-by: Abhishek <bumblebee31304@gmail.com> * patch: update colors palette on DAG visualisation Signed-off-by: Abhishek <bumblebee31304@gmail.com> --------- Signed-off-by: Abhishek <bumblebee31304@gmail.com>
* patch: add dag visualisation and fix vite build Signed-off-by: Abhishek <bumblebee31304@gmail.com> * patch: update colors palette on DAG visualisation Signed-off-by: Abhishek <bumblebee31304@gmail.com> --------- Signed-off-by: Abhishek <bumblebee31304@gmail.com>
* feat: add simulator api (#126) - add tests for the api - docs for tutorial about running the API - update requirements.txt for dependencies Signed-off-by: Abhishek <bumblebee31304@gmail.com> * Small fix for requirements, logging (#127) * Update structs to reflect PPLNS and committed mempool (#119) * Update structs to reflect PPLNS and committed mempool Signed-off-by: Bob McElrath <mcelrath@users.noreply.github.com> * Replacing of field Signed-off-by: Bob McElrath <mcelrath@users.noreply.github.com> --------- Signed-off-by: Bob McElrath <mcelrath@users.noreply.github.com> Co-authored-by: sansh2356 <sansh2356@gmail.com> * Upgrade Cargo.lock for crossbeam-channel and tokio due to vulnerabilities (#130) https://github.com/braidpool/braidpool/security/dependabot/19 https://github.com/braidpool/braidpool/security/dependabot/20 Signed-off-by: Bob McElrath <mcelrath@users.noreply.github.com> * Rewrite simulator_api to use ws, hex, and client script (#145) * Rewrite simulator_api to use ws, hex, and client script * Use asyncio websockets instead of Flask * Replace flask tests with websocket tests * Add websockets, remove flask dependencies * Clean up unused imports * Refactor: Replace custom types with rust-bitcoin primitives - Removed all custom type definitions for blockchain-related structures. - Switched to using `rust-bitcoin` primitives for improved compatibility and maintainability. Signed-off-by: Calisto Abel Mathias <calisto.mathias.25@gmail.com> * Rename project and crate to braidpool-primitives - Updated the project name to `braidpool-primitives` to better reflect its purpose. - Renamed the crate in `Cargo.toml` to `braidpool-primitives`. Signed-off-by: Calisto Abel Mathias <calisto.mathias.25@gmail.com> * Refactor project structure and implement bead validation - Fixed the directory structure and updated `Cargo.toml` files to use workspaces properly. - Added `lib.rs` and other required files to enable successful Cargo builds. - Implemented functionality to check if a bead is valid. Signed-off-by: Calisto Abel Mathias <calisto.mathias.25@gmail.com> * Remove redundant curly braces xD Signed-off-by: Calisto Abel Mathias <calisto.mathias.25@gmail.com> * Remove redundant keywords Signed-off-by: Calisto Abel Mathias <calisto.mathias.25@gmail.com> * Remove redundant import in `beads.rs` Signed-off-by: Calisto Abel Mathias <calisto.mathias.25@gmail.com> * Add orphan bead support and database loading stub - Added initial support for managing orphan beads by introducing an in-memory orphan bead set. - Implemented a dummy function for loading beads from a database. - Made other trivial changes and minor improvements. Signed-off-by: Calisto Abel Mathias <calisto.mathias.25@gmail.com> * Add support for updating orphan bead set and bead checks - Implemented functionality to update the orphan bead set whenever a new bead is encountered. - Added all necessary checks for a bead, except for validity checking. Signed-off-by: Calisto Abel Mathias <calisto.mathias.25@gmail.com> * Add rustfmt to the code and format the whole codebase * Merge work from external repo into main Signed-off-by: Calisto Abel Mathias <calisto.mathias.25@gmail.com> * Remove redundant structs and rename definitions Signed-off-by: Calisto Abel Mathias <calisto.mathias.25@gmail.com> * Fix linting Signed-off-by: Aritra Majumder <aritramajumder8438@gmail.com> * Refactor beads.rs and add testing structure - Refactored `beads.rs` to improve code readability, maintainability, and modularity. - Organized public and private methods within the `Bead` struct. - Improved inline documentation and comments for better clarity. - Ensured proper separation of concerns in method implementations. - Added structure for unit tests and integration tests: - Created a `tests/braid_tests.rs` file for integration tests. - Established a foundation for testing the functionality of the `Bead` struct and related components. - Prepared placeholders for unit tests within the `#[cfg(test)]` module in `beads.rs`. - Updated project to ensure compatibility with the new testing structure. - Verified that the refactored code compiles and passes existing checks. - Ensured the workspace is ready for future test case additions. Signed-off-by: Calisto Mathias <calistomathias.work@gmail.com> * Fix rebase issues Signed-off-by: Calisto Mathias <calistomathias.work@gmail.com> * feat: add custom error type BeadLoadError for improved error handling This commit introduces the `BeadLoadError` enum to represent custom error types in the Braid module. The error type includes the following variants: - `BeadNotFound`: Indicates that a requested bead could not be found in memory or storage. - `InvalidBeadHash`: Represents an error when a bead hash is invalid or malformed. - `DatabaseError`: Captures errors related to database operations. Additionally: - Implemented the `fmt::Display` trait for `BeadLoadError` to provide human-readable error messages for each variant. - Implemented the `std::error::Error` trait for compatibility with Rust's error handling ecosystem. These changes enable more robust and descriptive error handling throughout the Braid module, making it easier to debug and manage errors in functions like `fetch_bead_from_memory` and other operations that may fail. Signed-off-by: Calisto Mathias <calistomathias.work@gmail.com> * Update `rustfmt.yml` to target all the branches (#105) * Update `rustfmt.yml` to target all the branches * Fix linting Signed-off-by: Aritra Majumder <aritramajumder8438@gmail.com> --------- Signed-off-by: Aritra Majumder <aritramajumder8438@gmail.com> * Add tests submodule for private function tests! Signed-off-by: Calisto Mathias <calistomathias.work@gmail.com> * feat: add load_bead_from_memory function with custom error handling This commit introduces the `load_bead_from_memory` function to retrieve a bead from memory, along with robust error handling using the custom `BeadLoadError` enum. Key changes: - Implemented the `load_bead_from_memory` function, which: - Accepts a `BeadHash` as input. - Returns a `Result<&Bead, BeadLoadError>`. - Returns `Ok(bead)` if the bead is found in `loaded_beads_in_memory`. - Returns `Err(BeadLoadError::BeadNotFound)` if the bead is not found. - Added a placeholder for future validation of bead hashes. This function improves the modularity and error handling of bead retrieval, making it easier to integrate with future database-related operations. Signed-off-by: Calisto Mathias <calistomathias.work@gmail.com> * feat: implement is_genesis_bead function with custom error handling This commit adds the `is_genesis_bead` function to the `Braid` struct, enabling the identification of genesis beads while incorporating robust error handling using the `BeadLoadError` enum. Key changes: - **`is_genesis_bead` function**: - Determines if a bead is a genesis bead by checking if it has no parents. - Iterates through the parents of a bead to verify if any parent bead has been pruned from memory. - Returns `Ok(true)` if the bead is a genesis bead or if any parent bead is missing (`BeadLoadError::BeadNotFound`). - Propagates other errors (e.g., `InvalidBeadHash`, `DatabaseError`) using the `?` operator. - **Integration with `load_bead_from_memory`**: - Utilizes the `load_bead_from_memory` function to retrieve beads from memory. - Handles errors returned by `load_bead_from_memory` to ensure proper error propagation. This implementation improves the functionality of the `Braid` module by providing a clear mechanism to identify genesis beads while leveraging the custom `BeadLoadError` enum for detailed error reporting. Signed-off-by: Calisto Mathias <calistomathias.work@gmail.com> * Run rustfmt on crate Signed-off-by: Calisto Mathias <calistomathias.work@gmail.com> * Fix typo Signed-off-by: Calisto Mathias <calistomathias.work@gmail.com> * fix: correct MerklePathProof hashing order for left and right leaf nodes This commit fixes the `MerklePathProof` implementation to ensure the correct hashing order is used when calculating the Merkle root for both left and right leaf nodes in the Merkle binary tree. 1. **Fix in `get_merkle_hashing_order`**: - Correctly handles the hashing order for both left and right leaf nodes. - For right leaf nodes (`is_right_leaf == true`): - The sibling hash from the `merkle_path` is added first. - The `transaction_hash` is added second. - The remaining hashes in the `merkle_path` are appended starting from index `1`. - For left leaf nodes (`is_right_leaf == false`): - The `transaction_hash` is added first. - The remaining hashes in the `merkle_path` are appended starting from index `0`. 2. **Improved Clarity**: - Introduced the `index_for_starting_the_copy` variable to clearly define where to start iterating over the `merkle_path` for appending additional hashes. - Ensures consistent and predictable behavior for both left and right leaf cases. 3. **Integration with `calculate_corresponding_merkle_root`**: - The `get_merkle_hashing_order` function is used to generate the correct hashing order. - The concatenated hashes are double-hashed using `Sha256d` to compute the Merkle root. - The resulting Merkle root is converted into a `TxMerkleNode` for compatibility with Bitcoin's data structures. - Fixes potential issues with incorrect Merkle root calculations when the transaction is a right leaf. - Ensures compatibility with Bitcoin's Merkle tree structure and hashing rules. - Improves code readability and maintainability by clearly separating the logic for left and right leaf nodes. - Add unit tests to verify the correctness of the Merkle root calculation for various Merkle tree configurations. - Optimize the hashing process for large Merkle paths if performance becomes a concern. Signed-off-by: Calisto Mathias <calistomathias.work@gmail.com> * Directory restructure Signed-off-by: Calisto Mathias <calistomathias.work@gmail.com> * Run rustfmt Signed-off-by: Calisto Mathias <calistomathias.work@gmail.com> * Dashboard Mockup: Implement responsive Braidpool data visualization and UI components (#120) * patch: add dag visualisation and fix vite build (#121) * patch: add dag visualisation and fix vite build Signed-off-by: Abhishek <bumblebee31304@gmail.com> * patch: update colors palette on DAG visualisation Signed-off-by: Abhishek <bumblebee31304@gmail.com> --------- Signed-off-by: Abhishek <bumblebee31304@gmail.com> * feat: Add Mined Shares Explorer and integrate with Dashboard (#122) * feat: Add Mined Shares Explorer and integrate with Dashboard - Added new component MinedSharesExplorer for displaying mined shares data. - Updated Dashboard to include a new route for MinedSharesExplorer. - Enhanced Dashboard with new navigation for Miner Stats. - Integrated Framer Motion for animations in MinedSharesExplorer and its components. - Implemented Filters and MinerTable components for better data representation. - Added Particles component for animated background effects. - Updated package.json to include new dependencies: framer-motion and lucide-react. - Configured Tailwind CSS for styling. - Added postcss configuration for Tailwind integration. - USed framer-motion and lucide-react -verified commits * refactor: Enhance MinerTable component with dynamic rendering and improved state management . * fix: Add missing line for data points rendering in MiningChart component Signed-off-by: priyashuu <priyaaashu4@gmail.com> * fix: Add missing newline for improved code readability in MinerTable component verified commit Signed-off-by: priyashuu <priyaaashu4@gmail.com> * Update transactionCount calculation in MinerTable component to sum transaction counts --------- Signed-off-by: priyashuu <priyaaashu4@gmail.com> * Refactor dashboard codebase (#124) * Update Readme Files (#131) * refactor: create components directories Signed-off-by: Abhishek <bumblebee31304@gmail.com> * refactor: create components directories Signed-off-by: Abhishek <bumblebee31304@gmail.com> * fix: replace localhost * feat: Add Mined Shares Explorer and integrate with Dashboard (#122) * feat: Add Mined Shares Explorer and integrate with Dashboard - Added new component MinedSharesExplorer for displaying mined shares data. - Updated Dashboard to include a new route for MinedSharesExplorer. - Enhanced Dashboard with new navigation for Miner Stats. - Integrated Framer Motion for animations in MinedSharesExplorer and its components. - Implemented Filters and MinerTable components for better data representation. - Added Particles component for animated background effects. - Updated package.json to include new dependencies: framer-motion and lucide-react. - Configured Tailwind CSS for styling. - Added postcss configuration for Tailwind integration. - USed framer-motion and lucide-react -verified commits * refactor: Enhance MinerTable component with dynamic rendering and improved state management . * fix: Add missing line for data points rendering in MiningChart component Signed-off-by: priyashuu <priyaaashu4@gmail.com> * fix: Add missing newline for improved code readability in MinerTable component verified commit Signed-off-by: priyashuu <priyaaashu4@gmail.com> * Update transactionCount calculation in MinerTable component to sum transaction counts --------- Signed-off-by: priyashuu <priyaaashu4@gmail.com> refactor: create components directories Signed-off-by: Abhishek <bumblebee31304@gmail.com> refactor: create components directories Signed-off-by: Abhishek <bumblebee31304@gmail.com> fix: replace localhost * docs: update the readme files for better dashboard information Signed-off-by: Abhishek <bumblebee31304@gmail.com> * docs: update the readme files for better dashboard information Signed-off-by: Abhishek <bumblebee31304@gmail.com> --------- Signed-off-by: Abhishek <bumblebee31304@gmail.com> Co-authored-by: Priya <150767072+priyashuu@users.noreply.github.com> * Updating the definitions for structs (#123) * Adding additional serde dependencies Signed-off-by: sansh2356 <sansh2356@gmail.com> * Updating the bead struct definations Signed-off-by: sansh2356 <sansh2356@gmail.com> * Unit test for serialization of bead struct Signed-off-by: sansh2356 <sansh2356@gmail.com> * Adding serialize and deserialize traits Signed-off-by: sansh2356 <sansh2356@gmail.com> * Update Readme Files (#131) * refactor: create components directories Signed-off-by: Abhishek <bumblebee31304@gmail.com> * refactor: create components directories Signed-off-by: Abhishek <bumblebee31304@gmail.com> * fix: replace localhost * feat: Add Mined Shares Explorer and integrate with Dashboard (#122) * feat: Add Mined Shares Explorer and integrate with Dashboard - Added new component MinedSharesExplorer for displaying mined shares data. - Updated Dashboard to include a new route for MinedSharesExplorer. - Enhanced Dashboard with new navigation for Miner Stats. - Integrated Framer Motion for animations in MinedSharesExplorer and its components. - Implemented Filters and MinerTable components for better data representation. - Added Particles component for animated background effects. - Updated package.json to include new dependencies: framer-motion and lucide-react. - Configured Tailwind CSS for styling. - Added postcss configuration for Tailwind integration. - USed framer-motion and lucide-react -verified commits * refactor: Enhance MinerTable component with dynamic rendering and improved state management . * fix: Add missing line for data points rendering in MiningChart component Signed-off-by: priyashuu <priyaaashu4@gmail.com> * fix: Add missing newline for improved code readability in MinerTable component verified commit Signed-off-by: priyashuu <priyaaashu4@gmail.com> * Update transactionCount calculation in MinerTable component to sum transaction counts --------- Signed-off-by: priyashuu <priyaaashu4@gmail.com> refactor: create components directories Signed-off-by: Abhishek <bumblebee31304@gmail.com> refactor: create components directories Signed-off-by: Abhishek <bumblebee31304@gmail.com> fix: replace localhost * docs: update the readme files for better dashboard information Signed-off-by: Abhishek <bumblebee31304@gmail.com> * docs: update the readme files for better dashboard information Signed-off-by: Abhishek <bumblebee31304@gmail.com> --------- Signed-off-by: Abhishek <bumblebee31304@gmail.com> Co-authored-by: Priya <150767072+priyashuu@users.noreply.github.com> * correcting the order and replacing the attributes to avoid hash cycle * Changing the attribute accessibility according to the updated definitions Signed-off-by: sansh2356 <sansh2356@gmail.com> --------- Signed-off-by: sansh2356 <sansh2356@gmail.com> Signed-off-by: Abhishek <bumblebee31304@gmail.com> Co-authored-by: Abhishek <114338679+its-me-abhishek@users.noreply.github.com> Co-authored-by: Priya <150767072+priyashuu@users.noreply.github.com> * docs: add contributing.md (#136) * feat: add prettier workflow (#137) Signed-off-by: Abhishek <bumblebee31304@gmail.com> * refactor: lint applied to each file on the frontend (#138) * refactor: lint applied to each file on the frontend Signed-off-by: Abhishek <bumblebee31304@gmail.com> * refactor: updated prettier rules Signed-off-by: Abhishek <bumblebee31304@gmail.com> * test: testing the githook Signed-off-by: Abhishek <bumblebee31304@gmail.com> --------- Signed-off-by: Abhishek <bumblebee31304@gmail.com> Co-authored-by: Bob McElrath <mcelrath@users.noreply.github.com> * feat: Implement chart data hooks and components for miner dashboard (#146) * feat: Implement chart data hooks and components for miner dashboard - Added `useChartData` hook to generate and manage chart data based on selected time ranges. - Created `useComparisonData` hook for comparing miner performance against a selected miner. - Developed `MinedSharesExplorer` component to visualize mined shares with error handling and loading states. - Introduced `MinerCompare` component for comparing selected miner data with network averages. - Enhanced `MinerRow` component to display detailed information about each miner and their transactions. - Implemented `TransactionList` component to show transaction details with hover effects. - Added `TrendsTab` component with sub-tabs for hashrate, latency, and transaction activity. - Created utility functions and constants for managing time ranges and transaction data. - Established types for transactions, beads, and chart data points to improve type safety. * refactor: Update ActionIconButton styles and improve Header component layout * chore: update favicon.ico for improved branding * refactor: Replace IconButton with button in ActionIconButton and update favicon path in Header * refactor: Improve ActionIconButton styles and ensure icon scales correctly * refactor: Enhance ActionIconButton styles for improved layout and interaction * refactor: Standardize JSX formatting and improve code readability in Header component * refactor: Update MinedSharesExplorer to integrate EnhancedBlocksTab and remove unused components * refactor: Fix JSX structure in EnhancedBlocksTab for improved layout consistency * refactor: Clean up JSX structure in EnhancedBlocksTab and MinedSharesExplorer for improved readability * refactor: Update button styles and adjust layout in DashboardHeader for improved aesthetics * Refactor and clean up code in MinerDashboard components - Standardized import statements to use single quotes. - Improved formatting and readability of JSX elements. - Enhanced error handling and loading state management in MinedSharesExplorer. - Updated MinerCompare and TransactionList components for better state management. - Refactored constants and types for consistency and clarity. - Removed unnecessary comments and improved code structure. * feat: Dashboard frontend revamp (#148) * feat: Update the DAG component Increased node size Created ArrowHeads for links Highlighted the Hwpath Nodes are now plotted on both sides of the x-axis Added an option to view all cohorts Works with the latest simulator_api Signed-off-by: Abhishek <bumblebee31304@gmail.com> * fix: update cohort coloring logic by rotating array Signed-off-by: Abhishek <bumblebee31304@gmail.com> * fix: animate new and out-of-view links Signed-off-by: Abhishek <bumblebee31304@gmail.com> * fix: update useEffect for less re-renders Signed-off-by: Abhishek <bumblebee31304@gmail.com> * fix: update scale and add zoomIn-zoomOut Signed-off-by: Abhishek <bumblebee31304@gmail.com> * refactor: lint Signed-off-by: Abhishek <bumblebee31304@gmail.com> --------- Signed-off-by: Abhishek <bumblebee31304@gmail.com> * feat: add simulator api (#126) - add tests for the api - docs for tutorial about running the API - update requirements.txt for dependencies Signed-off-by: Abhishek <bumblebee31304@gmail.com> * Rewrite simulator_api to use ws, hex, and client script (#145) * Rewrite simulator_api to use ws, hex, and client script * Use asyncio websockets instead of Flask * Replace flask tests with websocket tests * Add websockets, remove flask dependencies * Clean up unused imports * Merge work from external repo into main Signed-off-by: Calisto Abel Mathias <calisto.mathias.25@gmail.com> * Update structs to reflect PPLNS and committed mempool --------- Signed-off-by: Abhishek <bumblebee31304@gmail.com> Signed-off-by: Bob McElrath <mcelrath@users.noreply.github.com> Signed-off-by: Calisto Abel Mathias <calisto.mathias.25@gmail.com> Signed-off-by: Aritra Majumder <aritramajumder8438@gmail.com> Signed-off-by: Calisto Mathias <calistomathias.work@gmail.com> Signed-off-by: priyashuu <priyaaashu4@gmail.com> Signed-off-by: sansh2356 <sansh2356@gmail.com> Co-authored-by: Abhishek <114338679+its-me-abhishek@users.noreply.github.com> Co-authored-by: sansh2356 <sansh2356@gmail.com> Co-authored-by: Calisto Abel Mathias <calisto.mathias.25@gmail.com> Co-authored-by: Aritra Majumder <aritramajumder8438@gmail.com> Co-authored-by: Calisto Mathias <calistomathias.work@gmail.com> Co-authored-by: David <david.borg.kevin321@gmail.com> Co-authored-by: Priya <150767072+priyashuu@users.noreply.github.com> Co-authored-by: Ansh <114384772+Sansh2356@users.noreply.github.com>
* patch: add dag visualisation and fix vite build Signed-off-by: Abhishek <bumblebee31304@gmail.com> * patch: update colors palette on DAG visualisation Signed-off-by: Abhishek <bumblebee31304@gmail.com> --------- Signed-off-by: Abhishek <bumblebee31304@gmail.com>
* feat: add simulator api (#126) - add tests for the api - docs for tutorial about running the API - update requirements.txt for dependencies Signed-off-by: Abhishek <bumblebee31304@gmail.com> * Small fix for requirements, logging (#127) * Update structs to reflect PPLNS and committed mempool (#119) * Update structs to reflect PPLNS and committed mempool Signed-off-by: Bob McElrath <mcelrath@users.noreply.github.com> * Replacing of field Signed-off-by: Bob McElrath <mcelrath@users.noreply.github.com> --------- Signed-off-by: Bob McElrath <mcelrath@users.noreply.github.com> Co-authored-by: sansh2356 <sansh2356@gmail.com> * Upgrade Cargo.lock for crossbeam-channel and tokio due to vulnerabilities (#130) https://github.com/braidpool/braidpool/security/dependabot/19 https://github.com/braidpool/braidpool/security/dependabot/20 Signed-off-by: Bob McElrath <mcelrath@users.noreply.github.com> * Rewrite simulator_api to use ws, hex, and client script (#145) * Rewrite simulator_api to use ws, hex, and client script * Use asyncio websockets instead of Flask * Replace flask tests with websocket tests * Add websockets, remove flask dependencies * Clean up unused imports * Refactor: Replace custom types with rust-bitcoin primitives - Removed all custom type definitions for blockchain-related structures. - Switched to using `rust-bitcoin` primitives for improved compatibility and maintainability. Signed-off-by: Calisto Abel Mathias <calisto.mathias.25@gmail.com> * Rename project and crate to braidpool-primitives - Updated the project name to `braidpool-primitives` to better reflect its purpose. - Renamed the crate in `Cargo.toml` to `braidpool-primitives`. Signed-off-by: Calisto Abel Mathias <calisto.mathias.25@gmail.com> * Refactor project structure and implement bead validation - Fixed the directory structure and updated `Cargo.toml` files to use workspaces properly. - Added `lib.rs` and other required files to enable successful Cargo builds. - Implemented functionality to check if a bead is valid. Signed-off-by: Calisto Abel Mathias <calisto.mathias.25@gmail.com> * Remove redundant curly braces xD Signed-off-by: Calisto Abel Mathias <calisto.mathias.25@gmail.com> * Remove redundant keywords Signed-off-by: Calisto Abel Mathias <calisto.mathias.25@gmail.com> * Remove redundant import in `beads.rs` Signed-off-by: Calisto Abel Mathias <calisto.mathias.25@gmail.com> * Add orphan bead support and database loading stub - Added initial support for managing orphan beads by introducing an in-memory orphan bead set. - Implemented a dummy function for loading beads from a database. - Made other trivial changes and minor improvements. Signed-off-by: Calisto Abel Mathias <calisto.mathias.25@gmail.com> * Add support for updating orphan bead set and bead checks - Implemented functionality to update the orphan bead set whenever a new bead is encountered. - Added all necessary checks for a bead, except for validity checking. Signed-off-by: Calisto Abel Mathias <calisto.mathias.25@gmail.com> * Add rustfmt to the code and format the whole codebase * Merge work from external repo into main Signed-off-by: Calisto Abel Mathias <calisto.mathias.25@gmail.com> * Remove redundant structs and rename definitions Signed-off-by: Calisto Abel Mathias <calisto.mathias.25@gmail.com> * Fix linting Signed-off-by: Aritra Majumder <aritramajumder8438@gmail.com> * Refactor beads.rs and add testing structure - Refactored `beads.rs` to improve code readability, maintainability, and modularity. - Organized public and private methods within the `Bead` struct. - Improved inline documentation and comments for better clarity. - Ensured proper separation of concerns in method implementations. - Added structure for unit tests and integration tests: - Created a `tests/braid_tests.rs` file for integration tests. - Established a foundation for testing the functionality of the `Bead` struct and related components. - Prepared placeholders for unit tests within the `#[cfg(test)]` module in `beads.rs`. - Updated project to ensure compatibility with the new testing structure. - Verified that the refactored code compiles and passes existing checks. - Ensured the workspace is ready for future test case additions. Signed-off-by: Calisto Mathias <calistomathias.work@gmail.com> * Fix rebase issues Signed-off-by: Calisto Mathias <calistomathias.work@gmail.com> * feat: add custom error type BeadLoadError for improved error handling This commit introduces the `BeadLoadError` enum to represent custom error types in the Braid module. The error type includes the following variants: - `BeadNotFound`: Indicates that a requested bead could not be found in memory or storage. - `InvalidBeadHash`: Represents an error when a bead hash is invalid or malformed. - `DatabaseError`: Captures errors related to database operations. Additionally: - Implemented the `fmt::Display` trait for `BeadLoadError` to provide human-readable error messages for each variant. - Implemented the `std::error::Error` trait for compatibility with Rust's error handling ecosystem. These changes enable more robust and descriptive error handling throughout the Braid module, making it easier to debug and manage errors in functions like `fetch_bead_from_memory` and other operations that may fail. Signed-off-by: Calisto Mathias <calistomathias.work@gmail.com> * Update `rustfmt.yml` to target all the branches (#105) * Update `rustfmt.yml` to target all the branches * Fix linting Signed-off-by: Aritra Majumder <aritramajumder8438@gmail.com> --------- Signed-off-by: Aritra Majumder <aritramajumder8438@gmail.com> * Add tests submodule for private function tests! Signed-off-by: Calisto Mathias <calistomathias.work@gmail.com> * feat: add load_bead_from_memory function with custom error handling This commit introduces the `load_bead_from_memory` function to retrieve a bead from memory, along with robust error handling using the custom `BeadLoadError` enum. Key changes: - Implemented the `load_bead_from_memory` function, which: - Accepts a `BeadHash` as input. - Returns a `Result<&Bead, BeadLoadError>`. - Returns `Ok(bead)` if the bead is found in `loaded_beads_in_memory`. - Returns `Err(BeadLoadError::BeadNotFound)` if the bead is not found. - Added a placeholder for future validation of bead hashes. This function improves the modularity and error handling of bead retrieval, making it easier to integrate with future database-related operations. Signed-off-by: Calisto Mathias <calistomathias.work@gmail.com> * feat: implement is_genesis_bead function with custom error handling This commit adds the `is_genesis_bead` function to the `Braid` struct, enabling the identification of genesis beads while incorporating robust error handling using the `BeadLoadError` enum. Key changes: - **`is_genesis_bead` function**: - Determines if a bead is a genesis bead by checking if it has no parents. - Iterates through the parents of a bead to verify if any parent bead has been pruned from memory. - Returns `Ok(true)` if the bead is a genesis bead or if any parent bead is missing (`BeadLoadError::BeadNotFound`). - Propagates other errors (e.g., `InvalidBeadHash`, `DatabaseError`) using the `?` operator. - **Integration with `load_bead_from_memory`**: - Utilizes the `load_bead_from_memory` function to retrieve beads from memory. - Handles errors returned by `load_bead_from_memory` to ensure proper error propagation. This implementation improves the functionality of the `Braid` module by providing a clear mechanism to identify genesis beads while leveraging the custom `BeadLoadError` enum for detailed error reporting. Signed-off-by: Calisto Mathias <calistomathias.work@gmail.com> * Run rustfmt on crate Signed-off-by: Calisto Mathias <calistomathias.work@gmail.com> * Fix typo Signed-off-by: Calisto Mathias <calistomathias.work@gmail.com> * fix: correct MerklePathProof hashing order for left and right leaf nodes This commit fixes the `MerklePathProof` implementation to ensure the correct hashing order is used when calculating the Merkle root for both left and right leaf nodes in the Merkle binary tree. 1. **Fix in `get_merkle_hashing_order`**: - Correctly handles the hashing order for both left and right leaf nodes. - For right leaf nodes (`is_right_leaf == true`): - The sibling hash from the `merkle_path` is added first. - The `transaction_hash` is added second. - The remaining hashes in the `merkle_path` are appended starting from index `1`. - For left leaf nodes (`is_right_leaf == false`): - The `transaction_hash` is added first. - The remaining hashes in the `merkle_path` are appended starting from index `0`. 2. **Improved Clarity**: - Introduced the `index_for_starting_the_copy` variable to clearly define where to start iterating over the `merkle_path` for appending additional hashes. - Ensures consistent and predictable behavior for both left and right leaf cases. 3. **Integration with `calculate_corresponding_merkle_root`**: - The `get_merkle_hashing_order` function is used to generate the correct hashing order. - The concatenated hashes are double-hashed using `Sha256d` to compute the Merkle root. - The resulting Merkle root is converted into a `TxMerkleNode` for compatibility with Bitcoin's data structures. - Fixes potential issues with incorrect Merkle root calculations when the transaction is a right leaf. - Ensures compatibility with Bitcoin's Merkle tree structure and hashing rules. - Improves code readability and maintainability by clearly separating the logic for left and right leaf nodes. - Add unit tests to verify the correctness of the Merkle root calculation for various Merkle tree configurations. - Optimize the hashing process for large Merkle paths if performance becomes a concern. Signed-off-by: Calisto Mathias <calistomathias.work@gmail.com> * Directory restructure Signed-off-by: Calisto Mathias <calistomathias.work@gmail.com> * Run rustfmt Signed-off-by: Calisto Mathias <calistomathias.work@gmail.com> * Dashboard Mockup: Implement responsive Braidpool data visualization and UI components (#120) * patch: add dag visualisation and fix vite build (#121) * patch: add dag visualisation and fix vite build Signed-off-by: Abhishek <bumblebee31304@gmail.com> * patch: update colors palette on DAG visualisation Signed-off-by: Abhishek <bumblebee31304@gmail.com> --------- Signed-off-by: Abhishek <bumblebee31304@gmail.com> * feat: Add Mined Shares Explorer and integrate with Dashboard (#122) * feat: Add Mined Shares Explorer and integrate with Dashboard - Added new component MinedSharesExplorer for displaying mined shares data. - Updated Dashboard to include a new route for MinedSharesExplorer. - Enhanced Dashboard with new navigation for Miner Stats. - Integrated Framer Motion for animations in MinedSharesExplorer and its components. - Implemented Filters and MinerTable components for better data representation. - Added Particles component for animated background effects. - Updated package.json to include new dependencies: framer-motion and lucide-react. - Configured Tailwind CSS for styling. - Added postcss configuration for Tailwind integration. - USed framer-motion and lucide-react -verified commits * refactor: Enhance MinerTable component with dynamic rendering and improved state management . * fix: Add missing line for data points rendering in MiningChart component Signed-off-by: priyashuu <priyaaashu4@gmail.com> * fix: Add missing newline for improved code readability in MinerTable component verified commit Signed-off-by: priyashuu <priyaaashu4@gmail.com> * Update transactionCount calculation in MinerTable component to sum transaction counts --------- Signed-off-by: priyashuu <priyaaashu4@gmail.com> * Refactor dashboard codebase (#124) * Update Readme Files (#131) * refactor: create components directories Signed-off-by: Abhishek <bumblebee31304@gmail.com> * refactor: create components directories Signed-off-by: Abhishek <bumblebee31304@gmail.com> * fix: replace localhost * feat: Add Mined Shares Explorer and integrate with Dashboard (#122) * feat: Add Mined Shares Explorer and integrate with Dashboard - Added new component MinedSharesExplorer for displaying mined shares data. - Updated Dashboard to include a new route for MinedSharesExplorer. - Enhanced Dashboard with new navigation for Miner Stats. - Integrated Framer Motion for animations in MinedSharesExplorer and its components. - Implemented Filters and MinerTable components for better data representation. - Added Particles component for animated background effects. - Updated package.json to include new dependencies: framer-motion and lucide-react. - Configured Tailwind CSS for styling. - Added postcss configuration for Tailwind integration. - USed framer-motion and lucide-react -verified commits * refactor: Enhance MinerTable component with dynamic rendering and improved state management . * fix: Add missing line for data points rendering in MiningChart component Signed-off-by: priyashuu <priyaaashu4@gmail.com> * fix: Add missing newline for improved code readability in MinerTable component verified commit Signed-off-by: priyashuu <priyaaashu4@gmail.com> * Update transactionCount calculation in MinerTable component to sum transaction counts --------- Signed-off-by: priyashuu <priyaaashu4@gmail.com> refactor: create components directories Signed-off-by: Abhishek <bumblebee31304@gmail.com> refactor: create components directories Signed-off-by: Abhishek <bumblebee31304@gmail.com> fix: replace localhost * docs: update the readme files for better dashboard information Signed-off-by: Abhishek <bumblebee31304@gmail.com> * docs: update the readme files for better dashboard information Signed-off-by: Abhishek <bumblebee31304@gmail.com> --------- Signed-off-by: Abhishek <bumblebee31304@gmail.com> Co-authored-by: Priya <150767072+priyashuu@users.noreply.github.com> * Updating the definitions for structs (#123) * Adding additional serde dependencies Signed-off-by: sansh2356 <sansh2356@gmail.com> * Updating the bead struct definations Signed-off-by: sansh2356 <sansh2356@gmail.com> * Unit test for serialization of bead struct Signed-off-by: sansh2356 <sansh2356@gmail.com> * Adding serialize and deserialize traits Signed-off-by: sansh2356 <sansh2356@gmail.com> * Update Readme Files (#131) * refactor: create components directories Signed-off-by: Abhishek <bumblebee31304@gmail.com> * refactor: create components directories Signed-off-by: Abhishek <bumblebee31304@gmail.com> * fix: replace localhost * feat: Add Mined Shares Explorer and integrate with Dashboard (#122) * feat: Add Mined Shares Explorer and integrate with Dashboard - Added new component MinedSharesExplorer for displaying mined shares data. - Updated Dashboard to include a new route for MinedSharesExplorer. - Enhanced Dashboard with new navigation for Miner Stats. - Integrated Framer Motion for animations in MinedSharesExplorer and its components. - Implemented Filters and MinerTable components for better data representation. - Added Particles component for animated background effects. - Updated package.json to include new dependencies: framer-motion and lucide-react. - Configured Tailwind CSS for styling. - Added postcss configuration for Tailwind integration. - USed framer-motion and lucide-react -verified commits * refactor: Enhance MinerTable component with dynamic rendering and improved state management . * fix: Add missing line for data points rendering in MiningChart component Signed-off-by: priyashuu <priyaaashu4@gmail.com> * fix: Add missing newline for improved code readability in MinerTable component verified commit Signed-off-by: priyashuu <priyaaashu4@gmail.com> * Update transactionCount calculation in MinerTable component to sum transaction counts --------- Signed-off-by: priyashuu <priyaaashu4@gmail.com> refactor: create components directories Signed-off-by: Abhishek <bumblebee31304@gmail.com> refactor: create components directories Signed-off-by: Abhishek <bumblebee31304@gmail.com> fix: replace localhost * docs: update the readme files for better dashboard information Signed-off-by: Abhishek <bumblebee31304@gmail.com> * docs: update the readme files for better dashboard information Signed-off-by: Abhishek <bumblebee31304@gmail.com> --------- Signed-off-by: Abhishek <bumblebee31304@gmail.com> Co-authored-by: Priya <150767072+priyashuu@users.noreply.github.com> * correcting the order and replacing the attributes to avoid hash cycle * Changing the attribute accessibility according to the updated definitions Signed-off-by: sansh2356 <sansh2356@gmail.com> --------- Signed-off-by: sansh2356 <sansh2356@gmail.com> Signed-off-by: Abhishek <bumblebee31304@gmail.com> Co-authored-by: Abhishek <114338679+its-me-abhishek@users.noreply.github.com> Co-authored-by: Priya <150767072+priyashuu@users.noreply.github.com> * docs: add contributing.md (#136) * feat: add prettier workflow (#137) Signed-off-by: Abhishek <bumblebee31304@gmail.com> * refactor: lint applied to each file on the frontend (#138) * refactor: lint applied to each file on the frontend Signed-off-by: Abhishek <bumblebee31304@gmail.com> * refactor: updated prettier rules Signed-off-by: Abhishek <bumblebee31304@gmail.com> * test: testing the githook Signed-off-by: Abhishek <bumblebee31304@gmail.com> --------- Signed-off-by: Abhishek <bumblebee31304@gmail.com> Co-authored-by: Bob McElrath <mcelrath@users.noreply.github.com> * feat: Implement chart data hooks and components for miner dashboard (#146) * feat: Implement chart data hooks and components for miner dashboard - Added `useChartData` hook to generate and manage chart data based on selected time ranges. - Created `useComparisonData` hook for comparing miner performance against a selected miner. - Developed `MinedSharesExplorer` component to visualize mined shares with error handling and loading states. - Introduced `MinerCompare` component for comparing selected miner data with network averages. - Enhanced `MinerRow` component to display detailed information about each miner and their transactions. - Implemented `TransactionList` component to show transaction details with hover effects. - Added `TrendsTab` component with sub-tabs for hashrate, latency, and transaction activity. - Created utility functions and constants for managing time ranges and transaction data. - Established types for transactions, beads, and chart data points to improve type safety. * refactor: Update ActionIconButton styles and improve Header component layout * chore: update favicon.ico for improved branding * refactor: Replace IconButton with button in ActionIconButton and update favicon path in Header * refactor: Improve ActionIconButton styles and ensure icon scales correctly * refactor: Enhance ActionIconButton styles for improved layout and interaction * refactor: Standardize JSX formatting and improve code readability in Header component * refactor: Update MinedSharesExplorer to integrate EnhancedBlocksTab and remove unused components * refactor: Fix JSX structure in EnhancedBlocksTab for improved layout consistency * refactor: Clean up JSX structure in EnhancedBlocksTab and MinedSharesExplorer for improved readability * refactor: Update button styles and adjust layout in DashboardHeader for improved aesthetics * Refactor and clean up code in MinerDashboard components - Standardized import statements to use single quotes. - Improved formatting and readability of JSX elements. - Enhanced error handling and loading state management in MinedSharesExplorer. - Updated MinerCompare and TransactionList components for better state management. - Refactored constants and types for consistency and clarity. - Removed unnecessary comments and improved code structure. * feat: Dashboard frontend revamp (#148) * feat: Update the DAG component Increased node size Created ArrowHeads for links Highlighted the Hwpath Nodes are now plotted on both sides of the x-axis Added an option to view all cohorts Works with the latest simulator_api Signed-off-by: Abhishek <bumblebee31304@gmail.com> * fix: update cohort coloring logic by rotating array Signed-off-by: Abhishek <bumblebee31304@gmail.com> * fix: animate new and out-of-view links Signed-off-by: Abhishek <bumblebee31304@gmail.com> * fix: update useEffect for less re-renders Signed-off-by: Abhishek <bumblebee31304@gmail.com> * fix: update scale and add zoomIn-zoomOut Signed-off-by: Abhishek <bumblebee31304@gmail.com> * refactor: lint Signed-off-by: Abhishek <bumblebee31304@gmail.com> --------- Signed-off-by: Abhishek <bumblebee31304@gmail.com> * feat: add simulator api (#126) - add tests for the api - docs for tutorial about running the API - update requirements.txt for dependencies Signed-off-by: Abhishek <bumblebee31304@gmail.com> * Rewrite simulator_api to use ws, hex, and client script (#145) * Rewrite simulator_api to use ws, hex, and client script * Use asyncio websockets instead of Flask * Replace flask tests with websocket tests * Add websockets, remove flask dependencies * Clean up unused imports * Merge work from external repo into main Signed-off-by: Calisto Abel Mathias <calisto.mathias.25@gmail.com> * Update structs to reflect PPLNS and committed mempool --------- Signed-off-by: Abhishek <bumblebee31304@gmail.com> Signed-off-by: Bob McElrath <mcelrath@users.noreply.github.com> Signed-off-by: Calisto Abel Mathias <calisto.mathias.25@gmail.com> Signed-off-by: Aritra Majumder <aritramajumder8438@gmail.com> Signed-off-by: Calisto Mathias <calistomathias.work@gmail.com> Signed-off-by: priyashuu <priyaaashu4@gmail.com> Signed-off-by: sansh2356 <sansh2356@gmail.com> Co-authored-by: Abhishek <114338679+its-me-abhishek@users.noreply.github.com> Co-authored-by: sansh2356 <sansh2356@gmail.com> Co-authored-by: Calisto Abel Mathias <calisto.mathias.25@gmail.com> Co-authored-by: Aritra Majumder <aritramajumder8438@gmail.com> Co-authored-by: Calisto Mathias <calistomathias.work@gmail.com> Co-authored-by: David <david.borg.kevin321@gmail.com> Co-authored-by: Priya <150767072+priyashuu@users.noreply.github.com> Co-authored-by: Ansh <114384772+Sansh2356@users.noreply.github.com>
* Refactor: Replace custom types with rust-bitcoin primitives - Removed all custom type definitions for blockchain-related structures. - Switched to using `rust-bitcoin` primitives for improved compatibility and maintainability. Signed-off-by: Calisto Abel Mathias <calisto.mathias.25@gmail.com> * Rename project and crate to braidpool-primitives - Updated the project name to `braidpool-primitives` to better reflect its purpose. - Renamed the crate in `Cargo.toml` to `braidpool-primitives`. Signed-off-by: Calisto Abel Mathias <calisto.mathias.25@gmail.com> * Refactor project structure and implement bead validation - Fixed the directory structure and updated `Cargo.toml` files to use workspaces properly. - Added `lib.rs` and other required files to enable successful Cargo builds. - Implemented functionality to check if a bead is valid. Signed-off-by: Calisto Abel Mathias <calisto.mathias.25@gmail.com> * Remove redundant curly braces xD Signed-off-by: Calisto Abel Mathias <calisto.mathias.25@gmail.com> * Remove redundant keywords Signed-off-by: Calisto Abel Mathias <calisto.mathias.25@gmail.com> * Remove redundant import in `beads.rs` Signed-off-by: Calisto Abel Mathias <calisto.mathias.25@gmail.com> * Add orphan bead support and database loading stub - Added initial support for managing orphan beads by introducing an in-memory orphan bead set. - Implemented a dummy function for loading beads from a database. - Made other trivial changes and minor improvements. Signed-off-by: Calisto Abel Mathias <calisto.mathias.25@gmail.com> * Add support for updating orphan bead set and bead checks - Implemented functionality to update the orphan bead set whenever a new bead is encountered. - Added all necessary checks for a bead, except for validity checking. Signed-off-by: Calisto Abel Mathias <calisto.mathias.25@gmail.com> * Add rustfmt to the code and format the whole codebase * Merge work from external repo into main Signed-off-by: Calisto Abel Mathias <calisto.mathias.25@gmail.com> * Remove redundant structs and rename definitions Signed-off-by: Calisto Abel Mathias <calisto.mathias.25@gmail.com> * Fix linting Signed-off-by: Aritra Majumder <aritramajumder8438@gmail.com> * Refactor beads.rs and add testing structure - Refactored `beads.rs` to improve code readability, maintainability, and modularity. - Organized public and private methods within the `Bead` struct. - Improved inline documentation and comments for better clarity. - Ensured proper separation of concerns in method implementations. - Added structure for unit tests and integration tests: - Created a `tests/braid_tests.rs` file for integration tests. - Established a foundation for testing the functionality of the `Bead` struct and related components. - Prepared placeholders for unit tests within the `#[cfg(test)]` module in `beads.rs`. - Updated project to ensure compatibility with the new testing structure. - Verified that the refactored code compiles and passes existing checks. - Ensured the workspace is ready for future test case additions. Signed-off-by: Calisto Mathias <calistomathias.work@gmail.com> * Fix rebase issues Signed-off-by: Calisto Mathias <calistomathias.work@gmail.com> * feat: add custom error type BeadLoadError for improved error handling This commit introduces the `BeadLoadError` enum to represent custom error types in the Braid module. The error type includes the following variants: - `BeadNotFound`: Indicates that a requested bead could not be found in memory or storage. - `InvalidBeadHash`: Represents an error when a bead hash is invalid or malformed. - `DatabaseError`: Captures errors related to database operations. Additionally: - Implemented the `fmt::Display` trait for `BeadLoadError` to provide human-readable error messages for each variant. - Implemented the `std::error::Error` trait for compatibility with Rust's error handling ecosystem. These changes enable more robust and descriptive error handling throughout the Braid module, making it easier to debug and manage errors in functions like `fetch_bead_from_memory` and other operations that may fail. Signed-off-by: Calisto Mathias <calistomathias.work@gmail.com> * Update `rustfmt.yml` to target all the branches (#105) * Update `rustfmt.yml` to target all the branches * Fix linting Signed-off-by: Aritra Majumder <aritramajumder8438@gmail.com> --------- Signed-off-by: Aritra Majumder <aritramajumder8438@gmail.com> * Add tests submodule for private function tests! Signed-off-by: Calisto Mathias <calistomathias.work@gmail.com> * feat: add load_bead_from_memory function with custom error handling This commit introduces the `load_bead_from_memory` function to retrieve a bead from memory, along with robust error handling using the custom `BeadLoadError` enum. Key changes: - Implemented the `load_bead_from_memory` function, which: - Accepts a `BeadHash` as input. - Returns a `Result<&Bead, BeadLoadError>`. - Returns `Ok(bead)` if the bead is found in `loaded_beads_in_memory`. - Returns `Err(BeadLoadError::BeadNotFound)` if the bead is not found. - Added a placeholder for future validation of bead hashes. This function improves the modularity and error handling of bead retrieval, making it easier to integrate with future database-related operations. Signed-off-by: Calisto Mathias <calistomathias.work@gmail.com> * feat: implement is_genesis_bead function with custom error handling This commit adds the `is_genesis_bead` function to the `Braid` struct, enabling the identification of genesis beads while incorporating robust error handling using the `BeadLoadError` enum. Key changes: - **`is_genesis_bead` function**: - Determines if a bead is a genesis bead by checking if it has no parents. - Iterates through the parents of a bead to verify if any parent bead has been pruned from memory. - Returns `Ok(true)` if the bead is a genesis bead or if any parent bead is missing (`BeadLoadError::BeadNotFound`). - Propagates other errors (e.g., `InvalidBeadHash`, `DatabaseError`) using the `?` operator. - **Integration with `load_bead_from_memory`**: - Utilizes the `load_bead_from_memory` function to retrieve beads from memory. - Handles errors returned by `load_bead_from_memory` to ensure proper error propagation. This implementation improves the functionality of the `Braid` module by providing a clear mechanism to identify genesis beads while leveraging the custom `BeadLoadError` enum for detailed error reporting. Signed-off-by: Calisto Mathias <calistomathias.work@gmail.com> * Run rustfmt on crate Signed-off-by: Calisto Mathias <calistomathias.work@gmail.com> * Fix typo Signed-off-by: Calisto Mathias <calistomathias.work@gmail.com> * fix: correct MerklePathProof hashing order for left and right leaf nodes This commit fixes the `MerklePathProof` implementation to ensure the correct hashing order is used when calculating the Merkle root for both left and right leaf nodes in the Merkle binary tree. 1. **Fix in `get_merkle_hashing_order`**: - Correctly handles the hashing order for both left and right leaf nodes. - For right leaf nodes (`is_right_leaf == true`): - The sibling hash from the `merkle_path` is added first. - The `transaction_hash` is added second. - The remaining hashes in the `merkle_path` are appended starting from index `1`. - For left leaf nodes (`is_right_leaf == false`): - The `transaction_hash` is added first. - The remaining hashes in the `merkle_path` are appended starting from index `0`. 2. **Improved Clarity**: - Introduced the `index_for_starting_the_copy` variable to clearly define where to start iterating over the `merkle_path` for appending additional hashes. - Ensures consistent and predictable behavior for both left and right leaf cases. 3. **Integration with `calculate_corresponding_merkle_root`**: - The `get_merkle_hashing_order` function is used to generate the correct hashing order. - The concatenated hashes are double-hashed using `Sha256d` to compute the Merkle root. - The resulting Merkle root is converted into a `TxMerkleNode` for compatibility with Bitcoin's data structures. - Fixes potential issues with incorrect Merkle root calculations when the transaction is a right leaf. - Ensures compatibility with Bitcoin's Merkle tree structure and hashing rules. - Improves code readability and maintainability by clearly separating the logic for left and right leaf nodes. - Add unit tests to verify the correctness of the Merkle root calculation for various Merkle tree configurations. - Optimize the hashing process for large Merkle paths if performance becomes a concern. Signed-off-by: Calisto Mathias <calistomathias.work@gmail.com> * Directory restructure Signed-off-by: Calisto Mathias <calistomathias.work@gmail.com> * Run rustfmt Signed-off-by: Calisto Mathias <calistomathias.work@gmail.com> * Dashboard Mockup: Implement responsive Braidpool data visualization and UI components (#120) * patch: add dag visualisation and fix vite build (#121) * patch: add dag visualisation and fix vite build Signed-off-by: Abhishek <bumblebee31304@gmail.com> * patch: update colors palette on DAG visualisation Signed-off-by: Abhishek <bumblebee31304@gmail.com> --------- Signed-off-by: Abhishek <bumblebee31304@gmail.com> * feat: Add Mined Shares Explorer and integrate with Dashboard (#122) * feat: Add Mined Shares Explorer and integrate with Dashboard - Added new component MinedSharesExplorer for displaying mined shares data. - Updated Dashboard to include a new route for MinedSharesExplorer. - Enhanced Dashboard with new navigation for Miner Stats. - Integrated Framer Motion for animations in MinedSharesExplorer and its components. - Implemented Filters and MinerTable components for better data representation. - Added Particles component for animated background effects. - Updated package.json to include new dependencies: framer-motion and lucide-react. - Configured Tailwind CSS for styling. - Added postcss configuration for Tailwind integration. - USed framer-motion and lucide-react -verified commits * refactor: Enhance MinerTable component with dynamic rendering and improved state management . * fix: Add missing line for data points rendering in MiningChart component Signed-off-by: priyashuu <priyaaashu4@gmail.com> * fix: Add missing newline for improved code readability in MinerTable component verified commit Signed-off-by: priyashuu <priyaaashu4@gmail.com> * Update transactionCount calculation in MinerTable component to sum transaction counts --------- Signed-off-by: priyashuu <priyaaashu4@gmail.com> * Refactor dashboard codebase (#124) * Update Readme Files (#131) * refactor: create components directories Signed-off-by: Abhishek <bumblebee31304@gmail.com> * refactor: create components directories Signed-off-by: Abhishek <bumblebee31304@gmail.com> * fix: replace localhost * feat: Add Mined Shares Explorer and integrate with Dashboard (#122) * feat: Add Mined Shares Explorer and integrate with Dashboard - Added new component MinedSharesExplorer for displaying mined shares data. - Updated Dashboard to include a new route for MinedSharesExplorer. - Enhanced Dashboard with new navigation for Miner Stats. - Integrated Framer Motion for animations in MinedSharesExplorer and its components. - Implemented Filters and MinerTable components for better data representation. - Added Particles component for animated background effects. - Updated package.json to include new dependencies: framer-motion and lucide-react. - Configured Tailwind CSS for styling. - Added postcss configuration for Tailwind integration. - USed framer-motion and lucide-react -verified commits * refactor: Enhance MinerTable component with dynamic rendering and improved state management . * fix: Add missing line for data points rendering in MiningChart component Signed-off-by: priyashuu <priyaaashu4@gmail.com> * fix: Add missing newline for improved code readability in MinerTable component verified commit Signed-off-by: priyashuu <priyaaashu4@gmail.com> * Update transactionCount calculation in MinerTable component to sum transaction counts --------- Signed-off-by: priyashuu <priyaaashu4@gmail.com> refactor: create components directories Signed-off-by: Abhishek <bumblebee31304@gmail.com> refactor: create components directories Signed-off-by: Abhishek <bumblebee31304@gmail.com> fix: replace localhost * docs: update the readme files for better dashboard information Signed-off-by: Abhishek <bumblebee31304@gmail.com> * docs: update the readme files for better dashboard information Signed-off-by: Abhishek <bumblebee31304@gmail.com> --------- Signed-off-by: Abhishek <bumblebee31304@gmail.com> Co-authored-by: Priya <150767072+priyashuu@users.noreply.github.com> * Updating the definitions for structs (#123) * Adding additional serde dependencies Signed-off-by: sansh2356 <sansh2356@gmail.com> * Updating the bead struct definations Signed-off-by: sansh2356 <sansh2356@gmail.com> * Unit test for serialization of bead struct Signed-off-by: sansh2356 <sansh2356@gmail.com> * Adding serialize and deserialize traits Signed-off-by: sansh2356 <sansh2356@gmail.com> * Update Readme Files (#131) * refactor: create components directories Signed-off-by: Abhishek <bumblebee31304@gmail.com> * refactor: create components directories Signed-off-by: Abhishek <bumblebee31304@gmail.com> * fix: replace localhost * feat: Add Mined Shares Explorer and integrate with Dashboard (#122) * feat: Add Mined Shares Explorer and integrate with Dashboard - Added new component MinedSharesExplorer for displaying mined shares data. - Updated Dashboard to include a new route for MinedSharesExplorer. - Enhanced Dashboard with new navigation for Miner Stats. - Integrated Framer Motion for animations in MinedSharesExplorer and its components. - Implemented Filters and MinerTable components for better data representation. - Added Particles component for animated background effects. - Updated package.json to include new dependencies: framer-motion and lucide-react. - Configured Tailwind CSS for styling. - Added postcss configuration for Tailwind integration. - USed framer-motion and lucide-react -verified commits * refactor: Enhance MinerTable component with dynamic rendering and improved state management . * fix: Add missing line for data points rendering in MiningChart component Signed-off-by: priyashuu <priyaaashu4@gmail.com> * fix: Add missing newline for improved code readability in MinerTable component verified commit Signed-off-by: priyashuu <priyaaashu4@gmail.com> * Update transactionCount calculation in MinerTable component to sum transaction counts --------- Signed-off-by: priyashuu <priyaaashu4@gmail.com> refactor: create components directories Signed-off-by: Abhishek <bumblebee31304@gmail.com> refactor: create components directories Signed-off-by: Abhishek <bumblebee31304@gmail.com> fix: replace localhost * docs: update the readme files for better dashboard information Signed-off-by: Abhishek <bumblebee31304@gmail.com> * docs: update the readme files for better dashboard information Signed-off-by: Abhishek <bumblebee31304@gmail.com> --------- Signed-off-by: Abhishek <bumblebee31304@gmail.com> Co-authored-by: Priya <150767072+priyashuu@users.noreply.github.com> * correcting the order and replacing the attributes to avoid hash cycle * Changing the attribute accessibility according to the updated definitions Signed-off-by: sansh2356 <sansh2356@gmail.com> --------- Signed-off-by: sansh2356 <sansh2356@gmail.com> Signed-off-by: Abhishek <bumblebee31304@gmail.com> Co-authored-by: Abhishek <114338679+its-me-abhishek@users.noreply.github.com> Co-authored-by: Priya <150767072+priyashuu@users.noreply.github.com> * docs: add contributing.md (#136) * feat: add prettier workflow (#137) Signed-off-by: Abhishek <bumblebee31304@gmail.com> * refactor: lint applied to each file on the frontend (#138) * refactor: lint applied to each file on the frontend Signed-off-by: Abhishek <bumblebee31304@gmail.com> * refactor: updated prettier rules Signed-off-by: Abhishek <bumblebee31304@gmail.com> * test: testing the githook Signed-off-by: Abhishek <bumblebee31304@gmail.com> --------- Signed-off-by: Abhishek <bumblebee31304@gmail.com> Co-authored-by: Bob McElrath <mcelrath@users.noreply.github.com> * feat: Implement chart data hooks and components for miner dashboard (#146) * feat: Implement chart data hooks and components for miner dashboard - Added `useChartData` hook to generate and manage chart data based on selected time ranges. - Created `useComparisonData` hook for comparing miner performance against a selected miner. - Developed `MinedSharesExplorer` component to visualize mined shares with error handling and loading states. - Introduced `MinerCompare` component for comparing selected miner data with network averages. - Enhanced `MinerRow` component to display detailed information about each miner and their transactions. - Implemented `TransactionList` component to show transaction details with hover effects. - Added `TrendsTab` component with sub-tabs for hashrate, latency, and transaction activity. - Created utility functions and constants for managing time ranges and transaction data. - Established types for transactions, beads, and chart data points to improve type safety. * refactor: Update ActionIconButton styles and improve Header component layout * chore: update favicon.ico for improved branding * refactor: Replace IconButton with button in ActionIconButton and update favicon path in Header * refactor: Improve ActionIconButton styles and ensure icon scales correctly * refactor: Enhance ActionIconButton styles for improved layout and interaction * refactor: Standardize JSX formatting and improve code readability in Header component * refactor: Update MinedSharesExplorer to integrate EnhancedBlocksTab and remove unused components * refactor: Fix JSX structure in EnhancedBlocksTab for improved layout consistency * refactor: Clean up JSX structure in EnhancedBlocksTab and MinedSharesExplorer for improved readability * refactor: Update button styles and adjust layout in DashboardHeader for improved aesthetics * Refactor and clean up code in MinerDashboard components - Standardized import statements to use single quotes. - Improved formatting and readability of JSX elements. - Enhanced error handling and loading state management in MinedSharesExplorer. - Updated MinerCompare and TransactionList components for better state management. - Refactored constants and types for consistency and clarity. - Removed unnecessary comments and improved code structure. * feat: Dashboard frontend revamp (#148) * feat: Update the DAG component Increased node size Created ArrowHeads for links Highlighted the Hwpath Nodes are now plotted on both sides of the x-axis Added an option to view all cohorts Works with the latest simulator_api Signed-off-by: Abhishek <bumblebee31304@gmail.com> * fix: update cohort coloring logic by rotating array Signed-off-by: Abhishek <bumblebee31304@gmail.com> * fix: animate new and out-of-view links Signed-off-by: Abhishek <bumblebee31304@gmail.com> * fix: update useEffect for less re-renders Signed-off-by: Abhishek <bumblebee31304@gmail.com> * fix: update scale and add zoomIn-zoomOut Signed-off-by: Abhishek <bumblebee31304@gmail.com> * refactor: lint Signed-off-by: Abhishek <bumblebee31304@gmail.com> --------- Signed-off-by: Abhishek <bumblebee31304@gmail.com> * Dev merge main (#152) * feat: add simulator api (#126) - add tests for the api - docs for tutorial about running the API - update requirements.txt for dependencies Signed-off-by: Abhishek <bumblebee31304@gmail.com> * Small fix for requirements, logging (#127) * Update structs to reflect PPLNS and committed mempool (#119) * Update structs to reflect PPLNS and committed mempool Signed-off-by: Bob McElrath <mcelrath@users.noreply.github.com> * Replacing of field Signed-off-by: Bob McElrath <mcelrath@users.noreply.github.com> --------- Signed-off-by: Bob McElrath <mcelrath@users.noreply.github.com> Co-authored-by: sansh2356 <sansh2356@gmail.com> * Upgrade Cargo.lock for crossbeam-channel and tokio due to vulnerabilities (#130) https://github.com/braidpool/braidpool/security/dependabot/19 https://github.com/braidpool/braidpool/security/dependabot/20 Signed-off-by: Bob McElrath <mcelrath@users.noreply.github.com> * Rewrite simulator_api to use ws, hex, and client script (#145) * Rewrite simulator_api to use ws, hex, and client script * Use asyncio websockets instead of Flask * Replace flask tests with websocket tests * Add websockets, remove flask dependencies * Clean up unused imports * Refactor: Replace custom types with rust-bitcoin primitives - Removed all custom type definitions for blockchain-related structures. - Switched to using `rust-bitcoin` primitives for improved compatibility and maintainability. Signed-off-by: Calisto Abel Mathias <calisto.mathias.25@gmail.com> * Rename project and crate to braidpool-primitives - Updated the project name to `braidpool-primitives` to better reflect its purpose. - Renamed the crate in `Cargo.toml` to `braidpool-primitives`. Signed-off-by: Calisto Abel Mathias <calisto.mathias.25@gmail.com> * Refactor project structure and implement bead validation - Fixed the directory structure and updated `Cargo.toml` files to use workspaces properly. - Added `lib.rs` and other required files to enable successful Cargo builds. - Implemented functionality to check if a bead is valid. Signed-off-by: Calisto Abel Mathias <calisto.mathias.25@gmail.com> * Remove redundant curly braces xD Signed-off-by: Calisto Abel Mathias <calisto.mathias.25@gmail.com> * Remove redundant keywords Signed-off-by: Calisto Abel Mathias <calisto.mathias.25@gmail.com> * Remove redundant import in `beads.rs` Signed-off-by: Calisto Abel Mathias <calisto.mathias.25@gmail.com> * Add orphan bead support and database loading stub - Added initial support for managing orphan beads by introducing an in-memory orphan bead set. - Implemented a dummy function for loading beads from a database. - Made other trivial changes and minor improvements. Signed-off-by: Calisto Abel Mathias <calisto.mathias.25@gmail.com> * Add support for updating orphan bead set and bead checks - Implemented functionality to update the orphan bead set whenever a new bead is encountered. - Added all necessary checks for a bead, except for validity checking. Signed-off-by: Calisto Abel Mathias <calisto.mathias.25@gmail.com> * Add rustfmt to the code and format the whole codebase * Merge work from external repo into main Signed-off-by: Calisto Abel Mathias <calisto.mathias.25@gmail.com> * Remove redundant structs and rename definitions Signed-off-by: Calisto Abel Mathias <calisto.mathias.25@gmail.com> * Fix linting Signed-off-by: Aritra Majumder <aritramajumder8438@gmail.com> * Refactor beads.rs and add testing structure - Refactored `beads.rs` to improve code readability, maintainability, and modularity. - Organized public and private methods within the `Bead` struct. - Improved inline documentation and comments for better clarity. - Ensured proper separation of concerns in method implementations. - Added structure for unit tests and integration tests: - Created a `tests/braid_tests.rs` file for integration tests. - Established a foundation for testing the functionality of the `Bead` struct and related components. - Prepared placeholders for unit tests within the `#[cfg(test)]` module in `beads.rs`. - Updated project to ensure compatibility with the new testing structure. - Verified that the refactored code compiles and passes existing checks. - Ensured the workspace is ready for future test case additions. Signed-off-by: Calisto Mathias <calistomathias.work@gmail.com> * Fix rebase issues Signed-off-by: Calisto Mathias <calistomathias.work@gmail.com> * feat: add custom error type BeadLoadError for improved error handling This commit introduces the `BeadLoadError` enum to represent custom error types in the Braid module. The error type includes the following variants: - `BeadNotFound`: Indicates that a requested bead could not be found in memory or storage. - `InvalidBeadHash`: Represents an error when a bead hash is invalid or malformed. - `DatabaseError`: Captures errors related to database operations. Additionally: - Implemented the `fmt::Display` trait for `BeadLoadError` to provide human-readable error messages for each variant. - Implemented the `std::error::Error` trait for compatibility with Rust's error handling ecosystem. These changes enable more robust and descriptive error handling throughout the Braid module, making it easier to debug and manage errors in functions like `fetch_bead_from_memory` and other operations that may fail. Signed-off-by: Calisto Mathias <calistomathias.work@gmail.com> * Update `rustfmt.yml` to target all the branches (#105) * Update `rustfmt.yml` to target all the branches * Fix linting Signed-off-by: Aritra Majumder <aritramajumder8438@gmail.com> --------- Signed-off-by: Aritra Majumder <aritramajumder8438@gmail.com> * Add tests submodule for private function tests! Signed-off-by: Calisto Mathias <calistomathias.work@gmail.com> * feat: add load_bead_from_memory function with custom error handling This commit introduces the `load_bead_from_memory` function to retrieve a bead from memory, along with robust error handling using the custom `BeadLoadError` enum. Key changes: - Implemented the `load_bead_from_memory` function, which: - Accepts a `BeadHash` as input. - Returns a `Result<&Bead, BeadLoadError>`. - Returns `Ok(bead)` if the bead is found in `loaded_beads_in_memory`. - Returns `Err(BeadLoadError::BeadNotFound)` if the bead is not found. - Added a placeholder for future validation of bead hashes. This function improves the modularity and error handling of bead retrieval, making it easier to integrate with future database-related operations. Signed-off-by: Calisto Mathias <calistomathias.work@gmail.com> * feat: implement is_genesis_bead function with custom error handling This commit adds the `is_genesis_bead` function to the `Braid` struct, enabling the identification of genesis beads while incorporating robust error handling using the `BeadLoadError` enum. Key changes: - **`is_genesis_bead` function**: - Determines if a bead is a genesis bead by checking if it has no parents. - Iterates through the parents of a bead to verify if any parent bead has been pruned from memory. - Returns `Ok(true)` if the bead is a genesis bead or if any parent bead is missing (`BeadLoadError::BeadNotFound`). - Propagates other errors (e.g., `InvalidBeadHash`, `DatabaseError`) using the `?` operator. - **Integration with `load_bead_from_memory`**: - Utilizes the `load_bead_from_memory` function to retrieve beads from memory. - Handles errors returned by `load_bead_from_memory` to ensure proper error propagation. This implementation improves the functionality of the `Braid` module by providing a clear mechanism to identify genesis beads while leveraging the custom `BeadLoadError` enum for detailed error reporting. Signed-off-by: Calisto Mathias <calistomathias.work@gmail.com> * Run rustfmt on crate Signed-off-by: Calisto Mathias <calistomathias.work@gmail.com> * Fix typo Signed-off-by: Calisto Mathias <calistomathias.work@gmail.com> * fix: correct MerklePathProof hashing order for left and right leaf nodes This commit fixes the `MerklePathProof` implementation to ensure the correct hashing order is used when calculating the Merkle root for both left and right leaf nodes in the Merkle binary tree. 1. **Fix in `get_merkle_hashing_order`**: - Correctly handles the hashing order for both left and right leaf nodes. - For right leaf nodes (`is_right_leaf == true`): - The sibling hash from the `merkle_path` is added first. - The `transaction_hash` is added second. - The remaining hashes in the `merkle_path` are appended starting from index `1`. - For left leaf nodes (`is_right_leaf == false`): - The `transaction_hash` is added first. - The remaining hashes in the `merkle_path` are appended starting from index `0`. 2. **Improved Clarity**: - Introduced the `index_for_starting_the_copy` variable to clearly define where to start iterating over the `merkle_path` for appending additional hashes. - Ensures consistent and predictable behavior for both left and right leaf cases. 3. **Integration with `calculate_corresponding_merkle_root`**: - The `get_merkle_hashing_order` function is used to generate the correct hashing order. - The concatenated hashes are double-hashed using `Sha256d` to compute the Merkle root. - The resulting Merkle root is converted into a `TxMerkleNode` for compatibility with Bitcoin's data structures. - Fixes potential issues with incorrect Merkle root calculations when the transaction is a right leaf. - Ensures compatibility with Bitcoin's Merkle tree structure and hashing rules. - Improves code readability and maintainability by clearly separating the logic for left and right leaf nodes. - Add unit tests to verify the correctness of the Merkle root calculation for various Merkle tree configurations. - Optimize the hashing process for large Merkle paths if performance becomes a concern. Signed-off-by: Calisto Mathias <calistomathias.work@gmail.com> * Directory restructure Signed-off-by: Calisto Mathias <calistomathias.work@gmail.com> * Run rustfmt Signed-off-by: Calisto Mathias <calistomathias.work@gmail.com> * Dashboard Mockup: Implement responsive Braidpool data visualization and UI components (#120) * patch: add dag visualisation and fix vite build (#121) * patch: add dag visualisation and fix vite build Signed-off-by: Abhishek <bumblebee31304@gmail.com> * patch: update colors palette on DAG visualisation Signed-off-by: Abhishek <bumblebee31304@gmail.com> --------- Signed-off-by: Abhishek <bumblebee31304@gmail.com> * feat: Add Mined Shares Explorer and integrate with Dashboard (#122) * feat: Add Mined Shares Explorer and integrate with Dashboard - Added new component MinedSharesExplorer for displaying mined shares data. - Updated Dashboard to include a new route for MinedSharesExplorer. - Enhanced Dashboard with new navigation for Miner Stats. - Integrated Framer Motion for animations in MinedSharesExplorer and its components. - Implemented Filters and MinerTable components for better data representation. - Added Particles component for animated background effects. - Updated package.json to include new dependencies: framer-motion and lucide-react. - Configured Tailwind CSS for styling. - Added postcss configuration for Tailwind integration. - USed framer-motion and lucide-react -verified commits * refactor: Enhance MinerTable component with dynamic rendering and improved state management . * fix: Add missing line for data points rendering in MiningChart component Signed-off-by: priyashuu <priyaaashu4@gmail.com> * fix: Add missing newline for improved code readability in MinerTable component verified commit Signed-off-by: priyashuu <priyaaashu4@gmail.com> * Update transactionCount calculation in MinerTable component to sum transaction counts --------- Signed-off-by: priyashuu <priyaaashu4@gmail.com> * Refactor dashboard codebase (#124) * Update Readme Files (#131) * refactor: create components directories Signed-off-by: Abhishek <bumblebee31304@gmail.com> * refactor: create components directories Signed-off-by: Abhishek <bumblebee31304@gmail.com> * fix: replace localhost * feat: Add Mined Shares Explorer and integrate with Dashboard (#122) * feat: Add Mined Shares Explorer and integrate with Dashboard - Added new component MinedSharesExplorer for displaying mined shares data. - Updated Dashboard to include a new route for MinedSharesExplorer. - Enhanced Dashboard with new navigation for Miner Stats. - Integrated Framer Motion for animations in MinedSharesExplorer and its components. - Implemented Filters and MinerTable components for better data representation. - Added Particles component for animated background effects. - Updated package.json to include new dependencies: framer-motion and lucide-react. - Configured Tailwind CSS for styling. - Added postcss configuration for Tailwind integration. - USed framer-motion and lucide-react -verified commits * refactor: Enhance MinerTable component with dynamic rendering and improved state management . * fix: Add missing line for data points rendering in MiningChart component Signed-off-by: priyashuu <priyaaashu4@gmail.com> * fix: Add missing newline for improved code readability in MinerTable component verified commit Signed-off-by: priyashuu <priyaaashu4@gmail.com> * Update transactionCount calculation in MinerTable component to sum transaction counts --------- Signed-off-by: priyashuu <priyaaashu4@gmail.com> refactor: create components directories Signed-off-by: Abhishek <bumblebee31304@gmail.com> refactor: create components directories Signed-off-by: Abhishek <bumblebee31304@gmail.com> fix: replace localhost * docs: update the readme files for better dashboard information Signed-off-by: Abhishek <bumblebee31304@gmail.com> * docs: update the readme files for better dashboard information Signed-off-by: Abhishek <bumblebee31304@gmail.com> --------- Signed-off-by: Abhishek <bumblebee31304@gmail.com> Co-authored-by: Priya <150767072+priyashuu@users.noreply.github.com> * Updating the definitions for structs (#123) * Adding additional serde dependencies Signed-off-by: sansh2356 <sansh2356@gmail.com> * Updating the bead struct definations Signed-off-by: sansh2356 <sansh2356@gmail.com> * Unit test for serialization of bead struct Signed-off-by: sansh2356 <sansh2356@gmail.com> * Adding serialize and deserialize traits Signed-off-by: sansh2356 <sansh2356@gmail.com> * Update Readme Files (#131) * refactor: create components directories Signed-off-by: Abhishek <bumblebee31304@gmail.com> * refactor: create components directories Signed-off-by: Abhishek <bumblebee31304@gmail.com> * fix: replace localhost * feat: Add Mined Shares Explorer and integrate with Dashboard (#122) * feat: Add Mined Shares Explorer and integrate with Dashboard - Added new component MinedSharesExplorer for displaying mined shares data. - Updated Dashboard to include a new route for MinedSharesExplorer. - Enhanced Dashboard with new navigation for Miner Stats. - Integrated Framer Motion for animations in MinedSharesExplorer and its components. - Implemented Filters and MinerTable components for better data representation. - Added Particles component for animated background effects. - Updated package.json to include new dependencies: framer-motion and lucide-react. - Configured Tailwind CSS for styling. - Added postcss configuration for Tailwind integration. - USed framer-motion and lucide-react -verified commits * refactor: Enhance MinerTable component with dynamic rendering and improved state management . * fix: Add missing line for data points rendering in MiningChart component Signed-off-by: priyashuu <priyaaashu4@gmail.com> * fix: Add missing newline for improved code readability in MinerTable component verified commit Signed-off-by: priyashuu <priyaaashu4@gmail.com> * Update transactionCount calculation in MinerTable component to sum transaction counts --------- Signed-off-by: priyashuu <priyaaashu4@gmail.com> refactor: create components directories Signed-off-by: Abhishek <bumblebee31304@gmail.com> refactor: create components directories Signed-off-by: Abhishek <bumblebee31304@gmail.com> fix: replace localhost * docs: update the readme files for better dashboard information Signed-off-by: Abhishek <bumblebee31304@gmail.com> * docs: update the readme files for better dashboard information Signed-off-by: Abhishek <bumblebee31304@gmail.com> --------- Signed-off-by: Abhishek <bumblebee31304@gmail.com> Co-authored-by: Priya <150767072+priyashuu@users.noreply.github.com> * correcting the order and replacing the attributes to avoid hash cycle * Changing the attribute accessibility according to the updated definitions Signed-off-by: sansh2356 <sansh2356@gmail.com> --------- Signed-off-by: sansh2356 <sansh2356@gmail.com> Signed-off-by: Abhishek <bumblebee31304@gmail.com> Co-authored-by: Abhishek <114338679+its-me-abhishek@users.noreply.github.com> Co-authored-by: Priya <150767072+priyashuu@users.noreply.github.com> * docs: add contributing.md (#136) * feat: add prettier workflow (#137) Signed-off-by: Abhishek <bumblebee31304@gmail.com> * refactor: lint applied to each file on the frontend (#138) * refactor: lint applied to each file on the frontend Signed-off-by: Abhishek <bumblebee31304@gmail.com> * refactor: updated prettier rules Signed-off-by: Abhishek <bumblebee31304@gmail.com> * test: testing the githook Signed-off-by: Abhishek <bumblebee31304@gmail.com> --------- Signed-off-by: Abhishek <bumblebee31304@gmail.com> Co-authored-by: Bob McElrath <mcelrath@users.noreply.github.com> * feat: Implement chart data hooks and components for miner dashboard (#146) * feat: Implement chart data hooks and components for miner dashboard - Added `useChartData` hook to generate and manage chart data based on selected time ranges. - Created `useComparisonData` hook for comparing miner performance against a selected miner. - Developed `MinedSharesExplorer` component to visualize mined shares with error handling and loading states. - Introduced `MinerCompare` component for comparing selected miner data with network averages. - Enhanced `MinerRow` component to display detailed information about each miner and their transactions. - Implemented `TransactionList` component to show transaction details with hover effects. - Added `TrendsTab` component with sub-tabs for hashrate, latency, and transaction activity. - Created utility functions and constants for managing time ranges and transaction data. - Established types for transactions, beads, and chart data points to improve type safety. * refactor: Update ActionIconButton styles and improve Header component layout * chore: update favicon.ico for improved branding * refactor: Replace IconButton with button in ActionIconButton and update favicon path in Header * refactor: Improve ActionIconButton styles and ensure icon scales correctly * refactor: Enhance ActionIconButton styles for improved layout and interaction * refactor: Standardize JSX formatting and improve code readability in Header component * refactor: Update MinedSharesExplorer to integrate EnhancedBlocksTab and remove unused components * refactor: Fix JSX structure in EnhancedBlocksTab for improved layout consistency * refactor: Clean up JSX structure in EnhancedBlocksTab and MinedSharesExplorer for improved readability * refactor: Update button styles and adjust layout in DashboardHeader for improved aesthetics * Refactor and clean up code in MinerDashboard components - Standardized import statements to use single quotes. - Improved formatting and readability of JSX elements. - Enhanced error handling and loading state management in MinedSharesExplorer. - Updated MinerCompare and TransactionList components for better state management. - Refactored constants and types for consistency and clarity. - Removed unnecessary comments and improved code structure. * feat: Dashboard frontend revamp (#148) * feat: Update the DAG component Increased node size Created ArrowHeads for links Highlighted the Hwpath Nodes are now plotted on both sides of the x-axis Added an option to view all cohorts Works with the latest simulator_api Signed-off-by: Abhishek <bumblebee31304@gmail.com> * fix: update cohort coloring logic by rotating array Signed-off-by: Abhishek <bumblebee31304@gmail.com> * fix: animate new and out-of-view links Signed-off-by: Abhishek <bumblebee31304@gmail.com> * fix: update useEffect for less re-renders Signed-off-by: Abhishek <bumblebee31304@gmail.com> * fix: update scale and add zoomIn-zoomOut Signed-off-by: Abhishek <bumblebee31304@gmail.com> * refactor: lint Signed-off-by: Abhishek <bumblebee31304@gmail.com> --------- Signed-off-by: Abhishek <bumblebee31304@gmail.com> * feat: add simulator api (#126) - add tests for the api - docs for tutorial about running the API - update requirements.txt for dependencies Signed-off-by: Abhishek <bumblebee31304@gmail.com> * Rewrite simulator_api to use ws, hex, and client script (#145) * Rewrite simulator_api to use ws, hex, and client script * Use asyncio websockets instead of Flask * Replace flask tests with websocket tests * Add websockets, remove flask dependencies * Clean up unused imports * Merge work from external repo into main Signed-off-by: Calisto Abel Mathias <calisto.mathias.25@gmail.com> * Update structs to reflect PPLNS and committed mempool --------- Signed-off-by: Abhishek <bumblebee31304@gmail.com> Signed-off-by: Bob McElrath <mcelrath@users.noreply.github.com> Signed-off-by: Calisto Abel Mathias <calisto.mathias.25@gmail.com> Signed-off-by: Aritra Majumder <aritramajumder8438@gmail.com> Signed-off-by: Calisto Mathias <calistomathias.work@gmail.com> Signed-off-by: priyashuu <priyaaashu4@gmail.com> Signed-off-by: sansh2356 <sansh2356@gmail.com> Co-authored-by: Abhishek <114338679+its-me-abhishek@users.noreply.github.com> Co-authored-by: sansh2356 <sansh2356@gmail.com> Co-authored-by: Calisto Abel Mathias <calisto.mathias.25@gmail.com> Co-authored-by: Aritra Majumder <aritramajumder8438@gmail.com> Co-authored-by: Calisto Mathias <calistomathias.work@gmail.com> Co-authored-by: David <david.borg.kevin321@gmail.com> Co-authored-by: Priya <150767072+priyashuu@users.noreply.github.com> Co-authored-by: Ansh <114384772+Sansh2356@users.noreply.github.com> * Dev merge main (#153) * feat: add simulator api (#126) - add tests for the api - docs for tutorial about running the API - update requirements.txt for dependencies Signed-off-by: Abhishek <bumblebee31304@gmail.com> * Small fix for requirements, logging (#127) * Update structs to reflect PPLNS and committed mempool (#119) * Update structs to reflect PPLNS and committed mempool Signed-off-by: Bob McElrath <mcelrath@users.noreply.github.com> * Replacing of field Signed-off-by: Bob McElrath <mcelrath@users.noreply.github.com> --------- Signed-off-by: Bob McElrath <mcelrath@users.noreply.github.com> Co-authored-by: sansh2356 <sansh2356@gmail.com> * Upgrade Cargo.lock for crossbeam-channel and tokio due to vulnerabilities (#130) https://github.com/braidpool/braidpool/security/dependabot/19 https://github.com/braidpool/braidpool/security/dependabot/20 Signed-off-by: Bob McElrath <mcelrath@users.noreply.github.com> * Rewrite simulator_api to use ws, hex, and client script (#145) * Rewrite simulator_api to use ws, hex, and client script * Use asyncio websockets instead of Flask * Replace flask tests with websocket tests * Add websockets, remove flask dependencies * Clean up unused imports --------- Signed-off-by: Abhishek <bumblebee31304@gmail.com> Signed-off-by: Bob McElrath <mcelrath@users.noreply.github.com> Co-authored-by: Abhishek <114338679+its-me-abhishek@users.noreply.github.com> Co-authored-by: sansh2356 <sansh2356@gmail.com> --------- Signed-off-by: Calisto Abel Mathias <calisto.mathias.25@gmail.com> Signed-off-by: Aritra Majumder <aritramajumder8438@gmail.com> Signed-off-by: Calisto Mathias <calistomathias.work@gmail.com> Signed-off-by: Abhishek <bumblebee31304@gmail.com> Signed-off-by: priyashuu <priyaaashu4@gmail.com> Signed-off-by: sansh2356 <sansh2356@gmail.com> Signed-off-by: Bob McElrath <mcelrath@users.noreply.github.com> Co-authored-by: Calisto Abel Mathias <calisto.mathias.25@gmail.com> Co-authored-by: Aritra Majumder <aritramajumder8438@gmail.com> Co-authored-by: Calisto Mathias <calistomathias.work@gmail.com> Co-authored-by: David <david.borg.kevin321@gmail.com> Co-authored-by: Abhishek <114338679+its-me-abhishek@users.noreply.github.com> Co-authored-by: Priya <150767072+priyashuu@users.noreply.github.com> Co-authored-by: Ansh <114384772+Sansh2356@users.noreply.github.com> Co-authored-by: sansh2356 <sansh2356@gmail.com>
* Refactor: Replace custom types with rust-bitcoin primitives - Removed all custom type definitions for blockchain-related structures. - Switched to using `rust-bitcoin` primitives for improved compatibility and maintainability. Signed-off-by: Calisto Abel Mathias <calisto.mathias.25@gmail.com> * Rename project and crate to braidpool-primitives - Updated the project name to `braidpool-primitives` to better reflect its purpose. - Renamed the crate in `Cargo.toml` to `braidpool-primitives`. Signed-off-by: Calisto Abel Mathias <calisto.mathias.25@gmail.com> * Refactor project structure and implement bead validation - Fixed the directory structure and updated `Cargo.toml` files to use workspaces properly. - Added `lib.rs` and other required files to enable successful Cargo builds. - Implemented functionality to check if a bead is valid. Signed-off-by: Calisto Abel Mathias <calisto.mathias.25@gmail.com> * Remove redundant curly braces xD Signed-off-by: Calisto Abel Mathias <calisto.mathias.25@gmail.com> * Remove redundant keywords Signed-off-by: Calisto Abel Mathias <calisto.mathias.25@gmail.com> * Remove redundant import in `beads.rs` Signed-off-by: Calisto Abel Mathias <calisto.mathias.25@gmail.com> * Add orphan bead support and database loading stub - Added initial support for managing orphan beads by introducing an in-memory orphan bead set. - Implemented a dummy function for loading beads from a database. - Made other trivial changes and minor improvements. Signed-off-by: Calisto Abel Mathias <calisto.mathias.25@gmail.com> * Add support for updating orphan bead set and bead checks - Implemented functionality to update the orphan bead set whenever a new bead is encountered. - Added all necessary checks for a bead, except for validity checking. Signed-off-by: Calisto Abel Mathias <calisto.mathias.25@gmail.com> * Add rustfmt to the code and format the whole codebase * Merge work from external repo into main Signed-off-by: Calisto Abel Mathias <calisto.mathias.25@gmail.com> * Remove redundant structs and rename definitions Signed-off-by: Calisto Abel Mathias <calisto.mathias.25@gmail.com> * Fix linting Signed-off-by: Aritra Majumder <aritramajumder8438@gmail.com> * Refactor beads.rs and add testing structure - Refactored `beads.rs` to improve code readability, maintainability, and modularity. - Organized public and private methods within the `Bead` struct. - Improved inline documentation and comments for better clarity. - Ensured proper separation of concerns in method implementations. - Added structure for unit tests and integration tests: - Created a `tests/braid_tests.rs` file for integration tests. - Established a foundation for testing the functionality of the `Bead` struct and related components. - Prepared placeholders for unit tests within the `#[cfg(test)]` module in `beads.rs`. - Updated project to ensure compatibility with the new testing structure. - Verified that the refactored code compiles and passes existing checks. - Ensured the workspace is ready for future test case additions. Signed-off-by: Calisto Mathias <calistomathias.work@gmail.com> * Fix rebase issues Signed-off-by: Calisto Mathias <calistomathias.work@gmail.com> * feat: add custom error type BeadLoadError for improved error handling This commit introduces the `BeadLoadError` enum to represent custom error types in the Braid module. The error type includes the following variants: - `BeadNotFound`: Indicates that a requested bead could not be found in memory or storage. - `InvalidBeadHash`: Represents an error when a bead hash is invalid or malformed. - `DatabaseError`: Captures errors related to database operations. Additionally: - Implemented the `fmt::Display` trait for `BeadLoadError` to provide human-readable error messages for each variant. - Implemented the `std::error::Error` trait for compatibility with Rust's error handling ecosystem. These changes enable more robust and descriptive error handling throughout the Braid module, making it easier to debug and manage errors in functions like `fetch_bead_from_memory` and other operations that may fail. Signed-off-by: Calisto Mathias <calistomathias.work@gmail.com> * Update `rustfmt.yml` to target all the branches (braidpool#105) * Update `rustfmt.yml` to target all the branches * Fix linting Signed-off-by: Aritra Majumder <aritramajumder8438@gmail.com> --------- Signed-off-by: Aritra Majumder <aritramajumder8438@gmail.com> * Add tests submodule for private function tests! Signed-off-by: Calisto Mathias <calistomathias.work@gmail.com> * feat: add load_bead_from_memory function with custom error handling This commit introduces the `load_bead_from_memory` function to retrieve a bead from memory, along with robust error handling using the custom `BeadLoadError` enum. Key changes: - Implemented the `load_bead_from_memory` function, which: - Accepts a `BeadHash` as input. - Returns a `Result<&Bead, BeadLoadError>`. - Returns `Ok(bead)` if the bead is found in `loaded_beads_in_memory`. - Returns `Err(BeadLoadError::BeadNotFound)` if the bead is not found. - Added a placeholder for future validation of bead hashes. This function improves the modularity and error handling of bead retrieval, making it easier to integrate with future database-related operations. Signed-off-by: Calisto Mathias <calistomathias.work@gmail.com> * feat: implement is_genesis_bead function with custom error handling This commit adds the `is_genesis_bead` function to the `Braid` struct, enabling the identification of genesis beads while incorporating robust error handling using the `BeadLoadError` enum. Key changes: - **`is_genesis_bead` function**: - Determines if a bead is a genesis bead by checking if it has no parents. - Iterates through the parents of a bead to verify if any parent bead has been pruned from memory. - Returns `Ok(true)` if the bead is a genesis bead or if any parent bead is missing (`BeadLoadError::BeadNotFound`). - Propagates other errors (e.g., `InvalidBeadHash`, `DatabaseError`) using the `?` operator. - **Integration with `load_bead_from_memory`**: - Utilizes the `load_bead_from_memory` function to retrieve beads from memory. - Handles errors returned by `load_bead_from_memory` to ensure proper error propagation. This implementation improves the functionality of the `Braid` module by providing a clear mechanism to identify genesis beads while leveraging the custom `BeadLoadError` enum for detailed error reporting. Signed-off-by: Calisto Mathias <calistomathias.work@gmail.com> * Run rustfmt on crate Signed-off-by: Calisto Mathias <calistomathias.work@gmail.com> * Fix typo Signed-off-by: Calisto Mathias <calistomathias.work@gmail.com> * fix: correct MerklePathProof hashing order for left and right leaf nodes This commit fixes the `MerklePathProof` implementation to ensure the correct hashing order is used when calculating the Merkle root for both left and right leaf nodes in the Merkle binary tree. 1. **Fix in `get_merkle_hashing_order`**: - Correctly handles the hashing order for both left and right leaf nodes. - For right leaf nodes (`is_right_leaf == true`): - The sibling hash from the `merkle_path` is added first. - The `transaction_hash` is added second. - The remaining hashes in the `merkle_path` are appended starting from index `1`. - For left leaf nodes (`is_right_leaf == false`): - The `transaction_hash` is added first. - The remaining hashes in the `merkle_path` are appended starting from index `0`. 2. **Improved Clarity**: - Introduced the `index_for_starting_the_copy` variable to clearly define where to start iterating over the `merkle_path` for appending additional hashes. - Ensures consistent and predictable behavior for both left and right leaf cases. 3. **Integration with `calculate_corresponding_merkle_root`**: - The `get_merkle_hashing_order` function is used to generate the correct hashing order. - The concatenated hashes are double-hashed using `Sha256d` to compute the Merkle root. - The resulting Merkle root is converted into a `TxMerkleNode` for compatibility with Bitcoin's data structures. - Fixes potential issues with incorrect Merkle root calculations when the transaction is a right leaf. - Ensures compatibility with Bitcoin's Merkle tree structure and hashing rules. - Improves code readability and maintainability by clearly separating the logic for left and right leaf nodes. - Add unit tests to verify the correctness of the Merkle root calculation for various Merkle tree configurations. - Optimize the hashing process for large Merkle paths if performance becomes a concern. Signed-off-by: Calisto Mathias <calistomathias.work@gmail.com> * Directory restructure Signed-off-by: Calisto Mathias <calistomathias.work@gmail.com> * Run rustfmt Signed-off-by: Calisto Mathias <calistomathias.work@gmail.com> * Dashboard Mockup: Implement responsive Braidpool data visualization and UI components (braidpool#120) * patch: add dag visualisation and fix vite build (braidpool#121) * patch: add dag visualisation and fix vite build Signed-off-by: Abhishek <bumblebee31304@gmail.com> * patch: update colors palette on DAG visualisation Signed-off-by: Abhishek <bumblebee31304@gmail.com> --------- Signed-off-by: Abhishek <bumblebee31304@gmail.com> * feat: Add Mined Shares Explorer and integrate with Dashboard (braidpool#122) * feat: Add Mined Shares Explorer and integrate with Dashboard - Added new component MinedSharesExplorer for displaying mined shares data. - Updated Dashboard to include a new route for MinedSharesExplorer. - Enhanced Dashboard with new navigation for Miner Stats. - Integrated Framer Motion for animations in MinedSharesExplorer and its components. - Implemented Filters and MinerTable components for better data representation. - Added Particles component for animated background effects. - Updated package.json to include new dependencies: framer-motion and lucide-react. - Configured Tailwind CSS for styling. - Added postcss configuration for Tailwind integration. - USed framer-motion and lucide-react -verified commits * refactor: Enhance MinerTable component with dynamic rendering and improved state management . * fix: Add missing line for data points rendering in MiningChart component Signed-off-by: priyashuu <priyaaashu4@gmail.com> * fix: Add missing newline for improved code readability in MinerTable component verified commit Signed-off-by: priyashuu <priyaaashu4@gmail.com> * Update transactionCount calculation in MinerTable component to sum transaction counts --------- Signed-off-by: priyashuu <priyaaashu4@gmail.com> * Refactor dashboard codebase (braidpool#124) * Update Readme Files (braidpool#131) * refactor: create components directories Signed-off-by: Abhishek <bumblebee31304@gmail.com> * refactor: create components directories Signed-off-by: Abhishek <bumblebee31304@gmail.com> * fix: replace localhost * feat: Add Mined Shares Explorer and integrate with Dashboard (braidpool#122) * feat: Add Mined Shares Explorer and integrate with Dashboard - Added new component MinedSharesExplorer for displaying mined shares data. - Updated Dashboard to include a new route for MinedSharesExplorer. - Enhanced Dashboard with new navigation for Miner Stats. - Integrated Framer Motion for animations in MinedSharesExplorer and its components. - Implemented Filters and MinerTable components for better data representation. - Added Particles component for animated background effects. - Updated package.json to include new dependencies: framer-motion and lucide-react. - Configured Tailwind CSS for styling. - Added postcss configuration for Tailwind integration. - USed framer-motion and lucide-react -verified commits * refactor: Enhance MinerTable component with dynamic rendering and improved state management . * fix: Add missing line for data points rendering in MiningChart component Signed-off-by: priyashuu <priyaaashu4@gmail.com> * fix: Add missing newline for improved code readability in MinerTable component verified commit Signed-off-by: priyashuu <priyaaashu4@gmail.com> * Update transactionCount calculation in MinerTable component to sum transaction counts --------- Signed-off-by: priyashuu <priyaaashu4@gmail.com> refactor: create components directories Signed-off-by: Abhishek <bumblebee31304@gmail.com> refactor: create components directories Signed-off-by: Abhishek <bumblebee31304@gmail.com> fix: replace localhost * docs: update the readme files for better dashboard information Signed-off-by: Abhishek <bumblebee31304@gmail.com> * docs: update the readme files for better dashboard information Signed-off-by: Abhishek <bumblebee31304@gmail.com> --------- Signed-off-by: Abhishek <bumblebee31304@gmail.com> Co-authored-by: Priya <150767072+priyashuu@users.noreply.github.com> * Updating the definitions for structs (braidpool#123) * Adding additional serde dependencies Signed-off-by: sansh2356 <sansh2356@gmail.com> * Updating the bead struct definations Signed-off-by: sansh2356 <sansh2356@gmail.com> * Unit test for serialization of bead struct Signed-off-by: sansh2356 <sansh2356@gmail.com> * Adding serialize and deserialize traits Signed-off-by: sansh2356 <sansh2356@gmail.com> * Update Readme Files (braidpool#131) * refactor: create components directories Signed-off-by: Abhishek <bumblebee31304@gmail.com> * refactor: create components directories Signed-off-by: Abhishek <bumblebee31304@gmail.com> * fix: replace localhost * feat: Add Mined Shares Explorer and integrate with Dashboard (braidpool#122) * feat: Add Mined Shares Explorer and integrate with Dashboard - Added new component MinedSharesExplorer for displaying mined shares data. - Updated Dashboard to include a new route for MinedSharesExplorer. - Enhanced Dashboard with new navigation for Miner Stats. - Integrated Framer Motion for animations in MinedSharesExplorer and its components. - Implemented Filters and MinerTable components for better data representation. - Added Particles component for animated background effects. - Updated package.json to include new dependencies: framer-motion and lucide-react. - Configured Tailwind CSS for styling. - Added postcss configuration for Tailwind integration. - USed framer-motion and lucide-react -verified commits * refactor: Enhance MinerTable component with dynamic rendering and improved state management . * fix: Add missing line for data points rendering in MiningChart component Signed-off-by: priyashuu <priyaaashu4@gmail.com> * fix: Add missing newline for improved code readability in MinerTable component verified commit Signed-off-by: priyashuu <priyaaashu4@gmail.com> * Update transactionCount calculation in MinerTable component to sum transaction counts --------- Signed-off-by: priyashuu <priyaaashu4@gmail.com> refactor: create components directories Signed-off-by: Abhishek <bumblebee31304@gmail.com> refactor: create components directories Signed-off-by: Abhishek <bumblebee31304@gmail.com> fix: replace localhost * docs: update the readme files for better dashboard information Signed-off-by: Abhishek <bumblebee31304@gmail.com> * docs: update the readme files for better dashboard information Signed-off-by: Abhishek <bumblebee31304@gmail.com> --------- Signed-off-by: Abhishek <bumblebee31304@gmail.com> Co-authored-by: Priya <150767072+priyashuu@users.noreply.github.com> * correcting the order and replacing the attributes to avoid hash cycle * Changing the attribute accessibility according to the updated definitions Signed-off-by: sansh2356 <sansh2356@gmail.com> --------- Signed-off-by: sansh2356 <sansh2356@gmail.com> Signed-off-by: Abhishek <bumblebee31304@gmail.com> Co-authored-by: Abhishek <114338679+its-me-abhishek@users.noreply.github.com> Co-authored-by: Priya <150767072+priyashuu@users.noreply.github.com> * docs: add contributing.md (braidpool#136) * feat: add prettier workflow (braidpool#137) Signed-off-by: Abhishek <bumblebee31304@gmail.com> * refactor: lint applied to each file on the frontend (braidpool#138) * refactor: lint applied to each file on the frontend Signed-off-by: Abhishek <bumblebee31304@gmail.com> * refactor: updated prettier rules Signed-off-by: Abhishek <bumblebee31304@gmail.com> * test: testing the githook Signed-off-by: Abhishek <bumblebee31304@gmail.com> --------- Signed-off-by: Abhishek <bumblebee31304@gmail.com> Co-authored-by: Bob McElrath <mcelrath@users.noreply.github.com> * feat: Implement chart data hooks and components for miner dashboard (braidpool#146) * feat: Implement chart data hooks and components for miner dashboard - Added `useChartData` hook to generate and manage chart data based on selected time ranges. - Created `useComparisonData` hook for comparing miner performance against a selected miner. - Developed `MinedSharesExplorer` component to visualize mined shares with error handling and loading states. - Introduced `MinerCompare` component for comparing selected miner data with network averages. - Enhanced `MinerRow` component to display detailed information about each miner and their transactions. - Implemented `TransactionList` component to show transaction details with hover effects. - Added `TrendsTab` component with sub-tabs for hashrate, latency, and transaction activity. - Created utility functions and constants for managing time ranges and transaction data. - Established types for transactions, beads, and chart data points to improve type safety. * refactor: Update ActionIconButton styles and improve Header component layout * chore: update favicon.ico for improved branding * refactor: Replace IconButton with button in ActionIconButton and update favicon path in Header * refactor: Improve ActionIconButton styles and ensure icon scales correctly * refactor: Enhance ActionIconButton styles for improved layout and interaction * refactor: Standardize JSX formatting and improve code readability in Header component * refactor: Update MinedSharesExplorer to integrate EnhancedBlocksTab and remove unused components * refactor: Fix JSX structure in EnhancedBlocksTab for improved layout consistency * refactor: Clean up JSX structure in EnhancedBlocksTab and MinedSharesExplorer for improved readability * refactor: Update button styles and adjust layout in DashboardHeader for improved aesthetics * Refactor and clean up code in MinerDashboard components - Standardized import statements to use single quotes. - Improved formatting and readability of JSX elements. - Enhanced error handling and loading state management in MinedSharesExplorer. - Updated MinerCompare and TransactionList components for better state management. - Refactored constants and types for consistency and clarity. - Removed unnecessary comments and improved code structure. * feat: Dashboard frontend revamp (braidpool#148) * feat: Update the DAG component Increased node size Created ArrowHeads for links Highlighted the Hwpath Nodes are now plotted on both sides of the x-axis Added an option to view all cohorts Works with the latest simulator_api Signed-off-by: Abhishek <bumblebee31304@gmail.com> * fix: update cohort coloring logic by rotating array Signed-off-by: Abhishek <bumblebee31304@gmail.com> * fix: animate new and out-of-view links Signed-off-by: Abhishek <bumblebee31304@gmail.com> * fix: update useEffect for less re-renders Signed-off-by: Abhishek <bumblebee31304@gmail.com> * fix: update scale and add zoomIn-zoomOut Signed-off-by: Abhishek <bumblebee31304@gmail.com> * refactor: lint Signed-off-by: Abhishek <bumblebee31304@gmail.com> --------- Signed-off-by: Abhishek <bumblebee31304@gmail.com> * Dev merge main (braidpool#152) * feat: add simulator api (braidpool#126) - add tests for the api - docs for tutorial about running the API - update requirements.txt for dependencies Signed-off-by: Abhishek <bumblebee31304@gmail.com> * Small fix for requirements, logging (braidpool#127) * Update structs to reflect PPLNS and committed mempool (braidpool#119) * Update structs to reflect PPLNS and committed mempool Signed-off-by: Bob McElrath <mcelrath@users.noreply.github.com> * Replacing of field Signed-off-by: Bob McElrath <mcelrath@users.noreply.github.com> --------- Signed-off-by: Bob McElrath <mcelrath@users.noreply.github.com> Co-authored-by: sansh2356 <sansh2356@gmail.com> * Upgrade Cargo.lock for crossbeam-channel and tokio due to vulnerabilities (braidpool#130) https://github.com/braidpool/braidpool/security/dependabot/19 https://github.com/braidpool/braidpool/security/dependabot/20 Signed-off-by: Bob McElrath <mcelrath@users.noreply.github.com> * Rewrite simulator_api to use ws, hex, and client script (braidpool#145) * Rewrite simulator_api to use ws, hex, and client script * Use asyncio websockets instead of Flask * Replace flask tests with websocket tests * Add websockets, remove flask dependencies * Clean up unused imports * Refactor: Replace custom types with rust-bitcoin primitives - Removed all custom type definitions for blockchain-related structures. - Switched to using `rust-bitcoin` primitives for improved compatibility and maintainability. Signed-off-by: Calisto Abel Mathias <calisto.mathias.25@gmail.com> * Rename project and crate to braidpool-primitives - Updated the project name to `braidpool-primitives` to better reflect its purpose. - Renamed the crate in `Cargo.toml` to `braidpool-primitives`. Signed-off-by: Calisto Abel Mathias <calisto.mathias.25@gmail.com> * Refactor project structure and implement bead validation - Fixed the directory structure and updated `Cargo.toml` files to use workspaces properly. - Added `lib.rs` and other required files to enable successful Cargo builds. - Implemented functionality to check if a bead is valid. Signed-off-by: Calisto Abel Mathias <calisto.mathias.25@gmail.com> * Remove redundant curly braces xD Signed-off-by: Calisto Abel Mathias <calisto.mathias.25@gmail.com> * Remove redundant keywords Signed-off-by: Calisto Abel Mathias <calisto.mathias.25@gmail.com> * Remove redundant import in `beads.rs` Signed-off-by: Calisto Abel Mathias <calisto.mathias.25@gmail.com> * Add orphan bead support and database loading stub - Added initial support for managing orphan beads by introducing an in-memory orphan bead set. - Implemented a dummy function for loading beads from a database. - Made other trivial changes and minor improvements. Signed-off-by: Calisto Abel Mathias <calisto.mathias.25@gmail.com> * Add support for updating orphan bead set and bead checks - Implemented functionality to update the orphan bead set whenever a new bead is encountered. - Added all necessary checks for a bead, except for validity checking. Signed-off-by: Calisto Abel Mathias <calisto.mathias.25@gmail.com> * Add rustfmt to the code and format the whole codebase * Merge work from external repo into main Signed-off-by: Calisto Abel Mathias <calisto.mathias.25@gmail.com> * Remove redundant structs and rename definitions Signed-off-by: Calisto Abel Mathias <calisto.mathias.25@gmail.com> * Fix linting Signed-off-by: Aritra Majumder <aritramajumder8438@gmail.com> * Refactor beads.rs and add testing structure - Refactored `beads.rs` to improve code readability, maintainability, and modularity. - Organized public and private methods within the `Bead` struct. - Improved inline documentation and comments for better clarity. - Ensured proper separation of concerns in method implementations. - Added structure for unit tests and integration tests: - Created a `tests/braid_tests.rs` file for integration tests. - Established a foundation for testing the functionality of the `Bead` struct and related components. - Prepared placeholders for unit tests within the `#[cfg(test)]` module in `beads.rs`. - Updated project to ensure compatibility with the new testing structure. - Verified that the refactored code compiles and passes existing checks. - Ensured the workspace is ready for future test case additions. Signed-off-by: Calisto Mathias <calistomathias.work@gmail.com> * Fix rebase issues Signed-off-by: Calisto Mathias <calistomathias.work@gmail.com> * feat: add custom error type BeadLoadError for improved error handling This commit introduces the `BeadLoadError` enum to represent custom error types in the Braid module. The error type includes the following variants: - `BeadNotFound`: Indicates that a requested bead could not be found in memory or storage. - `InvalidBeadHash`: Represents an error when a bead hash is invalid or malformed. - `DatabaseError`: Captures errors related to database operations. Additionally: - Implemented the `fmt::Display` trait for `BeadLoadError` to provide human-readable error messages for each variant. - Implemented the `std::error::Error` trait for compatibility with Rust's error handling ecosystem. These changes enable more robust and descriptive error handling throughout the Braid module, making it easier to debug and manage errors in functions like `fetch_bead_from_memory` and other operations that may fail. Signed-off-by: Calisto Mathias <calistomathias.work@gmail.com> * Update `rustfmt.yml` to target all the branches (braidpool#105) * Update `rustfmt.yml` to target all the branches * Fix linting Signed-off-by: Aritra Majumder <aritramajumder8438@gmail.com> --------- Signed-off-by: Aritra Majumder <aritramajumder8438@gmail.com> * Add tests submodule for private function tests! Signed-off-by: Calisto Mathias <calistomathias.work@gmail.com> * feat: add load_bead_from_memory function with custom error handling This commit introduces the `load_bead_from_memory` function to retrieve a bead from memory, along with robust error handling using the custom `BeadLoadError` enum. Key changes: - Implemented the `load_bead_from_memory` function, which: - Accepts a `BeadHash` as input. - Returns a `Result<&Bead, BeadLoadError>`. - Returns `Ok(bead)` if the bead is found in `loaded_beads_in_memory`. - Returns `Err(BeadLoadError::BeadNotFound)` if the bead is not found. - Added a placeholder for future validation of bead hashes. This function improves the modularity and error handling of bead retrieval, making it easier to integrate with future database-related operations. Signed-off-by: Calisto Mathias <calistomathias.work@gmail.com> * feat: implement is_genesis_bead function with custom error handling This commit adds the `is_genesis_bead` function to the `Braid` struct, enabling the identification of genesis beads while incorporating robust error handling using the `BeadLoadError` enum. Key changes: - **`is_genesis_bead` function**: - Determines if a bead is a genesis bead by checking if it has no parents. - Iterates through the parents of a bead to verify if any parent bead has been pruned from memory. - Returns `Ok(true)` if the bead is a genesis bead or if any parent bead is missing (`BeadLoadError::BeadNotFound`). - Propagates other errors (e.g., `InvalidBeadHash`, `DatabaseError`) using the `?` operator. - **Integration with `load_bead_from_memory`**: - Utilizes the `load_bead_from_memory` function to retrieve beads from memory. - Handles errors returned by `load_bead_from_memory` to ensure proper error propagation. This implementation improves the functionality of the `Braid` module by providing a clear mechanism to identify genesis beads while leveraging the custom `BeadLoadError` enum for detailed error reporting. Signed-off-by: Calisto Mathias <calistomathias.work@gmail.com> * Run rustfmt on crate Signed-off-by: Calisto Mathias <calistomathias.work@gmail.com> * Fix typo Signed-off-by: Calisto Mathias <calistomathias.work@gmail.com> * fix: correct MerklePathProof hashing order for left and right leaf nodes This commit fixes the `MerklePathProof` implementation to ensure the correct hashing order is used when calculating the Merkle root for both left and right leaf nodes in the Merkle binary tree. 1. **Fix in `get_merkle_hashing_order`**: - Correctly handles the hashing order for both left and right leaf nodes. - For right leaf nodes (`is_right_leaf == true`): - The sibling hash from the `merkle_path` is added first. - The `transaction_hash` is added second. - The remaining hashes in the `merkle_path` are appended starting from index `1`. - For left leaf nodes (`is_right_leaf == false`): - The `transaction_hash` is added first. - The remaining hashes in the `merkle_path` are appended starting from index `0`. 2. **Improved Clarity**: - Introduced the `index_for_starting_the_copy` variable to clearly define where to start iterating over the `merkle_path` for appending additional hashes. - Ensures consistent and predictable behavior for both left and right leaf cases. 3. **Integration with `calculate_corresponding_merkle_root`**: - The `get_merkle_hashing_order` function is used to generate the correct hashing order. - The concatenated hashes are double-hashed using `Sha256d` to compute the Merkle root. - The resulting Merkle root is converted into a `TxMerkleNode` for compatibility with Bitcoin's data structures. - Fixes potential issues with incorrect Merkle root calculations when the transaction is a right leaf. - Ensures compatibility with Bitcoin's Merkle tree structure and hashing rules. - Improves code readability and maintainability by clearly separating the logic for left and right leaf nodes. - Add unit tests to verify the correctness of the Merkle root calculation for various Merkle tree configurations. - Optimize the hashing process for large Merkle paths if performance becomes a concern. Signed-off-by: Calisto Mathias <calistomathias.work@gmail.com> * Directory restructure Signed-off-by: Calisto Mathias <calistomathias.work@gmail.com> * Run rustfmt Signed-off-by: Calisto Mathias <calistomathias.work@gmail.com> * Dashboard Mockup: Implement responsive Braidpool data visualization and UI components (braidpool#120) * patch: add dag visualisation and fix vite build (braidpool#121) * patch: add dag visualisation and fix vite build Signed-off-by: Abhishek <bumblebee31304@gmail.com> * patch: update colors palette on DAG visualisation Signed-off-by: Abhishek <bumblebee31304@gmail.com> --------- Signed-off-by: Abhishek <bumblebee31304@gmail.com> * feat: Add Mined Shares Explorer and integrate with Dashboard (braidpool#122) * feat: Add Mined Shares Explorer and integrate with Dashboard - Added new component MinedSharesExplorer for displaying mined shares data. - Updated Dashboard to include a new route for MinedSharesExplorer. - Enhanced Dashboard with new navigation for Miner Stats. - Integrated Framer Motion for animations in MinedSharesExplorer and its components. - Implemented Filters and MinerTable components for better data representation. - Added Particles component for animated background effects. - Updated package.json to include new dependencies: framer-motion and lucide-react. - Configured Tailwind CSS for styling. - Added postcss configuration for Tailwind integration. - USed framer-motion and lucide-react -verified commits * refactor: Enhance MinerTable component with dynamic rendering and improved state management . * fix: Add missing line for data points rendering in MiningChart component Signed-off-by: priyashuu <priyaaashu4@gmail.com> * fix: Add missing newline for improved code readability in MinerTable component verified commit Signed-off-by: priyashuu <priyaaashu4@gmail.com> * Update transactionCount calculation in MinerTable component to sum transaction counts --------- Signed-off-by: priyashuu <priyaaashu4@gmail.com> * Refactor dashboard codebase (braidpool#124) * Update Readme Files (braidpool#131) * refactor: create components directories Signed-off-by: Abhishek <bumblebee31304@gmail.com> * refactor: create components directories Signed-off-by: Abhishek <bumblebee31304@gmail.com> * fix: replace localhost * feat: Add Mined Shares Explorer and integrate with Dashboard (braidpool#122) * feat: Add Mined Shares Explorer and integrate with Dashboard - Added new component MinedSharesExplorer for displaying mined shares data. - Updated Dashboard to include a new route for MinedSharesExplorer. - Enhanced Dashboard with new navigation for Miner Stats. - Integrated Framer Motion for animations in MinedSharesExplorer and its components. - Implemented Filters and MinerTable components for better data representation. - Added Particles component for animated background effects. - Updated package.json to include new dependencies: framer-motion and lucide-react. - Configured Tailwind CSS for styling. - Added postcss configuration for Tailwind integration. - USed framer-motion and lucide-react -verified commits * refactor: Enhance MinerTable component with dynamic rendering and improved state management . * fix: Add missing line for data points rendering in MiningChart component Signed-off-by: priyashuu <priyaaashu4@gmail.com> * fix: Add missing newline for improved code readability in MinerTable component verified commit Signed-off-by: priyashuu <priyaaashu4@gmail.com> * Update transactionCount calculation in MinerTable component to sum transaction counts --------- Signed-off-by: priyashuu <priyaaashu4@gmail.com> refactor: create components directories Signed-off-by: Abhishek <bumblebee31304@gmail.com> refactor: create components directories Signed-off-by: Abhishek <bumblebee31304@gmail.com> fix: replace localhost * docs: update the readme files for better dashboard information Signed-off-by: Abhishek <bumblebee31304@gmail.com> * docs: update the readme files for better dashboard information Signed-off-by: Abhishek <bumblebee31304@gmail.com> --------- Signed-off-by: Abhishek <bumblebee31304@gmail.com> Co-authored-by: Priya <150767072+priyashuu@users.noreply.github.com> * Updating the definitions for structs (braidpool#123) * Adding additional serde dependencies Signed-off-by: sansh2356 <sansh2356@gmail.com> * Updating the bead struct definations Signed-off-by: sansh2356 <sansh2356@gmail.com> * Unit test for serialization of bead struct Signed-off-by: sansh2356 <sansh2356@gmail.com> * Adding serialize and deserialize traits Signed-off-by: sansh2356 <sansh2356@gmail.com> * Update Readme Files (braidpool#131) * refactor: create components directories Signed-off-by: Abhishek <bumblebee31304@gmail.com> * refactor: create components directories Signed-off-by: Abhishek <bumblebee31304@gmail.com> * fix: replace localhost * feat: Add Mined Shares Explorer and integrate with Dashboard (braidpool#122) * feat: Add Mined Shares Explorer and integrate with Dashboard - Added new component MinedSharesExplorer for displaying mined shares data. - Updated Dashboard to include a new route for MinedSharesExplorer. - Enhanced Dashboard with new navigation for Miner Stats. - Integrated Framer Motion for animations in MinedSharesExplorer and its components. - Implemented Filters and MinerTable components for better data representation. - Added Particles component for animated background effects. - Updated package.json to include new dependencies: framer-motion and lucide-react. - Configured Tailwind CSS for styling. - Added postcss configuration for Tailwind integration. - USed framer-motion and lucide-react -verified commits * refactor: Enhance MinerTable component with dynamic rendering and improved state management . * fix: Add missing line for data points rendering in MiningChart component Signed-off-by: priyashuu <priyaaashu4@gmail.com> * fix: Add missing newline for improved code readability in MinerTable component verified commit Signed-off-by: priyashuu <priyaaashu4@gmail.com> * Update transactionCount calculation in MinerTable component to sum transaction counts --------- Signed-off-by: priyashuu <priyaaashu4@gmail.com> refactor: create components directories Signed-off-by: Abhishek <bumblebee31304@gmail.com> refactor: create components directories Signed-off-by: Abhishek <bumblebee31304@gmail.com> fix: replace localhost * docs: update the readme files for better dashboard information Signed-off-by: Abhishek <bumblebee31304@gmail.com> * docs: update the readme files for better dashboard information Signed-off-by: Abhishek <bumblebee31304@gmail.com> --------- Signed-off-by: Abhishek <bumblebee31304@gmail.com> Co-authored-by: Priya <150767072+priyashuu@users.noreply.github.com> * correcting the order and replacing the attributes to avoid hash cycle * Changing the attribute accessibility according to the updated definitions Signed-off-by: sansh2356 <sansh2356@gmail.com> --------- Signed-off-by: sansh2356 <sansh2356@gmail.com> Signed-off-by: Abhishek <bumblebee31304@gmail.com> Co-authored-by: Abhishek <114338679+its-me-abhishek@users.noreply.github.com> Co-authored-by: Priya <150767072+priyashuu@users.noreply.github.com> * docs: add contributing.md (braidpool#136) * feat: add prettier workflow (braidpool#137) Signed-off-by: Abhishek <bumblebee31304@gmail.com> * refactor: lint applied to each file on the frontend (braidpool#138) * refactor: lint applied to each file on the frontend Signed-off-by: Abhishek <bumblebee31304@gmail.com> * refactor: updated prettier rules Signed-off-by: Abhishek <bumblebee31304@gmail.com> * test: testing the githook Signed-off-by: Abhishek <bumblebee31304@gmail.com> --------- Signed-off-by: Abhishek <bumblebee31304@gmail.com> Co-authored-by: Bob McElrath <mcelrath@users.noreply.github.com> * feat: Implement chart data hooks and components for miner dashboard (braidpool#146) * feat: Implement chart data hooks and components for miner dashboard - Added `useChartData` hook to generate and manage chart data based on selected time ranges. - Created `useComparisonData` hook for comparing miner performance against a selected miner. - Developed `MinedSharesExplorer` component to visualize mined shares with error handling and loading states. - Introduced `MinerCompare` component for comparing selected miner data with network averages. - Enhanced `MinerRow` component to display detailed information about each miner and their transactions. - Implemented `TransactionList` component to show transaction details with hover effects. - Added `TrendsTab` component with sub-tabs for hashrate, latency, and transaction activity. - Created utility functions and constants for managing time ranges and transaction data. - Established types for transactions, beads, and chart data points to improve type safety. * refactor: Update ActionIconButton styles and improve Header component layout * chore: update favicon.ico for improved branding * refactor: Replace IconButton with button in ActionIconButton and update favicon path in Header * refactor: Improve ActionIconButton styles and ensure icon scales correctly * refactor: Enhance ActionIconButton styles for improved layout and interaction * refactor: Standardize JSX formatting and improve code readability in Header component * refactor: Update MinedSharesExplorer to integrate EnhancedBlocksTab and remove unused components * refactor: Fix JSX structure in EnhancedBlocksTab for improved layout consistency * refactor: Clean up JSX structure in EnhancedBlocksTab and MinedSharesExplorer for improved readability * refactor: Update button styles and adjust layout in DashboardHeader for improved aesthetics * Refactor and clean up code in MinerDashboard components - Standardized import statements to use single quotes. - Improved formatting and readability of JSX elements. - Enhanced error handling and loading state management in MinedSharesExplorer. - Updated MinerCompare and TransactionList components for better state management. - Refactored constants and types for consistency and clarity. - Removed unnecessary comments and improved code structure. * feat: Dashboard frontend revamp (braidpool#148) * feat: Update the DAG component Increased node size Created ArrowHeads for links Highlighted the Hwpath Nodes are now plotted on both sides of the x-axis Added an option to view all cohorts Works with the latest simulator_api Signed-off-by: Abhishek <bumblebee31304@gmail.com> * fix: update cohort coloring logic by rotating array Signed-off-by: Abhishek <bumblebee31304@gmail.com> * fix: animate new and out-of-view links Signed-off-by: Abhishek <bumblebee31304@gmail.com> * fix: update useEffect for less re-renders Signed-off-by: Abhishek <bumblebee31304@gmail.com> * fix: update scale and add zoomIn-zoomOut Signed-off-by: Abhishek <bumblebee31304@gmail.com> * refactor: lint Signed-off-by: Abhishek <bumblebee31304@gmail.com> --------- Signed-off-by: Abhishek <bumblebee31304@gmail.com> * feat: add simulator api (braidpool#126) - add tests for the api - docs for tutorial about running the API - update requirements.txt for dependencies Signed-off-by: Abhishek <bumblebee31304@gmail.com> * Rewrite simulator_api to use ws, hex, and client script (braidpool#145) * Rewrite simulator_api to use ws, hex, and client script * Use asyncio websockets instead of Flask * Replace flask tests with websocket tests * Add websockets, remove flask dependencies * Clean up unused imports * Merge work from external repo into main Signed-off-by: Calisto Abel Mathias <calisto.mathias.25@gmail.com> * Update structs to reflect PPLNS and committed mempool --------- Signed-off-by: Abhishek <bumblebee31304@gmail.com> Signed-off-by: Bob McElrath <mcelrath@users.noreply.github.com> Signed-off-by: Calisto Abel Mathias <calisto.mathias.25@gmail.com> Signed-off-by: Aritra Majumder <aritramajumder8438@gmail.com> Signed-off-by: Calisto Mathias <calistomathias.work@gmail.com> Signed-off-by: priyashuu <priyaaashu4@gmail.com> Signed-off-by: sansh2356 <sansh2356@gmail.com> Co-authored-by: Abhishek <114338679+its-me-abhishek@users.noreply.github.com> Co-authored-by: sansh2356 <sansh2356@gmail.com> Co-authored-by: Calisto Abel Mathias <calisto.mathias.25@gmail.com> Co-authored-by: Aritra Majumder <aritramajumder8438@gmail.com> Co-authored-by: Calisto Mathias <calistomathias.work@gmail.com> Co-authored-by: David <david.borg.kevin321@gmail.com> Co-authored-by: Priya <150767072+priyashuu@users.noreply.github.com> Co-authored-by: Ansh <114384772+Sansh2356@users.noreply.github.com> * Dev merge main (braidpool#153) * feat: add simulator api (braidpool#126) - add tests for the api - docs for tutorial about running the API - update requirements.txt for dependencies Signed-off-by: Abhishek <bumblebee31304@gmail.com> * Small fix for requirements, logging (braidpool#127) * Update structs to reflect PPLNS and committed mempool (braidpool#119) * Update structs to reflect PPLNS and committed mempool Signed-off-by: Bob McElrath <mcelrath@users.noreply.github.com> * Replacing of field Signed-off-by: Bob McElrath <mcelrath@users.noreply.github.com> --------- Signed-off-by: Bob McElrath <mcelrath@users.noreply.github.com> Co-authored-by: sansh2356 <sansh2356@gmail.com> * Upgrade Cargo.lock for crossbeam-channel and tokio due to vulnerabilities (braidpool#130) https://github.com/braidpool/braidpool/security/dependabot/19 https://github.com/braidpool/braidpool/security/dependabot/20 Signed-off-by: Bob McElrath <mcelrath@users.noreply.github.com> * Rewrite simulator_api to use ws, hex, and client script (braidpool#145) * Rewrite simulator_api to use ws, hex, and client script * Use asyncio websockets instead of Flask * Replace flask tests with websocket tests * Add websockets, remove flask dependencies * Clean up unused imports --------- Signed-off-by: Abhishek <bumblebee31304@gmail.com> Signed-off-by: Bob McElrath <mcelrath@users.noreply.github.com> Co-authored-by: Abhishek <114338679+its-me-abhishek@users.noreply.github.com> Co-authored-by: sansh2356 <sansh2356@gmail.com> --------- Signed-off-by: Calisto Abel Mathias <calisto.mathias.25@gmail.com> Signed-off-by: Aritra Majumder <aritramajumder8438@gmail.com> Signed-off-by: Calisto Mathias <calistomathias.work@gmail.com> Signed-off-by: Abhishek <bumblebee31304@gmail.com> Signed-off-by: priyashuu <priyaaashu4@gmail.com> Signed-off-by: sansh2356 <sansh2356@gmail.com> Signed-off-by: Bob McElrath <mcelrath@users.noreply.github.com> Co-authored-by: Calisto Abel Mathias <calisto.mathias.25@gmail.com> Co-authored-by: Aritra Majumder <aritramajumder8438@gmail.com> Co-authored-by: Calisto Mathias <calistomathias.work@gmail.com> Co-authored-by: David <david.borg.kevin321@gmail.com> Co-authored-by: Abhishek <114338679+its-me-abhishek@users.noreply.github.com> Co-authored-by: Priya <150767072+priyashuu@users.noreply.github.com> Co-authored-by: Ansh <114384772+Sansh2356@users.noreply.github.com> Co-authored-by: sansh2356 <sansh2356@gmail.com>

integrn.mp4