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

#24545 bip324-enable #14

Open
wants to merge 48 commits into
base: master
Choose a base branch
from
Open

#24545 bip324-enable #14

wants to merge 48 commits into from

Conversation

dhruv
Copy link
Owner

@dhruv dhruv commented Oct 20, 2022

No description provided.

sipa and others added 30 commits October 19, 2022 13:50
Co-authored-by: dhruv <856960+dhruv@users.noreply.github.com>
Xoroshiro128++ is a fast non-cryptographic random generator.
Reference implementation is available at https://prng.di.unimi.it/

Co-Authored-By: Pieter Wuille <pieter@wuille.net>
Co-authored-by: Jonas Schnelli <dev@jonasschnelli.ch>
Co-authored-by: Jonas Schnelli <dev@jonasschnelli.ch>
e46f81abd6 ElligatorSwift
d556a9d9aa Add benchmark for key generation
855c8e667d Add x-only ecmult_const version for x=n/d
223ccb76d1 doc: Describe Jacobi calculation in safegcd_implementation.md
a72e280efe Native jacobi symbol algorithm
694ce8f Merge bitcoin-core/secp256k1#1131: readme: Misc improvements
88b0089 readme: Fix line break
78f5296 readme: Sell "no runtime dependencies"
ef48f08 readme: Add IRC channel
9f8a13d Merge bitcoin-core/secp256k1#1128: configure: Remove pkgconfig macros again (reintroduced by mismerge)
cabe085 configure: Remove pkgconfig macros again (reintroduced by mismerge)
3efeb9d Merge bitcoin-core/secp256k1#1121: config: Set preprocessor defaults for ECMULT_* config values
6a873cc Merge bitcoin-core/secp256k1#1122: tests: Randomize the context with probability 15/16 instead of 1/4
17065f4 tests: Randomize the context with probability 15/16 instead of 1/4
c27ae45 config: Remove basic-config.h
da6514a config: Introduce DEBUG_CONFIG macro for debug output of config
63a3565 Merge bitcoin-core/secp256k1#1120: ecmult_gen: Skip RNG when creating blinding if no seed is available
d0cf55e config: Set preprocessor defaults for ECMULT_* config values
55f8bc9 ecmult_gen: Improve comments about projective blinding
7a86955 ecmult_gen: Simplify code (no observable change)
4cc0b1b ecmult_gen: Skip RNG when creating blinding if no seed is available
af65d30 Merge bitcoin-core/secp256k1#1116: build: Fix #include "..." paths to get rid of further -I arguments
40a3473 build: Fix #include "..." paths to get rid of further -I arguments
43756da Merge bitcoin-core/secp256k1#1115: Fix sepc256k1 -> secp256k1 typo in group.h
069aba8 Fix sepc256k1 -> secp256k1 typo in group.h
accadc9 Merge bitcoin-core/secp256k1#1114: `_scratch_destroy`: move `VERIFY_CHECK` after invalid scrach space check
cd47033 Merge bitcoin-core/secp256k1#1084: ci: Add MSVC builds
1827c9b scratch_destroy: move VERIFY_CHECK after invalid scrach space check
49e2acd configure: Improve rationale for WERROR_CFLAGS
8dc4b03 ci: Add a C++ job that compiles the public headers without -fpermissive
51f296a ci: Run persistent wineserver to speed up wine
3fb3269 ci: Add 32-bit MinGW64 build
9efc2e5 ci: Add MSVC builds
2be6ba0 configure: Convince autotools to work with MSVC's archiver lib.exe
bd81f41 schnorrsig bench: Suppress a stupid warning in MSVC
09f3d71 configure: Add a few CFLAGS for MSVC
3b4f3d0 build: Reject C++ compilers in the preprocessor
1cc0941 configure: Don't abort if the compiler does not define __STDC__
cca8cbb configure: Output message when checking for valgrind
1a6be57 bench: Make benchmarks compile on MSVC

git-subtree-dir: src/secp256k1
git-subtree-split: e46f81abd67e6d2d4d2399814b8c9fc982218aac
e46f81abd6 ElligatorSwift
d556a9d9aa Add benchmark for key generation
855c8e667d Add x-only ecmult_const version for x=n/d
223ccb76d1 doc: Describe Jacobi calculation in safegcd_implementation.md
a72e280efe Native jacobi symbol algorithm
694ce8f Merge bitcoin-core/secp256k1#1131: readme: Misc improvements
88b0089 readme: Fix line break
78f5296 readme: Sell "no runtime dependencies"
ef48f08 readme: Add IRC channel
9f8a13d Merge bitcoin-core/secp256k1#1128: configure: Remove pkgconfig macros again (reintroduced by mismerge)
cabe085 configure: Remove pkgconfig macros again (reintroduced by mismerge)
3efeb9d Merge bitcoin-core/secp256k1#1121: config: Set preprocessor defaults for ECMULT_* config values
6a873cc Merge bitcoin-core/secp256k1#1122: tests: Randomize the context with probability 15/16 instead of 1/4
17065f4 tests: Randomize the context with probability 15/16 instead of 1/4
c27ae45 config: Remove basic-config.h
da6514a config: Introduce DEBUG_CONFIG macro for debug output of config
63a3565 Merge bitcoin-core/secp256k1#1120: ecmult_gen: Skip RNG when creating blinding if no seed is available
d0cf55e config: Set preprocessor defaults for ECMULT_* config values
55f8bc9 ecmult_gen: Improve comments about projective blinding
7a86955 ecmult_gen: Simplify code (no observable change)
4cc0b1b ecmult_gen: Skip RNG when creating blinding if no seed is available
af65d30 Merge bitcoin-core/secp256k1#1116: build: Fix #include "..." paths to get rid of further -I arguments
40a3473 build: Fix #include "..." paths to get rid of further -I arguments
43756da Merge bitcoin-core/secp256k1#1115: Fix sepc256k1 -> secp256k1 typo in group.h
069aba8 Fix sepc256k1 -> secp256k1 typo in group.h
accadc9 Merge bitcoin-core/secp256k1#1114: `_scratch_destroy`: move `VERIFY_CHECK` after invalid scrach space check
cd47033 Merge bitcoin-core/secp256k1#1084: ci: Add MSVC builds
1827c9b scratch_destroy: move VERIFY_CHECK after invalid scrach space check
49e2acd configure: Improve rationale for WERROR_CFLAGS
8dc4b03 ci: Add a C++ job that compiles the public headers without -fpermissive
51f296a ci: Run persistent wineserver to speed up wine
3fb3269 ci: Add 32-bit MinGW64 build
9efc2e5 ci: Add MSVC builds
2be6ba0 configure: Convince autotools to work with MSVC's archiver lib.exe
bd81f41 schnorrsig bench: Suppress a stupid warning in MSVC
09f3d71 configure: Add a few CFLAGS for MSVC
3b4f3d0 build: Reject C++ compilers in the preprocessor
1cc0941 configure: Don't abort if the compiler does not define __STDC__
cca8cbb configure: Output message when checking for valgrind
1a6be57 bench: Make benchmarks compile on MSVC

git-subtree-dir: src/secp256k1
git-subtree-split: e46f81abd67e6d2d4d2399814b8c9fc982218aac
dhruv pushed a commit that referenced this pull request Dec 15, 2022
e4be0e9 test: add -maxtipage test for the maximum allowable value (James O'Beirne)
a451e83 fix: validation: cast now() to seconds for maxtipage comparison (James O'Beirne)

Pull request description:

  Since bitcoin@faf4487, the maxtipage comparison in IsInitialBlockDownload() has been broken, since the NodeClock::now() time_point is in the system's native denomination (nanoseconds).

  Without this patch, specifying the maximum allowable -maxtipage (9223372036854775807) results in a SIGABRT crash:

  ```
  % gdb --args ./src/bitcoind -maxtipage=9223372036854775207 -minimumchainwork=0x00 -stopatheight=30000
  ...
  2022-11-09T15:55:17Z [dnsseed] dnsseed thread exit
  [Thread 0x7fff937fe640 (LWP 69883) exited]

  Thread 29 "b-msghand" received signal SIGABRT, Aborted.
  [Switching to Thread 0x7fff91ffb640 (LWP 69886)]
  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44
  44      ./nptl/pthread_kill.c: No such file or directory.
  (gdb) bt
  #0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44
  #1  0x00007ffff768989f in __pthread_kill_internal (signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:78
  #2  0x00007ffff763da52 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
  #3  0x00007ffff7628469 in __GI_abort () at ./stdlib/abort.c:79
  #4  0x00007ffff7cf79a4 in __mulvdi3 () from /lib/x86_64-linux-gnu/libgcc_s.so.1
  #5  0x00005555558d13ab in std::chrono::__duration_cast_impl<std::chrono::duration<long, std::ratio<1l, 1000000000l> >, std::ratio<1000000000l, 1l>, long, false, true>::__cast<long, std::ratio<1l, 1l> > (__d=...) at /usr/include/c++/12/bits/chrono.h:521
  #6  std::chrono::duration_cast<std::chrono::duration<long, std::ratio<1l, 1000000000l> >, long, std::ratio<1l, 1l> > (__d=...)
      at /usr/include/c++/12/bits/chrono.h:260
  #7  std::chrono::duration<long, std::ratio<1l, 1000000000l> >::duration<long, std::ratio<1l, 1l>, void> (__d=..., this=<optimized out>)
      at /usr/include/c++/12/bits/chrono.h:514
  #8  std::chrono::operator-<long, std::ratio<1l, 1000000000l>, long, std::ratio<1l, 1l> > (__rhs=..., __lhs=...)
      at /usr/include/c++/12/bits/chrono.h:650
  #9  std::chrono::operator-<NodeClock, std::chrono::duration<long, std::ratio<1l, 1000000000l> >, long, std::ratio<1l, 1l> > (__rhs=...,
      __lhs=...) at /usr/include/c++/12/bits/chrono.h:1020
  #10 Chainstate::IsInitialBlockDownload (this=0x555556071940) at ./src/validation.cpp:1545
  #11 0x00005555556efd1e in operator() (__closure=<optimized out>) at ./src/net_processing.cpp:3369
  #12 (anonymous namespace)::PeerManagerImpl::ProcessMessage (this=0x555556219be0, pfrom=..., msg_type=..., vRecv=..., time_received=...,
      interruptMsgProc=...) at ./src/net_processing.cpp:3369
  #13 0x00005555556f75cc in (anonymous namespace)::PeerManagerImpl::ProcessMessages (this=0x555556219be0, pfrom=<optimized out>,
      interruptMsgProc=std::atomic<bool> = { false }) at ./src/net_processing.cpp:4985
  #14 0x00005555556a83c9 in CConnman::ThreadMessageHandler (this=0x5555560ebc70) at ./src/net.cpp:2014
  #15 0x0000555555c4d5d6 in std::function<void ()>::operator()() const (this=0x7fff91ffadb0) at /usr/include/c++/12/bits/std_function.h:591
  #16 util::TraceThread(std::basic_string_view<char, std::char_traits<char> >, std::function<void ()>) (
      thread_name="0\255\377\221\377\177\000\000\v\000\000\000\000\000\000\000TraceThread\000\000\000\000\000P\255\377\221\377\177\000\000\017\000\000\000\000\000\000\000util/thread.cpp\000\000\000\000\000\000\000\000\000\000ihB鵿6\000\000\000\000\000\000\000\000\260\255\377\221\377\177\000\000\277\211\321UUU\000\000p\324\304UUU\000\000\002\000\000\000\000\000\000\000\240xh\367\377\177\000\000\000\000\000\000\000\000\000\000]\340iUUU\000\000p\274\016VUU\000\000\000\000\000\000\000\000\000\000\300\303iUUU\000\000p\206jUUU", '\000' <repeats 11 times>, "ihB鵿6\200\251!VUU\000\000"..., thread_func=...) at util/thread.cpp:21
  bitcoin#17 0x000055555569e05d in std::__invoke_impl<void, void (*)(std::basic_string_view<char>, std::function<void()>), char const*, CConnman::Start(CScheduler&, const Options&)::<lambda()> > (__f=<optimized out>) at /usr/include/c++/12/bits/invoke.h:61
  bitcoin#18 std::__invoke<void (*)(std::basic_string_view<char>, std::function<void()>), char const*, CConnman::Start(CScheduler&, const Options&)::<lambda()> > (__fn=<optimized out>) at /usr/include/c++/12/bits/invoke.h:96
  bitcoin#19 std::thread::_Invoker<std::tuple<void (*)(std::basic_string_view<char, std::char_traits<char> >, std::function<void()>), char const*, CConnman::Start(CScheduler&, const Options&)::<lambda()> > >::_M_invoke<0, 1, 2> (this=<optimized out>) at /usr/include/c++/12/bits/std_thread.h:252
  bitcoin#20 std::thread::_Invoker<std::tuple<void (*)(std::basic_string_view<char, std::char_traits<char> >, std::function<void()>), char const*, CConnman::Start(CScheduler&, const Options&)::<lambda()> > >::operator() (this=<optimized out>) at /usr/include/c++/12/bits/std_thread.h:259
  bitcoin#21 std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (*)(std::basic_string_view<char, std::char_traits<char> >, std::function<void()>), char const*, CConnman::Start(CScheduler&, const Options&)::<lambda()> > > >::_M_run(void) (this=<optimized out>)
      at /usr/include/c++/12/bits/std_thread.h:210
  bitcoin#22 0x00007ffff7ad43d3 in ?? () from /lib/x86_64-linux-gnu/libstdc++.so.6
  bitcoin#23 0x00007ffff7687b27 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:435
  bitcoin#24 0x00007ffff770a78c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
  (gdb)
  ```

ACKs for top commit:
  MarcoFalke:
    review ACK e4be0e9 🏽

Tree-SHA512: d892d6264a284d952a68a8631a6301277373b8df939dafd9e2652f2f22ab60712cde63b90c27c67ea2d05f02443452e3e4e1b9f25479bfaca00d4c4de13b9fbd
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