Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore/merge develop #5567

Open
wants to merge 251 commits into
base: feat/clarity-wasm-develop
Choose a base branch
from
Open
Changes from 3 commits
Commits
Show all changes
251 commits
Select commit Hold shift + click to select a range
8fe3394
test: add test for tenure-extend upon failed miner
obycode Nov 9, 2024
311ad50
feat: implement tenure-extend after bad sortition winner
obycode Nov 12, 2024
2a4a09b
feat: make signer accept tenure extend on bad sortition
obycode Nov 13, 2024
c294617
Merge branch 'develop' into feat/tenure-extend-no-blocks
obycode Nov 13, 2024
a56a73c
test: add `tenure_extend_after_bad_commit` to yaml file
obycode Nov 14, 2024
6438551
refactor: move the `StackerDBChannel` into the `EventDispatcher`
obycode Nov 14, 2024
4420c82
feat: add an index for block state
obycode Nov 14, 2024
3fa8116
docs: update changelogs
obycode Nov 14, 2024
0b3a2c1
Merge branch 'develop' into feat/tenure-extend-no-blocks
obycode Nov 14, 2024
df8f240
chore: improve comment about checking the parent tenure
obycode Nov 14, 2024
44769cf
test: add unit test for `SignerDb::get_canonical_tip`
obycode Nov 14, 2024
4c7c5aa
chore: remove unnecessary log
obycode Nov 14, 2024
a9acfa0
feat: simplify signerdb migration
obycode Nov 14, 2024
58fda00
chore: cleanup unused
obycode Nov 15, 2024
2178846
refactor: clean up `continue_tenure`
obycode Nov 15, 2024
d8140e0
refactor: `last_block_contains_tenure_change_tx`
obycode Nov 15, 2024
54c88c6
test: additional checks requested in PR review
obycode Nov 15, 2024
27a19cc
feat: add Epoch 3.1 and SIP-029 coinbase to go with it
jcnelson Nov 15, 2024
34f4374
chore: backfill Epoch31 match cases
jcnelson Nov 15, 2024
c53b024
Merge branch 'develop' into feat/sip-029
jcnelson Nov 15, 2024
4b1e3e5
chore: API sync
jcnelson Nov 15, 2024
ba2faf7
feat: add ability to disable tenure-extend for tests
obycode Nov 15, 2024
965f58b
fix: fix import for test-only feature
obycode Nov 15, 2024
cd5e7cc
refactor: add comments and improve naming
obycode Nov 15, 2024
198843e
chore: fix failing tests
jcnelson Nov 15, 2024
63617e9
Merge branch 'feat/sip-029' of https://github.com/stacks-network/stac…
jcnelson Nov 15, 2024
52e0d1f
Add tenure_extend_timestamp to Block Response Reject and Accept messages
jferrant Nov 15, 2024
9a327c4
Change to use u64::MAX in default value of tenure_extend_timestamp
jferrant Nov 15, 2024
9b4b89c
Fix failing test
jferrant Nov 15, 2024
4de3da9
Add timestamp calculation to all block responses
jferrant Nov 16, 2024
91be5cc
wip: integration tests for tenure extends
hstove Nov 16, 2024
012ed87
feat: add validation time to block proposal response
obycode Nov 18, 2024
de7b677
chore: make `validation_time_ms` a `u64`
obycode Nov 18, 2024
a8c09a1
Merge pull request #5466 from stacks-network/chore/add-timestamp-to-b…
aldur Nov 18, 2024
9308df9
Merge pull request #5474 from stacks-network/feat/update-block-valida…
obycode Nov 18, 2024
f1c442a
Merge branch 'feat/time-based-tenure-extend' of https://github.com/st…
jferrant Nov 18, 2024
510a12f
Use timestamp of known globally accepted blocks to determine tenure s…
jferrant Nov 18, 2024
132b759
Do not use sortition state when responding to a specific block proposal
jferrant Nov 18, 2024
ca8f4e3
Update testing directive rejection to use correct tenure extend times…
jferrant Nov 18, 2024
32d7808
Fix comment on validaiton_time_ms
jferrant Nov 18, 2024
7f6e5fc
Merge branch 'feat/tenure-extend-no-blocks' into feat/miner-tenure-ex…
obycode Nov 18, 2024
562982c
Use tenure extend timestamp to determine if enough time has passed fo…
jferrant Nov 18, 2024
89eaa85
Test: add extra logging for help with CI
jferrant Nov 18, 2024
0075c40
Merge remote-tracking branch 'origin/chore/calc-tenure-idle-timestamp…
hstove Nov 18, 2024
9eeb3e8
CRC: add comment about get globally accepted blocks in descending order
jferrant Nov 18, 2024
e138c37
Merge pull request #5470 from stacks-network/chore/calc-tenure-idle-t…
jferrant Nov 18, 2024
7568bf5
chore: bugfixes and SIP-029 integration test
jcnelson Nov 18, 2024
bbbbed6
Merge branch 'feat/time-based-tenure-extend' of https://github.com/st…
jferrant Nov 19, 2024
1665a1a
CRC: fix typo in comment
jferrant Nov 19, 2024
4b77c10
Miner forking test fix attempt
jferrant Nov 19, 2024
4b60084
Merge pull request #5478 from stacks-network/feat/signers-allow-time-…
jferrant Nov 19, 2024
d36c548
Merge branch 'develop' into feat/sip-029
jcnelson Nov 19, 2024
5c7ab3a
Merge branch 'feat/time-based-tenure-extend' of https://github.com/st…
jferrant Nov 19, 2024
e4aa013
Merge branch 'develop' into feat/sip-029
jcnelson Nov 19, 2024
abfe0aa
chore: remove testing output
jcnelson Nov 19, 2024
c361f1d
Merge branch 'develop' into feat/time-based-tenure-extend
obycode Nov 20, 2024
3297863
Merge branch 'feat/time-based-tenure-extend' into feat/miner-tenure-e…
obycode Nov 20, 2024
3519c7f
feat: add artificial delay to block validation processing time
hstove Nov 20, 2024
3401b03
chore: remove accidentally-added files
jcnelson Nov 20, 2024
7b62238
chore: fix merge bug
jcnelson Nov 20, 2024
5fbe0af
chore: cargo fmt
jcnelson Nov 20, 2024
28d0224
Merge branch 'develop' into feat/sip-029
jcnelson Nov 20, 2024
79ea227
chore: PR feedback
jcnelson Nov 20, 2024
0177bbf
Merge branch 'feat/sip-029' of https://github.com/stacks-network/stac…
jcnelson Nov 20, 2024
2c28e16
Ignore bootcode contract call and stx transfer only blocks in process…
jferrant Nov 20, 2024
4311015
feat: use versioned signer message data
hstove Nov 21, 2024
b6cf238
CRC: small optimization to 0 out the validation time of ignored blocks
jferrant Nov 21, 2024
f0228c9
feat: move sign coordinator logic into its own thread
obycode Nov 21, 2024
f486e55
chore: fix failing integration tests
jcnelson Nov 21, 2024
e13ba06
make a smaller table for easier retrieval of the timestamp calculation
jferrant Nov 21, 2024
f305147
Only migrate the most recent reward cycle data (from the current and …
jferrant Nov 21, 2024
71dd856
Make tenure_blocks insertion a trigger for blocks
jferrant Nov 21, 2024
4896d70
fix: max possible size for deserializing block response data
hstove Nov 22, 2024
38e3ef0
feat: unit test using older version of BlockAccepted to verify deseri…
hstove Nov 22, 2024
02a3bd0
Merge branch 'develop' into feat/sip-029
jcnelson Nov 22, 2024
59e74ac
Merge pull request #5488 from stacks-network/chore/ignore-stx-transfe…
obycode Nov 22, 2024
bec947a
Merge branch 'feat/time-based-tenure-extend' of https://github.com/st…
jferrant Nov 22, 2024
c8a0f95
CRC: fix broken test build and add is_zero helper fn and check for ex…
jferrant Nov 22, 2024
78bcf0a
Merge pull request #5489 from stacks-network/feat/block-response-data…
hstove Nov 22, 2024
8d9cd35
Merge remote-tracking branch 'origin/feat/time-based-tenure-extend' i…
hstove Nov 22, 2024
6a848e3
chore: add wip tests to bitcoin-tests
hstove Nov 22, 2024
04270d7
feat: add timeout and additional checks in `get_block_status`
obycode Nov 22, 2024
eddada4
Merge branch 'feat/time-based-tenure-extend' into feat/miner-tenure-e…
obycode Nov 22, 2024
f92c819
chore: `SignerDBListener` -> `StackerDBListener`
obycode Nov 22, 2024
cf540a5
ifix: resolve merge errors
obycode Nov 22, 2024
aea205b
chore: finish rename
obycode Nov 22, 2024
9f86cfa
miner auto-set mining key as node.seed
ASuciuX Nov 22, 2024
bd5199b
import to_hex
ASuciuX Nov 22, 2024
d173d98
fix: replace the channel receiver when the listener stops
obycode Nov 22, 2024
a21fa4d
feat: shutdown stacker db listener with miner
obycode Nov 25, 2024
c99a210
Merge branch 'develop' into feat/sip-029
jcnelson Nov 25, 2024
ab0807e
chore: return okay when exit is requested
obycode Nov 25, 2024
5d516a8
fix: drop lock in `propose_block`
obycode Nov 26, 2024
1a67a1c
feat: extend tenure based on time
obycode Nov 26, 2024
48c8a10
chore: cleanup
obycode Nov 26, 2024
ecb92c4
Merge branch 'develop' into feat/time-based-tenure-extend
obycode Nov 26, 2024
31b9c0b
Merge branch 'feat/time-based-tenure-extend' into feat/miner-tenure-e…
obycode Nov 26, 2024
8929537
fix: resolve errors after merge
obycode Nov 26, 2024
65c5b70
chore: remove duplicates in CHANGELOGs due to merge
obycode Nov 26, 2024
280d536
fix: merge artifact
obycode Nov 26, 2024
a4d378f
fix: merge artifacts
obycode Nov 26, 2024
0ad8751
Merge branch 'feat/miner-tenure-extend' into feat/tenure-idle-tests
obycode Nov 26, 2024
3c373e0
Merge branch 'feat/time-based-tenure-extend' of https://github.com/st…
jferrant Nov 26, 2024
fc6db45
chore: fix compile error from merge
jcnelson Nov 26, 2024
9aa669c
Merge branch 'develop' into feat/sip-029
jcnelson Nov 26, 2024
379ce66
chore: upgrade debug log to info
obycode Nov 26, 2024
9a88bec
Merge branch 'develop' into feat/sip-029
jcnelson Nov 26, 2024
09ea89b
CRC: delete old blocks table and migrate data over to new one with bl…
jferrant Nov 26, 2024
a03e985
Merge branch 'feat/miner-tenure-extend' into feat/tenure-idle-tests
obycode Nov 26, 2024
6ae5408
CRC: fix typo and use the block validation
jferrant Nov 26, 2024
47460a7
CRC: update test to account for state properly and fix broken query g…
jferrant Nov 26, 2024
1011e21
CRC: remove data migration specific scalar functions
jferrant Nov 26, 2024
7af0a11
hotfix: load the BurnStateDB implementation from the block's header's…
jcnelson Nov 27, 2024
6225366
chore: questions for reviewers
jcnelson Nov 27, 2024
f71a949
chore: fix burn views
jcnelson Nov 27, 2024
40d3563
fix; revert change to Nakamoto block builder from PR feedback
jcnelson Nov 27, 2024
31073de
docs: add 2 new clarity endpoints to the unreleased changelog
hugocaillard Nov 27, 2024
cef0dd4
refactor: move synchronization details into `StackerDBListenerComms`
obycode Nov 27, 2024
e3f31b3
Merge branch 'feat/miner-tenure-extend' into feat/tenure-idle-tests
obycode Nov 27, 2024
160b495
Merge pull request #5501 from stacks-network/release/3.0.0.0.3
wileyj Nov 27, 2024
efe2ab4
Fix signer db set_block_broadcasted typo and update test to catch
jferrant Nov 27, 2024
96f1a59
Increase idle timeout and make sure that the blocks are globally acce…
jferrant Nov 27, 2024
f56bfc7
chore: use the same burn view loader in both block validation and blo…
jcnelson Nov 27, 2024
06bc712
Merge branch 'master' into hotfix/proposal-loads-sortition-view-from-…
obycode Nov 27, 2024
dbee3fa
fix: block proposal test assertion
hstove Nov 27, 2024
2920032
Merge pull request #5494 from stacks-network/chore/cache-timestamp-calc
jferrant Nov 27, 2024
0674bf5
Merge branch 'feat/time-based-tenure-extend' into feat/miner-tenure-e…
obycode Nov 27, 2024
1b78589
Fix CREATE_INDEXES_5
jferrant Nov 28, 2024
ec8b83e
Merge branch 'feat/time-based-tenure-extend' of https://github.com/st…
jferrant Nov 28, 2024
bd39435
fix v3 update block to support no trailing
ASuciuX Dec 2, 2024
41eb2c4
Merge branch 'develop' into feat/no-miner-key-select-node-seed
ASuciuX Dec 2, 2024
ae9383a
chore: downgrade log to debug
obycode Dec 2, 2024
e300223
added config options for sip29 on testnet
rdeioris Dec 2, 2024
f50c75e
updated testnet config
rdeioris Dec 2, 2024
30ae1b7
chore: downgrade noisy log
obycode Dec 2, 2024
6bc6612
chore: remove unused function
obycode Dec 2, 2024
1a00280
Update changelogs for 3.0.0.0.4
wileyj Dec 2, 2024
29db45f
Merge pull request #5521 from stacks-network/chore/downgrade-log
obycode Dec 2, 2024
64fc88b
chore: downgrade noisy log
obycode Dec 2, 2024
c15d6ff
chore: remove unused function
obycode Dec 2, 2024
b6076b9
fix: expose locally-overriden hint-replicas data for each stackerdb r…
jcnelson Dec 2, 2024
d4a0c5c
chore: API sync
jcnelson Dec 2, 2024
28134bf
chore: API sync; only count authenticated outbound nodes
jcnelson Dec 2, 2024
19e3cb5
chore: override stackerdb smart contract hint-replicas with local hin…
jcnelson Dec 2, 2024
6794642
chore: API sync
jcnelson Dec 2, 2024
8a44ece
chore: test local hint-replicas override
jcnelson Dec 2, 2024
979fefe
chore: add config setting for stackerdb_hint_replicas; also make priv…
jcnelson Dec 2, 2024
1715d34
Merge branch 'develop' into fix/stackerdb-audit-coinfabrik
jcnelson Dec 2, 2024
ad7ac2b
Update per PR comments
wileyj Dec 2, 2024
f2085b8
Merge branch 'develop' into fix/trailing-v3-blocks-upload-regex
ASuciuX Dec 3, 2024
5f54e64
Merge pull request #5522 from stacks-network/chore/3.0.0.0.4_changelog
wileyj Dec 3, 2024
f861f52
chore: downgrade noisy log
obycode Dec 2, 2024
edb352b
chore: remove unused function
obycode Dec 2, 2024
e1a09dd
removed config for 3.1
rdeioris Dec 3, 2024
dde1d39
Merge remote-tracking branch 'refs/remotes/origin/feat/sip29-testnet-…
rdeioris Dec 3, 2024
e2e8f15
Merge branch 'develop' into docs/update-changelog-with-new-clarity-en…
hugocaillard Dec 3, 2024
1e520b9
Fix math in tenure extend timestamp calculation to ADD not SUB block …
jferrant Dec 3, 2024
61911ef
chore: add debug log for stackerdb listener timeout
obycode Dec 3, 2024
69759d4
Merge branch 'feat/time-based-tenure-extend' into feat/miner-tenure-e…
obycode Dec 3, 2024
040ef2d
Merge branch 'develop' into feat/time-based-tenure-extend
obycode Dec 3, 2024
4d075fe
Merge branch 'feat/time-based-tenure-extend' into feat/miner-tenure-e…
obycode Dec 3, 2024
17cd395
Merge remote-tracking branch 'origin/feat/time-based-tenure-extend' i…
hstove Dec 3, 2024
6e4bcc8
refactor: pass `reward_set` instead of re-loading it
obycode Dec 3, 2024
f2ce342
chore: improve comment on `mined_blocks`
obycode Dec 3, 2024
fdb05d1
fix: missing change for previous refactor
obycode Dec 3, 2024
b839d5d
Merge branch 'develop' into feat/no-miner-key-select-node-seed
wileyj Dec 3, 2024
3ee6a22
Merge pull request #5510 from stacks-network/docs/update-changelog-wi…
wileyj Dec 3, 2024
de1881b
refactor: use `TestFlag`
obycode Dec 3, 2024
061da00
Merge pull request #5493 from stacks-network/feat/miner-tenure-extend
obycode Dec 3, 2024
2833cfb
Merge pull request #5498 from stacks-network/feat/no-miner-key-select…
wileyj Dec 3, 2024
2ae7a18
Merge branch 'develop' into fix/trailing-v3-blocks-upload-regex
ASuciuX Dec 3, 2024
f063216
chore: PR feedback
jcnelson Dec 3, 2024
ff7d0b7
Merge branch 'fix/stackerdb-audit-coinfabrik' of https://github.com/s…
jcnelson Dec 3, 2024
b16268b
Merge branch 'develop' into fix/stackerdb-audit-coinfabrik
jcnelson Dec 3, 2024
c5aa341
Merge pull request #5518 from stacks-network/fix/trailing-v3-blocks-u…
ASuciuX Dec 3, 2024
5760e8a
Merge pull request #5527 from stacks-network/release/3.0.0.0.4
wileyj Dec 3, 2024
b4a668c
Merge remote-tracking branch 'origin/feat/time-based-tenure-extend' i…
hstove Dec 3, 2024
e9fc1a1
Merge pull request #5471 from stacks-network/feat/tenure-idle-tests
hstove Dec 3, 2024
257a412
Merge branch 'develop' into feat/time-based-tenure-extend
obycode Dec 4, 2024
e4551b9
feat: test for idle extend with active mining
hstove Dec 4, 2024
f1d57a1
Merge branch 'develop' into fix/stackerdb-audit-coinfabrik
jcnelson Dec 4, 2024
45383fc
Merge pull request #5520 from stacks-network/feat/sip29-testnet-config
aldur Dec 4, 2024
f4188b2
fix: add new test to bitcoin-tests
hstove Dec 4, 2024
6cb70e8
fix: pr comments
hstove Dec 4, 2024
92d8b29
fix: mine a few naka blocks after tenure extend
hstove Dec 4, 2024
805a379
Merge pull request #5531 from stacks-network/feat/active-mining-idle-…
obycode Dec 4, 2024
2e266a2
refactor: add `ExecutionCost::ZERO`
obycode Dec 4, 2024
2548c56
chore: Rust improvements
obycode Dec 4, 2024
6e06712
refactor: use `Instant` for timing block validation
obycode Dec 4, 2024
674d517
chore: change `%-full` to `percent_full` in log
obycode Dec 5, 2024
c679dcc
chore: remove redundant words in comment
lvyaoting Dec 5, 2024
583b857
Merge pull request #5536 from lvyaoting/develop
obycode Dec 5, 2024
ff66b68
chore: better rustiness
obycode Dec 5, 2024
b9d36a1
refactor: better Rustiness
obycode Dec 5, 2024
c195c68
refactor: more suggestions from PR review
obycode Dec 5, 2024
fdd78c5
Merge branch 'develop' into feat/time-based-tenure-extend
obycode Dec 5, 2024
e4a042b
Merge branch 'develop' into feat/sip-029
jcnelson Dec 6, 2024
484f417
docs: more info in tenure extend debug log
obycode Dec 6, 2024
3bccb23
docs: clarify changelog comment
obycode Dec 6, 2024
8c99a12
Merge pull request #5461 from stacks-network/feat/sip-029
wileyj Dec 6, 2024
92b1a3d
Add some debug logs to tenure extend timestamp calc and roundup the p…
jferrant Dec 6, 2024
7a7549c
chore: set nakamoto block version to 2
jcnelson Dec 6, 2024
062a3b8
chore: pick testnet activation heights for epoch 3.1 and stacks halve…
jcnelson Dec 6, 2024
c0da03e
Fix tenure timestamp check to be consistent with signers, only accept…
jferrant Dec 6, 2024
19e4d42
chore: more logging when rejecting time-based extend
hstove Dec 6, 2024
e2bc798
Merge branch 'develop' into feat/time-based-tenure-extend
obycode Dec 6, 2024
d828159
chore: allow negative in `tenure_extend_in` log
obycode Dec 6, 2024
7b265f7
feat: make tenure idle timestamps monotonically increase
obycode Dec 6, 2024
7c7a3dd
fix: revert stack block version change
hstove Dec 6, 2024
f8169d1
fix: when validating a block, clone the blocks version
hstove Dec 6, 2024
62f5066
fix: revert stack block version change
hstove Dec 6, 2024
86751a0
Adding changelog for epoch 3.1 and revert block version change (#5538)
wileyj Dec 7, 2024
761ae4d
Rollover tenure extend timestamp for tenure change blocks that are ac…
jferrant Dec 7, 2024
8156b54
fix: revert change to block version
obycode Dec 7, 2024
4e18e0f
fix: add comment when cloning proposed block's version
hstove Dec 8, 2024
4f5f6f6
feat: changelog entry
hstove Dec 8, 2024
b93f2f5
Merge pull request #5539 from stacks-network/fix/block-validation-ver…
obycode Dec 8, 2024
6472a7c
Merge branch 'develop' into fix/block-validate-version
hstove Dec 8, 2024
98d35ba
Merge branch 'develop' into feat/time-based-tenure-extend
obycode Dec 8, 2024
565ad2a
fix: do not propose block if mock-mining
obycode Dec 9, 2024
1f79b52
fix: do not broadcast block when mock-mining
obycode Dec 9, 2024
5bedd6e
refactor: move checks early in `broadcast`
obycode Dec 9, 2024
b201dcd
refactor: clean up mock-mining changes for readability
obycode Dec 9, 2024
025af8e
Merge pull request #5538 from stacks-network/fix/block-validate-version
hstove Dec 9, 2024
7b0d6b5
Merge branch 'develop' into fix/stackerdb-audit-coinfabrik
jcnelson Dec 9, 2024
0e8d40f
Merge branch 'develop' into feat/time-based-tenure-extend
jcnelson Dec 9, 2024
83a032f
Added block_proposal_max_age_secs signer configuration to drop old pr…
jferrant Dec 9, 2024
9999941
Merge pull request #5530 from stacks-network/feat/time-based-tenure-e…
obycode Dec 9, 2024
5a69d10
add epoch 3.1 config for testnet-miner-conf.toml
wileyj Dec 9, 2024
18a3f2f
Merge branch 'develop' into feat/sip029-testnet-block
wileyj Dec 9, 2024
3b25d99
Merge pull request #5523 from stacks-network/fix/stackerdb-audit-coin…
jcnelson Dec 9, 2024
4e99dd2
Merge branch 'develop' into feat/sip029-testnet-block
jcnelson Dec 9, 2024
0b23362
docs: add time-based tenure extend to CHANGELOG
obycode Dec 9, 2024
738845e
Fix test
jferrant Dec 9, 2024
a90d729
pull in 3.1 changelog
wileyj Dec 9, 2024
00b5f65
Fix text formatting in changelog
wileyj Dec 9, 2024
c4a2c44
Merge branch 'develop' into chore/tenure-extend-changelog
obycode Dec 9, 2024
1c4a4f6
Merge pull request #5537 from stacks-network/feat/sip029-testnet-block
wileyj Dec 9, 2024
b108d09
Merge pull request #5550 from stacks-network/chore/tenure-extend-chan…
wileyj Dec 9, 2024
4497377
Merge branch 'develop' of https://github.com/stacks-network/stacks-co…
jferrant Dec 10, 2024
66bc4ab
Make sure NakamotoBlock has valid header timestamp in signer v0 tests
jferrant Dec 10, 2024
cc2af4e
Should not use the nakamoto blocks mined test observer heuristic in m…
jferrant Dec 10, 2024
a78f818
CRC: add signer_signature_hash to warn message for dropping old block…
jferrant Dec 10, 2024
016a63f
CRC: replace signer_signature_hash with signer_sighash in warn log
jferrant Dec 10, 2024
d3ff2c1
fix: New warnings in Rust 1.83
jbencin Dec 11, 2024
ce528cd
chore: fix typo in log
obycode Dec 11, 2024
2a0217a
Merge pull request #5549 from stacks-network/feat/ignore-old-proposal…
jferrant Dec 12, 2024
1fb8e1b
Merge pull request #5564 from jbencin/fix/rust-1.83-warnings
jcnelson Dec 12, 2024
9e9d97e
Merge pull request #5565 from stacks-network/chore/typo
jcnelson Dec 12, 2024
49cc90e
Merge branch 'develop' into chore/merge-develop
hugocaillard Dec 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions stacks-signer/src/signerdb.rs
Original file line number Diff line number Diff line change
@@ -856,7 +856,7 @@ impl SignerDb {
// If we have no blocks known for this tenure, we will assume it has only JUST started and calculate
// our tenure extend timestamp based on the epoch time in secs.
let mut tenure_start_timestamp = None;
let mut tenure_process_time_ms = 0;
let mut tenure_process_time_ms = 0_u64;
// Note that the globally accepted blocks are already returned in descending order of stacks height, therefore by newest block to oldest block
for block_info in self
.get_globally_accepted_blocks(consensus_hash)
@@ -865,7 +865,9 @@ impl SignerDb {
{
// Always use the oldest block as our tenure start timestamp
tenure_start_timestamp = Some(block_info.proposed_time);
tenure_process_time_ms += block_info.validation_time_ms.unwrap_or(0);

tenure_process_time_ms =
tenure_process_time_ms.saturating_add(block_info.validation_time_ms.unwrap_or(0));

if block_info
.block
17 changes: 16 additions & 1 deletion stacks-signer/src/v0/signer.rs
Original file line number Diff line number Diff line change
@@ -18,6 +18,8 @@ use std::sync::mpsc::Sender;
use std::time::{Duration, Instant};

use blockstack_lib::chainstate::nakamoto::{NakamotoBlock, NakamotoBlockHeader};
use blockstack_lib::chainstate::stacks::address::StacksAddressExtensions;
use blockstack_lib::chainstate::stacks::TransactionPayload;
use blockstack_lib::net::api::postblock_proposal::{
BlockValidateOk, BlockValidateReject, BlockValidateResponse,
};
@@ -587,7 +589,20 @@ impl Signer {
block_info.signed_self.get_or_insert(get_epoch_time_secs());
}
// Record the block validation time
block_info.validation_time_ms = Some(block_validate_ok.validation_time_ms);
let non_bootcode_contract_call_block = block_info.block.txs.iter().any(|tx| {
// We only care about blocks that contain a non bootcode contract call
match &tx.payload {
TransactionPayload::ContractCall(cc) => !cc.address.is_boot_code_addr(),
TransactionPayload::SmartContract(..) => true,
_ => false,
}
});
if non_bootcode_contract_call_block {
block_info.validation_time_ms = Some(block_validate_ok.validation_time_ms);
} else {
// Ignore purely boot code and stx transfers when calculating the processing/validation time
block_info.validation_time_ms = Some(0);
}

let signature = self
.private_key