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

Bootup fixes for 2.05.0.2.0-rc1 #3112

Merged
merged 6 commits into from
Apr 25, 2022
Merged

Bootup fixes for 2.05.0.2.0-rc1 #3112

merged 6 commits into from
Apr 25, 2022

Conversation

jcnelson
Copy link
Member

This PR fixes a couple of boot-up issues related to schema migrations and always-allowed peers when booting a 2.05.0.2.0-rc1 peer. In particular:

  • This PR fixes a runtime panic that arises when booting from genesis due to the unavailability of the first block snapshot.

  • This PR fixes a runtime panic that arises when booting from non-migrated chainstate due to needing the first block snapshot before attempting migrations to the latest schemas.

  • This PR makes it so that the public key of an always-allowed peer is reset from the config file on each boot-up.

  • This PR makes it so that an always-allowed peer is only considered to have timed out if it has replied to a previous message first (this is specific to always-allowed peers since they are always considered authenticated, which precludes relying on checking whether or not the public key is known to determine if a peer has been contacted).

… do it on node boot-up. Also, downgrade the tx type for migraiton to DBTx so we don't accidentally depend on the first block header information (which we might not have)
…s public key, so also make sure that the last contact time is positive when considering timeouts
@codecov
Copy link

codecov bot commented Apr 22, 2022

Codecov Report

Merging #3112 (8f472cf) into develop (d2f31ca) will decrease coverage by 0.16%.
The diff coverage is 50.00%.

@@             Coverage Diff             @@
##           develop    #3112      +/-   ##
===========================================
- Coverage    83.71%   83.54%   -0.17%     
===========================================
  Files          260      260              
  Lines       200932   200982      +50     
===========================================
- Hits        168210   167914     -296     
- Misses       32722    33068     +346     
Impacted Files Coverage Δ
src/util_lib/db.rs 82.28% <0.00%> (-0.57%) ⬇️
src/chainstate/burn/db/sortdb.rs 95.29% <43.47%> (-0.24%) ⬇️
testnet/stacks-node/src/run_loop/neon.rs 80.00% <53.33%> (-0.65%) ⬇️
src/chainstate/coordinator/mod.rs 90.52% <55.55%> (-1.42%) ⬇️
src/net/p2p.rs 58.54% <100.00%> (+0.06%) ⬆️
testnet/stacks-node/src/neon_node.rs 83.56% <100.00%> (+1.11%) ⬆️
testnet/stacks-node/src/tests/neon_integrations.rs 81.46% <0.00%> (-6.82%) ⬇️
...ommon/src/deps_common/bitcoin/network/serialize.rs 44.00% <0.00%> (-4.00%) ⬇️
src/burnchains/bitcoin/mod.rs 37.68% <0.00%> (-1.45%) ⬇️
src/net/atlas/download.rs 82.26% <0.00%> (-1.41%) ⬇️
... and 35 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d2f31ca...8f472cf. Read the comment docs.

Copy link
Contributor

@gregorycoppola gregorycoppola left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM assuming the node is really booting up :)

@jcnelson jcnelson merged commit 118187d into develop Apr 25, 2022
@blockstack-devops
Copy link
Contributor

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@stacks-network stacks-network locked as resolved and limited conversation to collaborators Nov 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants