856 Commits

Author SHA1 Message Date
darkfi
fd2459ecef research/fft: alternative to finding extension fields containing root of unity 2025-05-15 15:17:33 +02:00
skoupidi
f1c7f9fcea darkfid: updated PoW target to 120 seconds 2025-05-12 15:49:34 +03:00
skoupidi
bf188be23e script/research/dam/damd/main: missing import added 2025-05-09 22:41:43 +03:00
skoupidi
ee0b139e45 script/research/powdata: moved into blockchain/monero 2025-05-07 10:32:39 +03:00
parazyd
9fa1476a0a research/powdata: Implement (de)serialization for MoneroPowData 2025-05-06 19:14:44 +02:00
skoupidi
7656bde63b blockchain: contracts states checksums monotree(smt) added 2025-05-06 16:28:40 +03:00
parazyd
81f37b7b2a chore: Update crate dependencies 2025-05-03 10:35:40 +02:00
parazyd
47f61789c6 research/powdata: Add temporary XMR PowData code to be included in blocks 2025-05-02 13:38:42 +02:00
parazyd
cb58bd5bd9 research: Remove obsolete stateroot code 2025-05-01 15:44:29 +02:00
darkfi
72b7c4e0da research/codes: minor fixes/improvements 2025-05-01 08:07:19 +02:00
skoupidi
c4f3b4eb11 chore: updated sled-overlay to new version 2025-04-25 14:47:40 +03:00
darkfi
5ed8b36310 research: algebraic codes 2025-04-20 10:25:34 +02:00
parazyd
6448058b24 research: Add example sparse Merkle tree for state checksums 2025-04-16 20:22:20 +02:00
darkfi
d27f5dfe4e app: completely rework text editing subsystem. initial draft version 2025-04-15 13:08:42 +02:00
parazyd
8c1b93c607 script/research: Lints 2025-04-15 11:13:56 +02:00
parazyd
c040d9c00f chore: Update crate dependencies 2025-04-15 10:49:43 +02:00
Paul Otten
721502a468 Move from "nightly" toolchain to "stable".
Intended to address tau RefID "Gifn1u".

There are still a few things that require nightly.
- cargo +nightly fmt
- fuzzing
2025-04-14 19:42:15 -04:00
darkfi
19386e4488 research/codes: algebraic codes 2025-04-11 21:11:32 +02:00
skoupidi
197147463a script/research/gg: added a Makefile and use smol instead of async-std 2025-04-04 20:07:40 +03:00
darkfi
af4d31870c speling: cummulative --> cumulative 2025-04-01 13:35:02 +03:00
skoupidi
6c02b4a450 net/message: optional metering infra for rate limitting added 2025-03-06 20:16:41 +02:00
darkfi
c7c551ce8a research/zk: circle-stark.sage 2025-03-02 21:42:33 +01:00
skoupidi
9a9917705f script/research/dam: better flood control 2025-03-01 16:36:25 +02:00
skoupidi
b27dec9b45 net/message: optional max message bytes limit added 2025-02-28 15:03:35 +02:00
parazyd
f5baac83cf chore: Update crate dependencies 2025-02-25 12:15:28 +01:00
skoupidi
c98d728f87 script/research/dam: sleep deprevation detected 2025-02-21 23:23:50 +02:00
skoupidi
4c7fe93cd4 script/research/dam: Denial-of-service Analysis Multitool added 2025-02-21 23:04:43 +02:00
skoupidi
d5b523a38f script/research/rlnd/rlnd: updated to new rpc impl 2025-02-21 16:21:10 +02:00
skoupidi
a671d43cee chore: fmt and fixed minor comments inconsistencies 2025-02-19 13:54:38 +02:00
darkfi
2bbe39e0ee use RpcSettings and RpcSettingsOpt 2025-02-19 13:21:12 +02:00
darkfi
a220243e56 script/node_get-info.py: handle RPC error responses 2025-02-19 13:21:12 +02:00
kalm
f852967618 explorer: move explorer source code from research to bin/explorer for project releases
This commit relocates the explorer code from the research directory to `bin/explorer` to include it as part of future releases.

### Summary of Updates:

#### Darkfi Project
- Updated `Cargo.toml` to include `bin/explorer/explorerd` as a workspace member
- Updated `Cargo.lock` to include the `explorerd` package
- Updated the `Makefile` to include `explorerd` in the build process

#### Explorer Daemon
- Renamed the project directory from `blockchain-explorer` to `explorer`
- Moved the explorer daemon source code to `bin/explorer/explorerd`
- Updated the cargo package name to `explorerd`
- Updated log statement targets from `blockchain-explorer::` to `explorerd::`
- Renamed the explorer configuration file to `explorerd_config.toml`
- Removed Halo2 patches as they are now included in the root package
- Changed default db_path to use explorerd instead of blockchain-explorer in the path
- Changed binary crate Arg structopt name from blockchain-explorer to explorerd

#### Explorer Site
- Moved the explorer site source code to `bin/explorer/site`
- Updated README.md to include new build instructions for explorerd
2025-02-18 03:49:44 -08:00
parazyd
92f0a8a97e research/sss: Fix Cargo.toml 2025-02-18 12:12:29 +01:00
parazyd
34d8671323 research/snowball: Fix code 2025-02-18 12:11:56 +01:00
parazyd
c8636de5ce research/pow: Make the code run again 2025-02-18 11:56:12 +01:00
parazyd
bce531d2ac research/pow: Fix Cargo.toml 2025-02-18 11:45:47 +01:00
parazyd
2f55e8e09d chore: Update RandomX to 1.2.1 2025-02-18 11:11:40 +01:00
kalm
ce5dc4988b explorer: integrate reorg handling with block subscription and subscription sync
This commit integrates blockchain reorg functionality into the explorer’s block syncing and subscriptions, addressing inconsistencies and aligning the explorer state with a Darkfi node. Key improvements include reorg detection and handling in block synchronization and subscriptions, consolidated and refined logging for better observability, state reset methods to reliably handle reorg scenarios, and enhanced safeguards to ensure consistency before starting subscriptions.

Summary of Updates:

## Blocks Module
- Added `get_block_by_height` to retrieve blocks by height to support reorg handling
- Added `reset_to_height` function to reset blocks and related transactions to a specific height, enabling transactional resets. This function was introduced because the blockchain layer's equivalent function could not be reused due to the absence of `StateDiffs` on the explorer side.
- Changed the log level of `reset_blocks` to `debug` to streamline reorg-related logging

## Transaction Module
- Changed the log level of `reset_blocks` to `debug` to streamline reorg-related logging

## Binary Crate (main.rs)
- Added `reset_explorer_state` to reset the explorer state to a given height or to genesis. This ensures consistency across blocks, transactions, and metrics during resets or reorgs
- Updated logging to include transaction count during ExplorerDb initialization

## Rpc Blocks Module
- Refined variable and function names with "darkfid" for improved readability

### Block Sync Reorgs
- Implemented block sync reorg handling to detect and resolve inconsistencies between the Darkfid node and the explorer
- Introduced reorg detection logic based on mismatched block hashes and heights
- Added support for handling reorg scenarios, including genesis related cases
- Extended logging to report detected reorgs and re-alignments
- Updated the `reset` flag handling to purge and resync the explorer state from scratch when enabled
- Added `process_sync_blocks_reorg` to identify mismatched blocks and realign the explorer's blockchain state to the correct height

## Subscription Sync Reorgs
- Added reorg handling in the subscription process to detect reorgs through block height mismatches and reset the explorer state as needed
- Improved safeguards against mismatched last synced and last confirmed blocks before initiating the subscription process

These updates provide explorer nodes the ability to handle blockchain reorgs and ensure alignment with the canonical chain from Darkfi nodes.
2025-02-17 23:03:06 -08:00
kalm
26f69b3e16 explorer/error: added handle_database_error function for reusable error handling
This change introduces a reusable function to format error messages, add target-specific logging context, and encapsulate errors into a `DatabaseError`.
2025-02-17 22:50:04 -08:00
kalm
f9baf96689 explorer/rpc: update logging for darkfid_daemon_request to trace level
Changed the logging level of `darkfid_daemon_request` from `debug` to `trace` to facilitate debugging, particularly during the synchronization of large amounts of blocks.
2025-02-17 22:29:42 -08:00
kalm
2a282d5ff4 explorer/site: Update transaction links on blocks page to use /tx/ path
This commit replaced the transaction link on the blocks page to use the `/tx/` path instead of `/transaction/`. This ensures the transaction URL aligns the updated transaction routing path.
2025-02-17 22:24:32 -08:00
kalm
5fe2593287 explorer/site: display empty metrics instead of "metrics not available" message
This commit updates the explorer UI to show empty metrics when no metrics are available, replacing the previous behavior of displaying a "Gas consumption details are not available" message.
2025-02-17 21:35:50 -08:00
G10h4ck
1a232e67ad chore: Fix python scripts shebang
Avoid python scripts "escaping" from venv
2025-02-17 12:14:14 +00:00
skoupidi
8f59a91e38 contract/money/genesis_mint: impl multiple outputs 2025-02-13 22:12:08 +02:00
camcui
bdfd5e08a8 chore: remove redundant words
Signed-off-by: camcui <cuishua@sina.cn>
2025-02-09 10:35:54 +01:00
parazyd
13620224c0 chore: Update crate dependencies 2025-02-09 10:32:33 +01:00
skoupidi
008a7520c3 script/research/blockchain-explorer: .gitignore updated 2025-02-08 20:59:32 +02:00
skoupidi
53b2993f38 script/research/rlnd: daemon for RLN state management added 2025-02-05 17:43:38 +02:00
parazyd
681a32cefc research/rlnv2: Implement RLN2-DIFF 2025-02-04 21:34:06 +01:00
parazyd
604f443fd1 chore: Update license header year 2025-01-24 10:36:02 +01:00