Skip to content

Commit c043484

Browse files
authored
Merge branch 'develop' into chore/update-docs_1721318026
2 parents 5b773d4 + c798615 commit c043484

File tree

3 files changed

+84
-7
lines changed

3 files changed

+84
-7
lines changed

CHANGELOG.md

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,12 @@ and this project adheres to the versioning scheme outlined in the [README.md](RE
77

88
## [Unreleased]
99

10-
- Added support for Clarity 3
10+
## [3.0.0.0.0]
11+
12+
### Added
13+
14+
- **Nakamoto consensus rules, activating in epoch 3.0 at block 867,867** (see [SIP-021](https://github.com/stacksgov/sips/blob/main/sips/sip-021/sip-021-nakamoto.md) for details)
15+
- Clarity 3, activating with epoch 3.0
1116
- Keywords / variable
1217
- `tenure-height` added
1318
- `stacks-block-height` added
@@ -16,10 +21,29 @@ and this project adheres to the versioning scheme outlined in the [README.md](RE
1621
- `get-stacks-block-info?` added
1722
- `get-tenure-info?` added
1823
- `get-block-info?` removed
19-
- Added `/v3/signer/{signer_pubkey}/{reward_cycle}` endpoint
20-
- Added `tenure_height` to `/v2/info` endpoint
21-
- Added optional `timeout_ms` to `events_observer` configuration
22-
- Added support for re-sending events to event observers across restarts
24+
- New RPC endpoints
25+
- `/v3/blocks/:block_id`
26+
- `/v3/blocks/upload/`
27+
- `/v3/signer/:signer_pubkey/:cycle_num`
28+
- `/v3/sortitions`
29+
- `/v3/stacker_set/:cycle_num`
30+
- `/v3/tenures/:block_id`
31+
- `/v3/tenures/fork_info/:start/:stop`
32+
- `/v3/tenures/info`
33+
- `/v3/tenures/tip/:consensus_hash`
34+
- Re-send events to event observers across restarts
35+
- Support custom chain-ids for testing
36+
- Add `replay-block` command to CLI
37+
38+
### Changed
39+
40+
- Strict config file validation (unknown fields will cause the node to fail to start)
41+
- Add optional `timeout_ms` to `events_observer` configuration
42+
- Modified RPC endpoints
43+
- Include `tenure_height` in `/v2/info` endpoint
44+
- Include `block_time` and `tenure_height` in `/new/block` event payload
45+
- Various improvements to logging, reducing log spam and improving log messages
46+
- Various improvements and bugfixes
2347

2448
## [2.5.0.0.7]
2549

stacks-signer/CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,24 @@ and this project adheres to the versioning scheme outlined in the [README.md](RE
1111

1212
### Changed
1313

14+
## [3.0.0.0.0]
15+
16+
### Added
17+
18+
- Improved StackerDB message structures
19+
- Improved mock signing during epoch 2.5
20+
- Include the `stacks-signer` binary version in startup logging and StackerDB messages
21+
- Added a `monitor-signers` CLI command for better visibility into other signers on the network
22+
- Support custom Chain ID in signer configuration
23+
- Refresh the signer's sortition view when it sees a block proposal for a new tenure
24+
- Fixed a race condition where a signer would try to update before StackerDB configuration was set
25+
26+
### Changed
27+
28+
- Migrate to new Stacks Node RPC endpoint `/v3/tenures/fork_info/:start/:stop`
29+
- Improved chainstate storage for handling of forks and other state
30+
- Updated prometheus metric labels to reduce high cardinality
31+
1432
## [2.5.0.0.5.3]
1533

1634
### Added

testnet/stacks-node/src/event_dispatcher.rs

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,42 @@ impl EventObserver {
355355
Ok(())
356356
}
357357

358+
/// Insert a payload into the database, retrying on failure.
359+
fn insert_payload_with_retry(
360+
conn: &Connection,
361+
url: &str,
362+
payload: &serde_json::Value,
363+
timeout: Duration,
364+
) {
365+
let mut attempts = 0i64;
366+
let mut backoff = Duration::from_millis(100); // Initial backoff duration
367+
let max_backoff = Duration::from_secs(5); // Cap the backoff duration
368+
369+
loop {
370+
match Self::insert_payload(conn, url, payload, timeout) {
371+
Ok(_) => {
372+
// Successful insert, break the loop
373+
return;
374+
}
375+
Err(err) => {
376+
// Log the error, then retry after a delay
377+
warn!("Failed to insert payload into event observer database: {:?}", err;
378+
"backoff" => ?backoff,
379+
"attempts" => attempts
380+
);
381+
382+
// Wait for the backoff duration
383+
sleep(backoff);
384+
385+
// Increase the backoff duration (with exponential backoff)
386+
backoff = std::cmp::min(backoff.saturating_mul(2), max_backoff);
387+
388+
attempts = attempts.saturating_add(1);
389+
}
390+
}
391+
}
392+
}
393+
358394
fn get_pending_payloads(
359395
conn: &Connection,
360396
) -> Result<Vec<(i64, String, serde_json::Value, u64)>, db_error> {
@@ -524,8 +560,7 @@ impl EventObserver {
524560
Connection::open(db_path).expect("Failed to open database for event observer");
525561

526562
// Insert the new payload into the database
527-
Self::insert_payload(&conn, &full_url, payload, self.timeout)
528-
.expect("Failed to insert payload into event observer database");
563+
Self::insert_payload_with_retry(&conn, &full_url, payload, self.timeout);
529564

530565
// Process all pending payloads
531566
Self::process_pending_payloads(&conn);

0 commit comments

Comments
 (0)