Skip to content

Conversation

ajtowns
Copy link
Contributor

@ajtowns ajtowns commented Jan 13, 2021

Followups from #19937

Copy link
Contributor

@kallewoof kallewoof left a comment

Choose a reason for hiding this comment

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

tested ACK f30c348

Running this code on my side as of a minute ago.

@maflcko
Copy link
Member

maflcko commented Jan 14, 2021

The gitian builds are broken right now:


  CXXLD    bitcoin-util
bitcoin_util-bitcoin-util.o: In function `grind_task':
/home/ubuntu/build/bitcoin/distsrc-riscv64-linux-gnu/src/bitcoin-util.cpp:98: undefined reference to `__atomic_exchange_1'
collect2: error: ld returned 1 exit status
Makefile:4964: recipe for target 'bitcoin-util' failed
make[2]: *** [bitcoin-util] Error 1
make[2]: Leaving directory '/home/ubuntu/build/bitcoin/distsrc-riscv64-linux-gnu/src'
Makefile:14421: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/ubuntu/build/bitcoin/distsrc-riscv64-linux-gnu/src'
Makefile:809: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1
  CXXLD    qt/bitcoin-qt.exe
make[2]: Leaving directory '/home/ubuntu/build/bitcoin/distsrc-x86_64-w64-mingw32/src'
make[1]: Leaving directory '/home/ubuntu/build/bitcoin/distsrc-x86_64-w64-mingw32/src'
Making all in doc/man
make[1]: Entering directory '/home/ubuntu/build/bitcoin/distsrc-x86_64-w64-mingw32/doc/man'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/ubuntu/build/bitcoin/distsrc-x86_64-w64-mingw32/doc/man'
make[1]: Entering directory '/home/ubuntu/build/bitcoin/distsrc-x86_64-w64-mingw32'
make[1]: Nothing to be done for 'all-am'.
make[1]: Leaving directory '/home/ubuntu/build/bitcoin/distsrc-x86_64-w64-mingw32'
+ make -j1 -C src check-security
make: Entering directory '/home/ubuntu/build/bitcoin/distsrc-x86_64-w64-mingw32/src'
Checking binary security...
bitcoin-util.exe: failed RELOC_SECTION
make: *** [check-security] Error 1
Makefile:14974: recipe for target 'check-security' failed
make: Leaving directory '/home/ubuntu/build/bitcoin/distsrc-x86_64-w64-mingw32/src'

@fanquake
Copy link
Member

bitcoin-util.exe: failed RELOC_SECTION

This will fix the reloc section issue (same as in #18702):

diff --git a/src/bitcoin-util.cpp b/src/bitcoin-util.cpp
index b702a68bd..30b809871 100644
--- a/src/bitcoin-util.cpp
+++ b/src/bitcoin-util.cpp
@@ -181,7 +181,16 @@ static int CommandLineUtil(int argc, char* argv[])
     return nRet;
 }
 
+#ifdef WIN32
+// Export main() and ensure working ASLR on Windows.
+// Exporting a symbol will prevent the linker from stripping
+// the .reloc section from the binary, which is a requirement
+// for ASLR. This is a temporary workaround until a fixed
+// version of binutils is used for releases.
+__declspec(dllexport) int main(int argc, char* argv[])
+#else
 int main(int argc, char* argv[])
+#endif
 {
     SetupEnvironment();

@DrahtBot
Copy link
Contributor

Gitian builds

File commit f91587f
(master)
commit c05404b
(master and this pull)
bitcoin-core-osx-22-res.yml e200c826eeb7a93c... 5b95d001f42c498d...
*-osx-unsigned.dmg 717ed50827df3258... 92ee3f82dcc0510c...
*-osx64.tar.gz b69aca9c61c5f323... 9d47f5f3ce853747...
*.tar.gz 55ea07e15a1bb201... 05299f06b52f1bf7...
linux-build.log d3c3a429c2a30cbb... d6233a6aa9943c0e...
osx-build.log 145288090ebdfce2... 9fd223c75b33a758...
win-build.log 7dce8d9537232b5a... 311b41cfbc824d95...
bitcoin-core-osx-22-res.yml.diff 988590203fe27d67...
linux-build.log.diff b67e704bb6e15546...
osx-build.log.diff ab557248c7a44d6b...
win-build.log.diff e871442041e9df2f...

@DrahtBot
Copy link
Contributor

Gitian builds

File commit 43f3ada
(master)
commit f1e1281
(master and this pull)
*-aarch64-linux-gnu-debug.tar.gz 559dd36d19c18766... cd9c1f3170534173...
*-aarch64-linux-gnu.tar.gz 2327131dc0b85b16... 8eedd20d804a896e...
*-arm-linux-gnueabihf-debug.tar.gz a344291979c13f62... 333af071421dc200...
*-arm-linux-gnueabihf.tar.gz 3fa15aad12aa0b4d... 29a7e98fdeb16db9...
*-osx-unsigned.dmg daa2cf679fb82613... ffe9dd6ad4a82ead...
*-osx64.tar.gz 72f5f659ccc515d2... 52731e7018bf9659...
*-riscv64-linux-gnu-debug.tar.gz 7203c3f42c26dd51... 014c14e2524d6b10...
*-riscv64-linux-gnu.tar.gz 42b2f7b5e3adba32... ef65bd534f2cb7cf...
*-win64-debug.zip c9d2083970c06a74... 967325049992900f...
*-win64-setup-unsigned.exe 0d56ad727cd6854c... dc8c0db84abe2e91...
*-win64.zip 04a512476cc79e35... 1b22ec5e55c721d6...
*-x86_64-linux-gnu-debug.tar.gz 86cb4df751bb46dc... c9d66637b73204c9...
*-x86_64-linux-gnu.tar.gz 1d287b0c59bfb059... fc6c7f3e812b5252...
*.tar.gz a1ee1dac4c106342... 1d310d3ca909b303...
bitcoin-core-linux-22-res.yml c4a09a6900e447e4... ed438a58e3fe308f...
bitcoin-core-osx-22-res.yml 55b7f77fae35f92a... 4404304ceb166d05...
bitcoin-core-win-22-res.yml 77d6843038373494... 07f7671331d5d980...
linux-build.log 35bd4b0a51da2e8f... 2898518c18b0253a...
osx-build.log 5aff87f4cdceb992... 2775bb9f1d4a8b16...
win-build.log 93ca97a3a1aa62e6... 04957fb18924cf58...
bitcoin-core-linux-22-res.yml.diff e3c62fa0eeafe304...
bitcoin-core-osx-22-res.yml.diff 6cb456800f201957...
bitcoin-core-win-22-res.yml.diff d10625a721ec1f2d...
linux-build.log.diff acf9f6435085666c...
osx-build.log.diff 411c584779df7994...
win-build.log.diff 4bc1d991ba4ef85a...

Thanks to muxator, JeremyRubin, and gruve-p for spotting.
When mining the first block of a new signet chain, pick a timestamp for
the first block so that after mining 100 blocks the timestamp will be
back to the current time -- this prevents an unnecessary delay before
any miner rewards have matured enough to be spent.  This takes into
account that the delta between blocks may be shorter than 10 minutes due
to attempting to increase the difficulty to match --nbits, but does not
take into account the time spent actually generating the 100 blocks.
@ajtowns ajtowns force-pushed the 202101-signet-tweak branch from f30c348 to b3c712c Compare February 6, 2021 21:05
@ajtowns
Copy link
Contributor Author

ajtowns commented Feb 6, 2021

Rebased on top of #20715 and updated to use GetCommand, also removed some commented-out debug code.

@maflcko maflcko added this to the 22.0 milestone Jun 17, 2021
@maflcko
Copy link
Member

maflcko commented Jun 17, 2021

Forgot about this because it wasn't tagged 22.0

@laanwj
Copy link
Member

laanwj commented Jun 18, 2021

Code review ACK b3c712c
(and tested the help functionality)

@maflcko maflcko requested a review from kallewoof June 18, 2021 17:29
@laanwj laanwj merged commit 0f47e01 into bitcoin:master Jun 18, 2021
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Jun 18, 2021
@kallewoof
Copy link
Contributor

Post-merge ACK

gwillen pushed a commit to ElementsProject/elements that referenced this pull request Jun 1, 2022
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Aug 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants