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

static-experimental -> static-dev #10

Merged
merged 41 commits into from
Mar 22, 2020
Merged

static-experimental -> static-dev #10

merged 41 commits into from
Mar 22, 2020

Conversation

DeckerSU
Copy link
Owner

No description provided.

DeckerSU added 30 commits March 12, 2020 02:16
… mempool

In CreateNewBlock of miner https://github.com/KomodoPlatform/komodo/blob/master/src/miner.cpp#L331
we have a condition that prevents miners to include certain txes in
block if tx violates komodo_validate_interest check. so, if such txes
will exist in mempool and in some reason they was not miner earlier, if
they have nExpiryHeight = 0 - they NEVER will be included in block by miners.

Also, code in CTxMemPool::removeExpired that should remove such txes
from mempool didn't do it due to mistake. As a result these txes
stucks in mempool. No one can mine it, bcz no one can include it in block,
and no one get success to remove it from mempool.

Look on old code:

```
(ASSETCHAINS_SYMBOL[0] == 0
  && tipindex != 0 && komodo_validate_interest(...) ) < 0

```
But should be:

```
(ASSETCHAINS_SYMBOL[0] == 0
  && tipindex != 0 && komodo_validate_interest(...) < 0 )
```

Bcz we should compare with 0 result of komodo_validate_interest, but we
had different behaviour, due to typo.
method of determination is chain in sync (KOMODO_INSYNC),
based on KOMODO_LONGESTCHAIN (https://github.com/DeckerSU/KomodoOcean/blob/27f2631e84c013ad03b24c2cf0b1381d032c39ad/src/main.cpp#L4348)
is far away from best solution. bcz KOMODO_LONGESTCHAIN filled from
nodes stats - https://github.com/DeckerSU/KomodoOcean/blob/27f2631e84c013ad03b24c2cf0b1381d032c39ad/src/rpc/net.cpp#L211
and not intended for this.
TODO: refactor Makefile.am
bitcoin/bitcoin#16577
zcash/zcash#4265

- added CBufferedFile fix (thx LarryRuane)
- added unit test (streams_tests.cpp rewritten for Google C++ Testing Framework
- additional komodo_block_load test (read 2 blocks from binary file)
- removed CBufferedFile::SetAnyPos method (had incorrect logic)
- removed komodo_index2pubkey33, komodo_blockload (as not-used and related to SetAnyPos)
-
TODO: fix unit test build on Windows fail
included script_standard_Malpill test for non-minimal
forms of P2PK / P2PKH scripts
bitcoin/bitcoin@d0c9632

TODO: Use it in MerkleRoot Calculations, bits256_doublesha256 (komodo_utils.h)
and analyse komodo specific code which possible can use this new
SHA256D64.
TODO: move it in src/compat/cpuid.h as in Bitcoin 0.19.x (see commit
723c79666770b30cce9f962bed5ece8cc7d74580), also analyse changes in
src/random.cpp to use this implementation of GetCPUID there.
- sha256d64_sse41
- sha256d64_avx2
- sha256d64_shani
- sha256_shani

NB: now build subsystem have few mistakes and checking for SSE4.2 intrinsics,
checking for SSE4.1 intrinsics never passed.
TODO: fix it.
TODO: find and fix similar errors
old: use block.BuildMerkleTree from CBlock (primitives/block.cpp)
new: use BlockMerkleRoot from consensus/merkle.cpp (using SHA256D64 hardware)

TODO: switch all places in code to new (!)
Switch to new mechanism of Merkle Root calc:

old: use block.BuildMerkleTree from CBlock (primitives/block.cpp)
new: use BlockMerkleRoot from consensus/merkle.cpp (using SHA256D64 hardware)

TODO: crosschain.cpp logic remains with old mechanism
Copy into ${workspaceFolder}/.vscode
DeckerSU added 11 commits March 19, 2020 01:36
previous fix for deleting txes which violates interest rules contain
an error (call of GetMedianTimePast() method when chainActive.LastTip()
could be NULL), this commit fixed it.
LoadBlockIndexDB: start loading guts
[10%]...[20%]...[30%]...[40%]...[50%]...[60%]...[70%]...[80%]...[90%]...[100%]...[DONE].
LoadBlockIndexDB: loaded guts
- Qt 5.9.8
- Build flags
- Packages add / remove
revert the bitcoin/bitcoin@bc728d1
commit. i know, it's kind of a hack and Qt on MacOS should be build with
compiler specified in depends/builders/darwin.mk in darwin_CC and darwin_CXX
variables. but here we need default clang/clang++ especially for Qt.
previous build subsystem (before transition to Qt 5.9.8) had "error", but
according to that, it using clang/clang++ and build fine.

$($(package)_cc) here equal to darwin_CC
$($(package)_cxx) equal to darwin_CXX (from depends/builders/darwin.mk)
@DeckerSU DeckerSU merged commit 0814262 into static-dev Mar 22, 2020
DeckerSU added a commit that referenced this pull request Nov 3, 2024
- bitcoin/bitcoin#28769
- dashpay/dash#6032
- dashpay/dash#6011

Should fix crash on Ubuntu 24.04 / gcc 13.2.0:
```
*** buffer overflow detected ***: terminated

#0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:44
#1  __pthread_kill_internal (signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:78
#2  __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
#3  0x00007ffff764526e in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#4  0x00007ffff76288ff in __GI_abort () at ./stdlib/abort.c:79
#5  0x00007ffff76297b6 in __libc_message_impl (fmt=fmt@entry=0x7ffff77ce765 "*** %s ***: terminated\n")
    at ../sysdeps/posix/libc_fatal.c:132
#6  0x00007ffff7736c19 in __GI___fortify_fail (msg=msg@entry=0x7ffff77ce74c "buffer overflow detected")
    at ./debug/fortify_fail.c:24
#7  0x00007ffff77365d4 in __GI___chk_fail () at ./debug/chk_fail.c:28
#8  0x00007ffff7737a67 in __readlink_chk (path=<optimized out>, buf=<optimized out>, len=<optimized out>,
    buflen=<optimized out>) at ./debug/readlink_chk.c:31
#9  0x0000555556ef3bc3 in qt_readlink(char const*) ()
#10 0x0000555556e3e30b in QLockFilePrivate::processNameByPid(long long) ()
```
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.

1 participant