99 Commits

Author SHA1 Message Date
oars
e641ac09f4 chore: fix rustdoc broken doc links and warnings 2026-01-04 15:13:27 +03:00
skoupidi
fcf4aded0e darkfid: split managemtn rpc methods into its own rpc server and standarized all ports 2026-01-02 19:41:34 +02:00
x
4f30aae91d doc: Update book links 2026-01-02 17:28:09 +00:00
x
fcdf5ee488 chore: Update crate dependencies 2026-01-01 19:48:04 +00:00
x
ed9be657ab serial: Bring it back home 2026-01-01 19:48:04 +00:00
x
9785777642 chore: Update copyright license year
Happy 2026!
2026-01-01 11:40:45 +00:00
skoupidi
c9c9a7a38a chore: fixed broken darkfid rpc blockchain.get_block clients requests 2025-12-29 19:25:27 +02:00
skoupidi
ecfebc2b71 chore: dropped minerd references 2025-12-29 15:38:12 +02:00
x
add9bb596c chore: Update crate dependencies 2025-12-25 12:22:56 +00:00
x
57717ecf3c Change block nonce to u32 2025-12-24 17:56:19 +00:00
skoupidi
5d47358902 chore: updated sled-overlay to new version 2025-12-24 14:01:20 +02:00
skoupidi
5d9bfe7507 chore: updated sled-overlay to new version 2025-12-22 16:09:09 +02:00
skoupidi
346a3517bd chore: updated sled-overlay to new version 2025-12-22 15:36:52 +02:00
skoupidi
82ac85872c chore: updated sled-overlay to new version 2025-12-22 14:37:17 +02:00
skoupidi
5943f2cd1e explorer/explorerd/error: removed unused import 2025-12-15 14:14:39 +02:00
skoupidi
621e704115 rust: set stable toolchain and clippy chore 2025-11-24 17:03:48 +02:00
x
aa537b9e4b chore: Update crate dependencies 2025-11-24 12:12:14 +02:00
x
a8ead9e5ea Revert "chore: updated blake3 init usage"
This reverts commit d8f4529c726955fccf90031caf71fd66b93c61d9.
2025-11-24 12:12:13 +02:00
skoupidi
98aef1f41f chore: updated blake3 init usage 2025-11-24 12:12:13 +02:00
oars
4b739963c6 bin/explorer/explorerd: replace simplelog with tracing-subscriber for setting up logger for tests
- replaced dynamic targets with static targets since tracing crate only supports setting static targets in the logger macros
2025-11-07 10:15:36 +03:00
oars
d85cf80dbf replace log imports with tracing everywhere 2025-11-07 10:15:36 +03:00
oars
ac0365cc60 Cargo.toml, Cargo.lock: change dependencies used for logging
- replace log crate with tracing,
- replace simple-log crate with tracing-subscriber and tracing-appender
- add nu-ansi-term crate as a dependency which is itself tracing-subscriber's dependency,
  inorder to write colored outputs to the terminal since we override formatting provided
  by tracing-subscriber
2025-11-07 10:15:36 +03:00
skoupidi
d0c49d24d0 chore: updated sled-overlay to new version 2025-10-24 12:58:55 +03:00
parazyd
fda2a84034 chore: Update dependencies 2025-08-05 09:41:05 +02:00
skoupidi
464258698d explorer: chore clippy 2025-06-28 17:16:20 +03:00
parazyd
2e2de47c69 v0.5.0 release 2025-06-06 13:50:10 +02:00
kalm
5cd8c6c035 explorer/site: run testnet and mainnet on WSGI server
This commit updates the explorer web app to run on a Gunicorn-based WSGI server for testnet and mainnet rather than the built-in dev server. In doing so, it provides for improved scalability, reliability, integration with Nginx, and flexible run configuration.

We’ve introduced a dedicated configuration file (gunicorn_config.py) allowing control over the number of worker processes and threads. By adjusting these values, we can handle more simultaneous requests, fine-tune performance based on CPU resources, and tweak other operational parameters to suit deployment needs.

Update Summary:
- Added gunicorn_config.py to configure bind address, workers, threads, pidfile, and logs
- Updated the testnet and mainnet ports to run on 8000 instead of the 5000 dev port
- Created wsgi.py to load and expose the Flask app via `create_app()`
- Updated requirements.txt to include Gunicorn dependency
- Modified makefile start-% target to start with Gunicorn for testnet/mainnet instead of the development server
- Adjusted stop task to stop Gunicorn server when stopping the explorer
- We updated the requirements.txt install to run quietly
- Updated Makefile to export LOG_HOME so it can be accessed by gunicorn_config.py
2025-05-26 15:34:10 -07:00
kalm
15fb9fd8ea explorerd/service/blocks: handle duplicate PoW coin errors after reorgs
This update introduces code to ensure blocks with PoW rewards containing coins already applied to the contract state prior to a reorg are synced. Additionally, it brings awareness to the need for rolling back the contract state to a specific height during reorgs.
2025-05-25 22:51:44 -07:00
kalm
18c2de1ca5 explorerd/service/blocks: fix reset_to_height get_by_range query and enhance debug logging
This fix adjusts the range query in `reset_to_height` to start from `reset_height + 1`, ensuring transactions from `reset_height` are excluded when deleting reset block transactions.

Summary of changes:
- Updated the `get_by_range` query to exclude `reset_height` transactions
- Enhanced debug statements to validate transaction deletions and associated block heights during reorgs
2025-05-25 21:26:15 -07:00
kalm
69854c6c3f explorerd/store/metrics: change logs informing insertion of metrics to debug
This commit replaces `info!` log statements with `debug!` for messages informing about the insertion of metrics in the MetricsStore.
2025-05-25 02:59:29 -07:00
kalm
dd94f6de93 explorerd: Add support for VERBOSE variable in makefile start-% targets
This commit adds support for the `$(VERBOSE)` variable in the `start-%` targets, allowing changing verbosity levels when starting the explorer node environment. The help message has also been updated to include more details.
2025-05-25 02:46:32 -07:00
kalm
3d01b5696d explorerd/main: enhance block subscription with retry mechanism when out of sync
This commit enhances subscription initialization to handle scenarios where the explorer database is out of sync with darkfid.

Summary of changes:
- Added "Blockchain not fully synced" error check during block subscription initialization
- Implemented a retry mechanism to resync blocks and reattempt the subscription process
2025-05-25 02:14:29 -07:00
parazyd
46d815ace0 chore: Update crate deps and freeze RandomX git rev 2025-05-21 15:01:54 +02:00
kalm
7e28c41aac explorerd: adjust log search for darkfid startup sync confirmation
This commit modifies the `wait_for_darkfid_startup` target in the Makefile to search for a later log message during darkfid startup. Results from testnet testing revealed that additional synchronization occurs before darkfid starts, necessitating a longer wait time is needed before starting explorerd.
2025-05-21 00:26:56 -07:00
kalm
fc79636cda explorerd/service: removed ducktape
This commit removes temp workaround while code was being updated to apply state changes to WASM runtime during block sync.
2025-05-19 00:50:52 -07:00
kalm
f03f5977b6 explorerd/service: enhance put_block and calculate_tx_gas_data to apply contract state changes, cleanup
This commit updates the `calculate_tx_gas_data` function to apply state changes during contract execution, enabling contract data availability for subsequent contract calls during block sync. Additionally, `put_block` was modified to apply PoW reward transactions to the WASM runtime, ensuring their effects are visible to transaction runtimes used for fee calculations where applicable.

Minor cleanup was performed.
2025-05-19 00:02:56 -07:00
skoupidi
a6fb5f8852 explorer/explorerd/service/transactions: duck taping until refactor 2025-05-18 14:37:09 +03:00
skoupidi
61c4b831e3 chore: updated sled-overlay to new version 2025-05-17 19:10:01 +03:00
parazyd
e002530bb2 chore: Update packages to v0.5.0 2025-05-09 11:32:44 +02:00
skoupidi
56546572e7 explorer/site/templates/block: fucking moron 2025-05-07 17:58:59 +03:00
skoupidi
c38e5f66a5 explorer/site/templates/block: missing pow type added 2025-05-07 17:56:16 +03:00
skoupidi
b054d403de blockchain: proof of work data enum added 2025-05-07 15:01:07 +03:00
skoupidi
be45acd927 chore: fixing my stupidity 2025-05-07 13:38:14 +03: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
skoupidi
c4f3b4eb11 chore: updated sled-overlay to new version 2025-04-25 14:47:40 +03:00
skoupidi
0d30a230fa chore: fmt 2025-04-15 12:28:08 +03: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
kalm
04209b29e2 explorerd/rpc: added test coverage for invalid/missing parameters
This commit expands the test suite by adding RPC tests that cover invalid/missing parameters, unsupported data types, unparsable inputs, and invalid numeric ranges. It also includes a test case to ensure `ping_darkfid` properly handles error when invoked under a disconnected darkfid endpoint.

New test modules include:
- **rpc/mod/tests**: Tests to ensure that `ping_darkfid` correctly handles non-empty parameters and scenarios where it is invoked with a disconnected darkfid endpoint
- **rpc/blocks/tests**: Tests verifying that invalid/missing parameters for fetching blocks produce the expected error responses
- **rpc/transaction/tests**: Tests confirming that incorrect/missing parameters for retrieving transactions are properly handled
- **rpc/contracts/tests**: Tests ensuring invalid/missing parameter handling for retrieving native contracts data
- **rpc/statistics/tests**: Tests confirming that invalid/missing parameters for retrieving statistics result in correct error handling

Other updates:
- Set the default test log level to 'Off' in test_mod.rs
- Removed the `TEST_DATA_DIR` constant until the test cases are updated to run on a copy of the test `explorerdb`
- Removed the `test_data/explorerd_0` folder until the test cases are updated to use a copy of the test `explorerdb`

Running Tests:

cargo test rpc
2025-03-24 06:53:45 -07:00