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

Added discover-peer command #1544

Merged
merged 1 commit into from
Mar 20, 2020
Merged

Added discover-peer command #1544

merged 1 commit into from
Mar 20, 2020

Conversation

sdbondi
Copy link
Member

@sdbondi sdbondi commented Mar 20, 2020

>> discover-peer c85bb4933d2e9e9e924e47530c00b987072da14c3a2a36b86e
🌎 Peer discovery started.
⚡️ Discovery succeeded in 1293ms!
This peer was found:
[ac414ecc153977fa] PK=c85bb4933d2e9e9e924e47530c00b987072da14c3a2a36b86e20cf6xxxxxxx /onion3/[redacted]:18021 "WALLET" Last connected at '2020-03-20 15:14:01.734128'.
  • discover-peer [emoji id] works
  • list-peers also lists wallets.
  • list-peers basenode lists base nodes only (list-peers bn for short)
  • list-peers wallet lists wallets only (list-peers w for short)

@sdbondi sdbondi force-pushed the sb-discover-peer-cmd branch from b282afd to ca433e5 Compare March 20, 2020 15:25
```
>> discover-peer c85bb4933d2e9e9e924e47530c00b987072da14c3a2a36b86e20cfxxxxxxxx
🌎 Peer discovery started.
⚡️ Discovery succeeded in 1293ms!
This peer was found:
[ac414ecc153977fa] PK=c85bb4933d2e9e9e924e47530c00b987072da14c3a2a36b86exxxxxxxxxxx /onion3/[redacted]:18021 "WALLET" Last connected at '2020-03-20 15:14:01.734128'.
```
@sdbondi sdbondi force-pushed the sb-discover-peer-cmd branch from ca433e5 to a041fb3 Compare March 20, 2020 15:26
Copy link
Collaborator

@CjS77 CjS77 left a comment

Choose a reason for hiding this comment

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

LGTM

@CjS77 CjS77 merged commit a5c6af1 into development Mar 20, 2020
@CjS77 CjS77 deleted the sb-discover-peer-cmd branch March 20, 2020 16:52
SWvheerden pushed a commit that referenced this pull request Mar 26, 2024
Description
---
Added dynamic growth size to LMBD, where it will grow with the
configured size as well an optional shortfall size that could not be
written. This is especially relevant during block sync of many full
blocks where the output SMT has grown very large.

Motivation and Context
---
Block sync did not work with many full blocks.
```rust
2024-03-25 07:27:14.304496100 [c::cs::lmdb_db::lmdb_db] INFO  Database resize required (resized 5 time(s) in this transaction)
2024-03-25 07:27:14.317099900 [lmdb] DEBUG (\node_05\esmeralda\data/base_node\db) LMDB MB, mapsize was grown from 1616 MB to 1632 MB, increased by 16 MB
2024-03-25 07:27:14.319843700 [c::bn::block_sync] WARN  Chain storage error: DB transaction was too large (3 operations)
2024-03-25 07:27:14.319864400 [c::bn::block_sync] WARN  Block sync failed: No more sync peers available: Block sync failed
2024-03-25 07:27:14.319969400 [c::cs::database] INFO  Rewinding headers from height 6325 to 1627
```

How Has This Been Tested?
---
System-level archival sync-from-scratch test on esmeralda after a
coin-split and transaction stress test.

Before the fix, blocks #1544 to #1584. Multiple resizes for the same set
of write operations was required, with the final one resulting in block
sync failure.
```rust
2024-03-25 07:19:35.346281600 [c::cs::lmdb_db::lmdb_db] INFO  Database resize required (resized 1 time(s) in this transaction)
2024-03-25 07:19:35.654103900 [c::cs::lmdb_db::lmdb_db] INFO  Database resize required (resized 2 time(s) in this transaction)
2024-03-25 07:19:35.952783600 [c::cs::lmdb_db::lmdb_db] INFO  Database resize required (resized 3 time(s) in this transaction)
2024-03-25 07:19:41.198100900 [c::cs::lmdb_db::lmdb_db] INFO  Database resize required (resized 1 time(s) in this transaction)
2024-03-25 07:19:41.519953900 [c::cs::lmdb_db::lmdb_db] INFO  Database resize required (resized 2 time(s) in this transaction)
2024-03-25 07:19:41.827079500 [c::cs::lmdb_db::lmdb_db] INFO  Database resize required (resized 3 time(s) in this transaction)
2024-03-25 07:19:42.136522700 [c::cs::lmdb_db::lmdb_db] INFO  Database resize required (resized 4 time(s) in this transaction)
2024-03-25 07:20:29.331297000 [c::cs::lmdb_db::lmdb_db] INFO  Database resize required (resized 1 time(s) in this transaction)
2024-03-25 07:20:29.755442600 [c::cs::lmdb_db::lmdb_db] INFO  Database resize required (resized 2 time(s) in this transaction)
2024-03-25 07:20:30.119457000 [c::cs::lmdb_db::lmdb_db] INFO  Database resize required (resized 3 time(s) in this transaction)
2024-03-25 07:20:30.491588200 [c::cs::lmdb_db::lmdb_db] INFO  Database resize required (resized 4 time(s) in this transaction)
2024-03-25 07:20:30.868365300 [c::cs::lmdb_db::lmdb_db] INFO  Database resize required (resized 5 time(s) in this transaction)
```
After the fix, blocks #1544 to #1584. Only a single resize each time for
a set of write operations was required.
```rust
2024-03-25 16:40:28.814566400 [c::cs::lmdb_db::lmdb_db] INFO  Database resize required (resized 1 time(s) in this transaction)
2024-03-25 16:42:05.167759000 [c::cs::lmdb_db::lmdb_db] INFO  Database resize required (resized 1 time(s) in this transaction)
```

What process can a PR reviewer use to test or verify this change?
---
Code review

<!-- Checklist -->
<!-- 1. Is the title of your PR in the form that would make nice release
notes? The title, excluding the conventional commit
tag, will be included exactly as is in the CHANGELOG, so please think
about it carefully. -->


Breaking Changes
---

- [x] None
- [ ] Requires data directory on base node to be deleted
- [ ] Requires hard fork
- [ ] Other - Please specify

<!-- Does this include a breaking change? If so, include this line as a
footer -->
<!-- BREAKING CHANGE: Description what the user should do, e.g. delete a
database, resync the chain -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants