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

windows_compatibility_tari_base_node #1414

Merged
merged 1 commit into from
Mar 9, 2020

Conversation

hansieodendaal
Copy link
Contributor

@hansieodendaal hansieodendaal commented Mar 4, 2020

Description

  • Conditional compilation was added to exclude store_forward Tokio layer to be added for Windows builds. This removes store_forward functionality from Windpows, but provides a temporary fix.
  • Small refactoring for fn load_users() in lmdb.rs
  • Windows build and run instructions where SQLite is a dependency

Motivation and Context

The tari_base_node creates a stack overflow error when run in Windows. This has been traced to the implementation of multiple Tokio layers in pub fn inbound_middleware_layer (compliments due to @sdbondi). Excluding the 2x store_forward Tokio layers works for now. It seems this problem is related to the amount of layers added as well.

How Has This Been Tested?

  • The tokio::runtime::Builder::new().thread_stack_size has been increased from 2MB to 200MB but this did not solve the problem.

  • Conditional compilation fully tested in Windows and Ubuntu Linux with cargo test

  • tari_base_node was run and left to mine blocks on Windows and Ubuntu Linux; both mine successfully.

Windows

>> get_balance
>> Balances:
Available balance: 99716813707 µT
Pending incoming balance: 0 µT
Pending outgoing balance: 0 µT

 is not a valid command, please enter a valid command
Enter help or press tab for available commands
>> get_chain_metadata
Current meta data is is: Height of longest chain : 19
Best_block : a7cd45084c278fde1440c18784fa691d93f0de0c02b0708dda96fa308b291cb8
Pruning horizon : 2880

Ubuntu Linux

>> get_balance
Balances:
Available balance: 121875998510 µT
Pending incoming balance: 0 µT
Pending outgoing balance: 0 µT

>> get_chain_metadata
Current meta data is is: Height of longest chain : 22
Best_block : 73fad52710b809cf87badebd4a118183d936367fe4415d2023891fd8f5bbdc17
Pruning horizon : 2880

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Feature refactor (No new feature or functional changes, but performance or technical debt improvements)
  • New Tests
  • Documentation

Checklist:

  • I'm merging against the development branch
  • I ran cargo-fmt --all before pushing
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.

sdbondi
sdbondi previously approved these changes Mar 5, 2020
Copy link
Member

@sdbondi sdbondi left a comment

Choose a reason for hiding this comment

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

Will set aside some time to dig deeper into this - LGTM

comms/dht/src/dht.rs Outdated Show resolved Hide resolved
comms/dht/src/dht.rs Outdated Show resolved Hide resolved
Copy link
Collaborator

@SWvheerden SWvheerden left a comment

Choose a reason for hiding this comment

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

looks good

sdbondi
sdbondi previously approved these changes Mar 5, 2020
comms/dht/src/dht.rs Outdated Show resolved Hide resolved
CjS77
CjS77 previously approved these changes Mar 5, 2020
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.

Nice.

P.S. Great PR description!

@CjS77
Copy link
Collaborator

CjS77 commented Mar 6, 2020

Squash the commits please

…layer to be added for Windows builds. This removes `store_forward` functionality from Windpows, but provides a temporary fix.

- Small refactoring for `fn load_users()` in `lmdb.rs`
- Windows build and run instructions where SQLite is a dependency

Signed-off-by: Hansie Odendaal <[email protected]>
@hansieodendaal hansieodendaal force-pushed the ho_windows_compatibility_tari_basenode branch from 1d8270b to 2b75d32 Compare March 6, 2020 12:49
@hansieodendaal
Copy link
Contributor Author

hansieodendaal commented Mar 9, 2020

At least 2x more PRs will be needed after this one:

  • common\src\configuration.rs contains Unix specific file path coding; this must be made platform agnostic. This results in Tor not working on Windows.
  • To make cargo test --workspace --all-features --jobs=3 --release work on Windows, compilation and test of pingpong.rs must be prevented. This - https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#features - might provide a fix.

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 fb51589 into development Mar 9, 2020
@CjS77 CjS77 deleted the ho_windows_compatibility_tari_basenode branch March 9, 2020 06:25
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.

4 participants