Skip to content

Conversation

@sipa
Copy link
Member

@sipa sipa commented Mar 27, 2015

Included libsecp256k1 changes (multiple authors):

  • Converted some runtime initialization to static constants.
  • Convert all code to strict C89 (+ long long, + __int128).
  • Get rid of variable-length string conversion code.
  • Introduce a compact storage type, and use it for precomputed tables.
  • Extra benchmarks.
  • More x86_64 assembly (speeds up signing mostly).
  • Fast byteswapping inside hash functions.
  • Make the built-in RFC6979 nonce generator support additional entropy.
  • Use RFC6979 as test RNG.

theuni and others added 30 commits January 17, 2015 03:31
They may not contain all necessary characters for a language
1a25a7e [QA] fix httpbasic keep-alive test (Jonas Schnelli)
7d2cb48 Restore RPC HTTP keepalives to default. (Gregory Maxwell)
73cd4ed qt: avoid hard-coding font names (Cory Fields)
52954e6 qt: fix broken unicode chars on osx 10.10 (Cory Fields)
f5ad78b qt: fonts: allow SubstituteFonts to filter based on user's language (Cory Fields)
The main thread spends time waiting for the DetectShutdownThread.
So why not just run this waiting loop function in the main thread?

One thread-stack less saves 4MB of virtual memory on 32-bit, and 8MB on
64-bit.
…uilds

Also increase temp dmg filesize to account for a bigger background image
Also do a bit of cleanup:
 - Make the background name a variable so it's easier to change
 - Add proper make dependencies
f0172bf osx: bump build sdk to 10.9 (Cory Fields)
1d84aea Coin Control: Use U+2248 "ALMOST EQUAL TO" rather than a simple tilde (which may be mistaken for a negative sign) (Luke Dashjr)
2ce63d3 MOVEONLY: Move struct CBlockTemplate to miner.h (from main.h) (Luke Dashjr)
No longer necessary since bitcoin#5161 / 845c86d.
e7cfcc8 Remove custom pkg.m4 script. (randy-waterhouse)
0eade74 fix crash: CoinControl "space" bug (fsb4000)
0cc0d8d Get rid of the internal miner's hashmeter (jtimon)
2fa9a8e Make empty byte arrays pass CheckSignatureEncoding() (Peter Todd)
44bc988 [Wallet] Do not flush the wallet in AddToWalletIfInvolvingMe(..) (Cozz Lovan)
ff09e31 sleep-wait on genesis block during init with -reindex (Matt Corallo)
785bb81 [Qt] remove size grip to get rid of the right margin (Jonas Schnelli)
652eb90 [Qt] change transaction table column width (Jonas Schnelli)
af95b17 [Qt] resize oversized icons (Jonas Schnelli)
7b782f5 RPCWallet: Notate all account stuff as deprecated (Luke Dashjr)
5fdc5b0 depends: latest config.guess and config.sub (Michael Ford)
rubensayshi and others added 13 commits March 24, 2015 14:53
8a893c9 Includes: Do not include main.h from any other header (Jorge Timón)
eca0b1e Includes: MOVEONLY: move more method definitions out of wallet.h (Jorge Timón)
26c16d9 Includes: Refactor: Move CValidationInterface and CMainSignals out of main (Jorge Timón)
d698ef6 Consensus: Refactor: Decouple pow.o from chainparams.o (Jorge Timón)
bd00611 Consensus: Refactor: Introduce Consensus::Params class (Jorge Timón)
fc72020 don't trickle for whitelisted nodes (Ruben de Vries)
5983a4e Add a NODE_GETUTXO service bit and document NODE_NETWORK. Stop translating the NODE_* names as they are technical and cannot be translated. (Mike Hearn)
Instead of manually tweaking the deterministic nonce post-generation,
pass the test case number in as extra entropy to RFC6979.
@gmaxwell
Copy link
Contributor

ACK.

I was uncomfortable with (and complained about) the "test nonce" approach used previously as it used seriously insecure linearly related nonces... this was fine for tests but it seemed like a matter of time before someone wanted to use it to derandomize regular signing (and, indeed, someone recently asked about that).

Copy link
Member

Choose a reason for hiding this comment

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

Happy to get rid of this function.

@laanwj
Copy link
Member

laanwj commented Apr 1, 2015

ACK to bitcoin core changes, haven't been able to review all secp256k1 changes.

@sipa
Copy link
Member Author

sipa commented Apr 1, 2015

Would it be interesting to have a more automated way for verifying that the contents of the subtree directory matches the contents of the listed commit of the subtree repository?

@laanwj
Copy link
Member

laanwj commented Apr 2, 2015

Yes, a script that compares our secp256k1 directory with an upstream repository would be useful.
Probably amounts to one, fairly complicated, git diff statement but my knowledge of git subtrees is not enough to come up with it.

@theuni
Copy link
Member

theuni commented Apr 2, 2015

upstream secp256k1 commit is 1897b8e

git diff 1897b8e origin/pr/5952:src/secp256k1

@sipa
Copy link
Member Author

sipa commented Apr 2, 2015

Another way is checking the git tree id:

(in master)

$ git ls-tree master src/secp256k1
040000 tree 3b675a638355f8ccad0474900fed0bffcda8e62a    src/secp256k1

(in secp256k1, with 50cc6ab the commit id of the last secp256k1 import)

$ git show --format=raw 50cc6ab | head -n2
commit 50cc6ab0625efda6dddf1dc86c1e2671f069b0d8
tree 3b675a638355f8ccad0474900fed0bffcda8e62a

@laanwj
Copy link
Member

laanwj commented Apr 8, 2015

Checked the subtree using #5965's git-subtree-check.sh script.

src/secp256k1 in HEAD was last updated to upstream commit 1897b8e90bbbdcd919427c9a8ae35b420e919d8f (tree 1c8df9fa9ddfb2b035ac0327fe074b634e458f56)
src/secp256k1 in HEAD currently refers to tree 1c8df9fa9ddfb2b035ac0327fe074b634e458f56
GOOD

ACK

@laanwj laanwj merged commit 437ada3 into bitcoin:master Apr 8, 2015
laanwj added a commit that referenced this pull request Apr 8, 2015
437ada3 Switch test case signing to RFC6979 extra entropy (Pieter Wuille)
9d09322 Squashed 'src/secp256k1/' changes from 50cc6ab..1897b8e (Pieter Wuille)
@SergioDemianLerner
Copy link
Contributor

I did a first pass review of all changes, but the number of changes is huge! Most of them are simply the removal of a variable declaration from its first use. However, many reviewers of this commit would be helpful.

@gmaxwell
Copy link
Contributor

@SergioDemianLerner This is a subtree merge from the libsecp256k1 repository ( https://github.com/bitcoin/secp256k1/ ), merging in months of work; you can see the individual changes there (and the review process there). The big stirring you're reffering to was the change of the codebase to be strict standards conformant C89.

It's much easier to review from its actual repository because e.g. with the changes split out you can verify various changes that shouldn't have changed the binaries didn't and such.

@sipa
Copy link
Member Author

sipa commented Apr 11, 2015 via email

@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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.