Skip to content

Conversation

@ghost
Copy link

@ghost ghost commented Mar 21, 2024

src/pow.cpp
Screenshot from 2024-03-21 01-10-36

No reduction in CPU activity.

Full synchronizing with i % 16 == 0 && 32 minutes.
with

Full synchronizing without i % 16 == 0 && 31 minutes.
no


Solo mining ✅


validation.cpp

ChatGPT
Uses memcpy to copy the entire lastAlgoBlocks array from the predecessor block to the new block in one operation. This method is more efficient than looping through the array.


Fast launch PR https://github.com/DigiByte-Core/digibyte/pull/142/files

@ghost
Copy link
Author

ghost commented Mar 21, 2024

Screenshot from 2024-03-21 12-35-23

==4218== Conditional jump or move depends on uninitialised value(s)
==4218== at 0x55D3C9D: ???
==4218== by 0xE04F5B7: ???
==4218==
==4218== Conditional jump or move depends on uninitialised value(s)
==4218== at 0x55D3B5D: ???
==4218== by 0xE04F5B7: ???
==4218==
==4218== Conditional jump or move depends on uninitialised value(s)
==4218== at 0x55D3C9D: ???
==4218== by 0xE0BA4A7: ???
==4218==
==4218== Conditional jump or move depends on uninitialised value(s)
==4218== at 0x55D3B5D: ???
==4218== by 0xE0BA4A7: ???
==4218==
==4218== Conditional jump or move depends on uninitialised value(s)
==4218== at 0x55D3C9D: ???
==4218== by 0x6B7F917: ???
==4218==
==4218== Conditional jump or move depends on uninitialised value(s)
==4218== at 0x55D3C3D: ???
==4218== by 0x6B7F917: ???
==4218==
==4218== Conditional jump or move depends on uninitialised value(s)
==4218== at 0x55D3B5D: ???
==4218== by 0x6B7F917: ???
==4218==
==4218== Conditional jump or move depends on uninitialised value(s)
==4218== at 0x55D3C9D: ???
==4218== by 0x6DC0167: ???
==4218==
==4218== Conditional jump or move depends on uninitialised value(s)
==4218== at 0x55D3C3D: ???
==4218== by 0x6DC0167: ???
==4218==
==4218== Conditional jump or move depends on uninitialised value(s)
==4218== at 0x55D3B5D: ???
==4218== by 0x6DC0167: ???
==4218==
==4218== Thread 16 b-qt-init:
==4218== Syscall param pwrite64(buf) points to uninitialised byte(s)
==4218== at 0x53143B7: __libc_pwrite64 (pwrite64.c:25)
==4218== by 0x53143B7: pwrite (pwrite64.c:23)
==4218== by 0x1604944: __os_io (in /home/user/digibyte/src/qt/digibyte-qt)
==4218== by 0x1693786: __memp_pgwrite.part.0 (in /home/user/digibyte/src/qt/digibyte-qt)
==4218== by 0x1693A4B: __memp_bhwrite (in /home/user/digibyte/src/qt/digibyte-qt)
==4218== by 0x1692A64: __memp_alloc (in /home/user/digibyte/src/qt/digibyte-qt)
==4218== by 0x15F6063: __memp_fget (in /home/user/digibyte/src/qt/digibyte-qt)
==4218== by 0x15AF00F: __db_verify (in /home/user/digibyte/src/qt/digibyte-qt)
==4218== by 0x15B1341: __db_verify_internal (in /home/user/digibyte/src/qt/digibyte-qt)
==4218== by 0x15A23E3: Db::verify(char const*, char const*, std::ostream*, unsigned int) (in /home/user/digibyte/src/qt/digibyte-qt)
==4218== by 0x86E5BE: BerkeleyDatabase::Verify(bilingual_str&) (bdb.cpp:275)
==4218== by 0x86EFDC: MakeBerkeleyDatabase(boost::filesystem::path const&, DatabaseOptions const&, DatabaseStatus&, bilingual_str&) (bdb.cpp:841)
==4218== by 0x843B25: MakeDatabase(boost::filesystem::path const&, DatabaseOptions const&, DatabaseStatus&, bilingual_str&) (walletdb.cpp:1143)
==4218== Address 0x5a1a548 is 120 bytes inside a block of size 1,112 alloc'd
==4218== at 0x48407B4: malloc (vg_replace_malloc.c:381)
==4218== by 0x1602624: __os_malloc (in /home/user/digibyte/src/qt/digibyte-qt)
==4218== by 0x15D8249: __env_alloc (in /home/user/digibyte/src/qt/digibyte-qt)
==4218== by 0x1692303: __memp_alloc (in /home/user/digibyte/src/qt/digibyte-qt)
==4218== by 0x15F6063: __memp_fget (in /home/user/digibyte/src/qt/digibyte-qt)
==4218== by 0x1622903: __bam_new_file (in /home/user/digibyte/src/qt/digibyte-qt)
==4218== by 0x15CAEFA: __db_new_file (in /home/user/digibyte/src/qt/digibyte-qt)
==4218== by 0x15CB4D3: __db_open (in /home/user/digibyte/src/qt/digibyte-qt)
==4218== by 0x15B1EB4: __db_vrfy_dbinfo_create (in /home/user/digibyte/src/qt/digibyte-qt)
==4218== by 0x15AE9AD: __db_verify (in /home/user/digibyte/src/qt/digibyte-qt)
==4218== by 0x15B1341: __db_verify_internal (in /home/user/digibyte/src/qt/digibyte-qt)
==4218== by 0x15A23E3: Db::verify(char const*, char const*, std::ostream*, unsigned int) (in /home/user/digibyte/src/qt/digibyte-qt)
==4218==
==4218== Conditional jump or move depends on uninitialised value(s)
==4218== at 0x52F385: GetLastBlockIndexForAlgoFast(CBlockIndex const*, Consensus::Params const&, int) (pow.cpp:355)
==4218== by 0x52F42F: GetNextWorkRequiredV4(CBlockIndex const*, Consensus::Params const&, int) (pow.cpp:203)
==4218== by 0x6B0FE1: GetBlockProof(CBlockIndex const&) (chain.cpp:187)
==4218== by 0x651B1F: BlockManager::LoadBlockIndex(Consensus::Params const&, CBlockTreeDB&, std::set<CBlockIndex*, CBlockIndexWorkComparator, std::allocator<CBlockIndex*> >&) (validation.cpp:3921)
==4218== by 0x65215B: CChainState::LoadBlockIndexDB() (validation.cpp:3968)
==4218== by 0x652CBF: ChainstateManager::LoadBlockIndex() (validation.cpp:4316)
==4218== by 0x4579EE: AppInitMain(NodeContext&, interfaces::BlockAndHeaderTipInfo*) (init.cpp:1397)
==4218== by 0x342103: InitExecutor::initialize() (initexecutor.cpp:46)
==4218== by 0x10DD7FF: QObject::event(QEvent*) (in /home/user/digibyte/src/qt/digibyte-qt)
==4218== by 0x124FDAD: QApplicationPrivate::notify_helper(QObject*, QEvent*) (in /home/user/digibyte/src/qt/digibyte-qt)
==4218== by 0x10AF107: QCoreApplication::notifyInternal2(QObject*, QEvent*) (in /home/user/digibyte/src/qt/digibyte-qt)
==4218== by 0x10B2C67: QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (in /home/user/digibyte/src/qt/digibyte-qt)
==4218==
==4218== Thread 1:
==4218== Conditional jump or move depends on uninitialised value(s)
==4218== at 0x55D3C9D: ???
==4218== by 0x8A2CDCB7: ???
==4218==
==4218== Conditional jump or move depends on uninitialised value(s)
==4218== at 0x55D3C3D: ???
==4218== by 0x8A2CDCB7: ???
==4218==
==4218== Conditional jump or move depends on uninitialised value(s)
==4218== at 0x55D3B5D: ???
==4218== by 0x8A2CDCB7: ???
==4218==
==4218== Conditional jump or move depends on uninitialised value(s)
==4218== at 0x55D3C9D: ???
==4218== by 0x8A73E4D7: ???
==4218==
==4218== Conditional jump or move depends on uninitialised value(s)
==4218== at 0x55D3B5D: ???
==4218== by 0x8A73E4D7: ???
==4218==

Copy link

@JaredTate JaredTate left a comment

Choose a reason for hiding this comment

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

ACK. This compiles, runs, passes make check & I cannot see any issues running the core wallet for a few hours.

So does this make a bigger difference on slower machines, I really can't notice any speed difference on my 8 core mac book pro with 32 gb ram.

Would be great to get more people to run this.

Thanks for your work @Jongjan88 !

Screenshot 2024-03-21 at 12 22 21 PM

Copy link
Member

@ycagel ycagel left a comment

Choose a reason for hiding this comment

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

cACK

@gto90 gto90 assigned ghost Mar 21, 2024
Copy link
Member

@gto90 gto90 left a comment

Choose a reason for hiding this comment

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

utACK

I also do not see much of a performance improvement with this change. We should ensure that we cut an RC4 to give the community some time to report back any issues with this change and whether they enjoy any performance improvements on start.

@gto90 gto90 merged commit 2d09292 into DigiByte-Core:develop Mar 21, 2024
@ghost ghost deleted the fastlaunch branch March 21, 2024 23:15
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.

3 participants