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

[wip] Remove delay in addrman.Select() and disable kmd seeds for asset chains #528

Closed
wants to merge 231 commits into from

Conversation

dimxy
Copy link
Collaborator

@dimxy dimxy commented Jan 19, 2022

dimxy and others added 18 commits September 5, 2022 22:41
1. _COINBASE_MATURITY+10 -> Params().CoinbaseMaturity()+10 substitution
suggested by author was bit incorrect, bcz _COINBASE_MATURITY == 100
at any time and Params().CoinbaseMaturity() depends on chain (for KMD
it's 100, for ACs it's 1) and assertion was wrong.
2. Introducing maxWitnessCacheSize CWallet member and fill it's default
value in c'tor made c'tors bit "ambiguously" and probably was
not a best idea.
to avoid the following errors:

/usr/bin/ld: depends/x86_64-unknown-linux-gnu/lib/libgmp.a(invert_limb.o): warning: relocation against `__gmpn_invert_limb_table' in read-only section `.text'
/usr/bin/ld: warning: creating DT_TEXTREL in a PIE

when build with 11.2.0 (Ubuntu 22.04.1 LTS, etc.)
    Issue: if we will try to build KomodoOcean with CXXFLAGS='-g -O0'
    we will get the following error during linkage:

    usr/bin/ld: libbitcoin_util.a(libbitcoin_util_a-util.o): in function `__static_initialization_and_destruction_0(int, int)':
    /home/decker/KomodoOcean/src/komodo_hardfork.h:19: undefined reference to `nStakedDecemberHardforkTimestamp'
    /usr/bin/ld: /home/decker/KomodoOcean/src/komodo_hardfork.h:19: undefined reference to `nS4Timestamp'
    /usr/bin/ld: /home/decker/KomodoOcean/src/komodo_hardfork.h:19: undefined reference to `nS5Timestamp'
    /usr/bin/ld: /home/decker/KomodoOcean/src/komodo_hardfork.h:19: undefined reference to `nS6Timestamp'
    /usr/bin/ld: /home/decker/KomodoOcean/src/komodo_hardfork.h:20: undefined reference to `nDecemberHardforkHeight'
    /usr/bin/ld: /home/decker/KomodoOcean/src/komodo_hardfork.h:20: undefined reference to `nS4HardforkHeight'
    /usr/bin/ld: /home/decker/KomodoOcean/src/komodo_hardfork.h:20: undefined reference to `nS5HardforkHeight'
    /usr/bin/ld: /home/decker/KomodoOcean/src/komodo_hardfork.h:20: undefined reference to `nS6HardforkHeight'

    So, we need to include komodo_hardfork.cpp into libbitcoin_util_a_SOURCES
    or delete include of komodo_hardfork.h from komodo_globals.h.
because of error:

free(): double free detected in tcache 2
Aborted (core dumped)

TODO: fix this test.
* fix function(s) invokations after inaccurate merge branches

* fix treating std as a label, name it's a variable of std::string type
@dimxy
Copy link
Collaborator Author

dimxy commented Sep 16, 2022

We maybe need to improve this PR.
I believe this is not good when the addrman object can be locked for minutes due to the delay in CAddrMan::Select_() and better be fixed.
But at the same time simply removing this delay leads to more frequent connection retries in ThreadOpenConnections() for small assets chains (where the nodes number < 16). Maybe we should add another delay between connection retries when peers number is small (like to move the delay from Select_() to ThreadOpenConnections() avoiding the addrman lock).

@dimxy
Copy link
Collaborator Author

dimxy commented Oct 14, 2022

added param -noaddrmandelay

@tonymorony tonymorony marked this pull request as draft October 17, 2022 09:46
@tonymorony tonymorony changed the title Remove delay in addrman.Select() and disable kmd seeds for asset chains [wip] Remove delay in addrman.Select() and disable kmd seeds for asset chains Oct 17, 2022
@ca333
Copy link

ca333 commented Jan 29, 2024

archive

@ca333 ca333 closed this Jan 29, 2024
who-biz pushed a commit to who-biz/komodo that referenced this pull request Jul 29, 2024
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