Skip to content

Conversation

sipa
Copy link
Member

@sipa sipa commented Nov 5, 2014

No description provided.

rebroad and others added 30 commits October 14, 2014 15:42
Remember out-of-order block headers along with disk positions. This is
likely the simplest and least-impact way to make -reindex work with
headers first.

Based on top of bitcoin#4468.
Instead of skipping to the last reindexed block in each file (which could
jump over processed out-of-order blocks), just skip each already processed
block individually.
Previous refactorings broke the ability to rebuild the chainstate by deleting the chainstate
directory, resulting in an incorrect "Incorrect or no genesis block found" error message. Fix
that.

Also, improve the performance of ActivateBestBlockStep by using the skiplist to only discover
a few potential blocks to connect at a time, instead of all blocks forever - as we likely bail
out after connecting a single one anyway.
There's only one case where a vector containing a fundamental type is
serialized all-at-once, unsigned char. Anything else would lead to
strange results.

Use a dummy argument to overload in that case.
There's only one user of this form of serialization, so it can be easily
dropped. It could be re-added if desired when we switch to c++11.
This allows CECKey to be used without directly depending on the secure
allocators
5f4bcf6 boost: drop boost dependency in version.cpp. (Cory Fields)
352058e boost: drop boost dependency in utilstrencodings.cpp (Cory Fields)
e1c9467 boost: drop boost dependency in core.cpp (Cory Fields)
e405aa4 boost: remove CPrivKey dependency from CECKey (Cory Fields)
5295506 boost: drop dependency on tuple in serialization (Cory Fields)
1d9b86d boost: drop dependency on is_fundamental in serialization (Cory Fields)
7d41e6f Merge upstream LevelDB 1.18
803d692 Release 1.18

git-subtree-dir: src/leveldb
git-subtree-split: 7d41e6f
e8ea0fd MOVEONLY: CInPoint from core to txmempool (jtimon)
Remove CBaseChainParams::NetworkID()
…t the message contains sensitive information. This keeps the message from being output to the debug log by bitcoind. Fixes a possible security risk when starting bitcoind in server mode without the 'rpcpassword' option configured, resulting in the "suggested" password being output to the debug log.
6f155bd Add LIBTOOLFLAGS CXX tag to qt makefile include (Michael Ford)
e11b2ce Fix large reorgs (Pieter Wuille)
afc32c5 Fix rebuild-chainstate feature and improve its performance (Pieter Wuille)
16d5194 Skip reindexed blocks individually (Pieter Wuille)
ad96e7c Make -reindex cope with out-of-order blocks (Wladimir J. van der Laan)
e17bd58 Rename setBlockIndexValid to setBlockIndexCandidates (Pieter Wuille)
1af838b Add height to "Requesting block" debug (R E Broadley)
1bcee67 Better logging of stalling (R E Broadley)
4c93322 Improve getheaders (sending) logging (R E Broadley)
f244c99 Remove CheckMinWork, as we always know all parent headers (Pieter Wuille)
ad6e601 RPC additions after headers-first (Pieter Wuille)
341735e Headers-first synchronization (Pieter Wuille)
… from CScripts

This allows for a reversal of the current behavior.

This:
CScript foo;
CScriptID bar(foo.GetID());

Becomes:
CScript foo;
CScriptID bar(foo);

This way, CScript is no longer dependent on CScriptID or Hash();
This should move to a util header once their dependencies are cleaned up.
@sipa
Copy link
Member Author

sipa commented Nov 18, 2014

Sorry, I updated the secp256k1 code to a newer version. I'll pull in further updates as extra commits instead.

@gmaxwell
Copy link
Contributor

ugh. why does this the .patch for this PR write files all over src/ instead of putting them in secp256k1/src/ ? I guess this is just something screwy with github and subtrees?

@gmaxwell
Copy link
Contributor

ACK.

@TheBlueMatt
Copy link
Contributor

@gmaxwell thats a git bug, not a github bug (go try to rebase this pull, git will spew crap all over src/)

@laanwj laanwj merged commit f9e40fb into bitcoin:master Nov 19, 2014
laanwj added a commit that referenced this pull request Nov 19, 2014
f9e40fb revert part of 9eda162 (Cory Fields)
4300876 build: secp256k1 as a subdir, since it's required (Cory Fields)
0dc8613 build: fixup configure to not export anything (Cory Fields)
54566de depends: quit exporting in config.site (Cory Fields)
ff1e5ba depends: add gmp package (Cory Fields)
cf61b54 Don't use bashisms in configure (Pieter Wuille)
dffb8f8 Use libsecp256k1 in key.cpp (Pieter Wuille)
4c97c64 Do not use EC code in global constructors (Pieter Wuille)
07a9901 Always build and link libsecp256k1 (Pieter Wuille)
d48555b Squashed 'src/secp256k1/' content from commit ad2028f (Pieter Wuille)
7a7e109 Delete src/secp256k1 before subtree import (Pieter Wuille)
@Diapolo
Copy link

Diapolo commented Nov 19, 2014

@sipa Is there a readme in the libs dir howto build without our toolchain used here?

@sipa
Copy link
Member Author

sipa commented Nov 19, 2014

Generally you would first build libsecp256k1.la inside the secp256k1 directory, and then link against it. What that translates to for $UNSPECIFIED_OTHER_BUILD_SYSTEM, no idea.

@cozz
Copy link
Contributor

cozz commented Nov 19, 2014

Why are there so many commits (250+) in this pull request, and 1122 files changed? It looks like a lot of old commits got remerged, is this intentional? I am no git-expert, it just looks weird here on github.
To me it looks like we did something wrong when rebasing.

Headline says "laanwj merged 7,292 commits into bitcoin:master"

@sipa
Copy link
Member Author

sipa commented Nov 19, 2014

Github just barfs at this for some reason. The actual commit in git is fine.

@cozz
Copy link
Contributor

cozz commented Nov 19, 2014

ok, fine with me. The old commit hashes are still the same, so it really looks like only github got confused.

@laanwj
Copy link
Member

laanwj commented Nov 19, 2014

Indeed, Actual Git shows everything is fine. I've seen this before, not sure what causes it; maybe github gets confused by subtree as well.

@Diapolo
Copy link

Diapolo commented Nov 26, 2014

@sipa I needed to build gmp with my MinGW-w64 compiler and used:

./configure --prefix=$PWD/dist --enable-static --disable-shared
make && make install

Then I tried to build libsecp256k1 via:

./autogen.sh
./configure --prefix=$PWD/dist
make && make install

Now when trying to link to libsecp256k1 I get a bunch of these:

C:/Users/Diapolo/bitcoin.Qt/src/secp256k1/dist/lib/libsecp256k1.a(libsecp256k1_la-secp256k1.o): In function `secp256k1_num_set_bin':
c:\Users\Diapolo\bitcoin.Qt\src\secp256k1/src/num_gmp_impl.h:73: undefined reference to `__gmpn_set_str'

Any idea for me?

Seems it was my link order, changed from -lgmp -lsecp256k1 to -lsecp256k1 -lgmp!

New question, does gmp NEED OpenSSL to work for what you are doing with it in secp256k1? Seems I was missing crypto.h during gmp build!

@laanwj
Copy link
Member

laanwj commented Nov 26, 2014

gmp does certainly not require OpenSSL

Doesn't 'make' in depends work for you? You shouldn't have to manually build dependencies anymore.

@Diapolo
Copy link

Diapolo commented Nov 26, 2014

My MSYS + MinGW-w64 toolchain (that I manually setup on my Win machine) did give me headaches with what we now use as build system and because of that I'm still using Qt Creator and the .pro file, which I now upgraded to make use of libsecp256k1 ;).

@laanwj
Copy link
Member

laanwj commented Nov 26, 2014

Where does it fail?
At least in theory the depends system should work with any toolchain.
Of course there may still be a few warts in it in practice, but it seems more constructive to solve those, also for other people that want to build with MinGW, than maintaining your own build system on the side. But of course it's up to you.

@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.