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

Update base to Bitcoin Core 0.10.4 #282

Merged
merged 1,103 commits into from Nov 10, 2015

Conversation

Projects
None yet
4 participants
@dexX7
Copy link
Member

dexX7 commented Nov 10, 2015

This pull request updates the base to Bitcoin Core 0.10.4.

See the release notes for Bitcoin Core 0.10.4.

I resolved the merge conflict via 3fc4be1, and in addition I updated the READMEs and Omni Core release notes via 9406da0 and 2de9bba.

I'm going to push a seperate PR to bump the Omni Core version to release candidate 2 soon.

I bumped the release status to "rc2" via a293fce.

dexX7 and others added some commits Aug 3, 2015

Seperate logic from plain transaction parsing
To turn parseTransaction() into a side effect free function, the DEx payment and Exodus purchase logic was extracted, and moved into new functions, which are called directly from the transaction handler.

The legacy parsing is mostly untouched, and the new logic functions are only executed, if the non-legacy parsing function is used.

parseTransaction() returns a negative error code, 1 (potential DEx payment), or 0, if it's an Omni transaction with payload. This should not have an impact, given that it's usually used with checks such as < 0, == 0, >= 0, or > 0.

Because the result of the transaction handler is either valid, or invalid, a boolean is returned instead of a number.

These changes pave the way for further restructuring, and finer control over the state, as well as better signal handling.
Add debug option to disable legacy parsing
This is intended as *debug* option, and *should never* be used in production environments.

With "-omnidisablelegacy" the legacy parsing/processing can be disabled, as if class C was already activated.
Add debug category for potential DEx payments
The debug category "parser_dex" can be used to enable or disable log entries such as the following:

  !! sender: 1xC6gPa4QTM18cPKKPutcEkfmZvabY38j , receiver:
  !! this may be the BTC payment for an offer !!
  payment #0 1MHDaZFhV3R1cL4b4qQeSZ5baZAgj7NYa 1222222

To maintain current behavior, it's enabled per default.
Merge pull request #158
744b7e1 Add debug category for potential DEx payments (dexX7)
0449533 Add debug option to disable legacy parsing (dexX7)
d96207a Seperate logic from plain transaction parsing (dexX7)
Fix RPC value mismatches of pending transactions
The field names of the confirmed transaction objects was adopted.
Merge pull request #173
0356f8f Add missing fields for transaction retrieval via RPC (dexX7)
65134df Fix RPC value mismatches of pending transactions (dexX7)
Move CheckFee into wallet related file
Note: CheckFee should be refined!
Use ENABLE_WALLET to wrap wallet fetch functions
And slightly refine the rest:

- use const where possible
- reorder functions
Support handling of valid and invalid UTF-8 encoded strings
SanitizeInvalidUTF8() can be used to replace invalid UTF-8 characters or character sequences in strings with question marks.

 - The size of the result is always equal to the size of the input.
 - Multibyte sequences are supported.
 - Reserved unicode characters are not considered as invalid.
 - Validity is not dependent on the system's locale.
Sanitize RPC responses and replace non-UTF-8 compliant characters
RPC responses, which go through the RPC server, are sanitized, and invalid characters, or character sequences, are replaced with question marks "?".

Many RPC implementations need special handling for invalid UTF-8 encoded strings, and this change is intended to shift this burden from the client to the server.
Fix Omni transaction count value passed into block end handler
Note: Instead of passing the number of Omni transactions in the block to the block end handler, msc_initial_scan passes in nFound which is a cumulative total of the number of transactions found during the entire scan, not the number of transactions found in that particular block.  Thus the block end handler gets a positive value for the number of Omni transactions in each block regardless of whether there actually were any.  This causes any actions that should only be executed on Omni containing blocks (such as wallet cache checks) to instead be executed every block.
Merge pull request #177
c67965f Sanitize RPC responses and replace non-UTF-8 compliant characters (dexX7)
8d077ad Support handling of valid and invalid UTF-8 encoded strings (dexX7)
Add consensus checkpoint for block 370000
Note: can be verified by running a full fresh parse with --startclean --omniseedblockfilter=false --omnidebug=consensus_hash_every_block and then checking the log for the consensus hash entry for block 370000.
Merge pull request #179
23008bc Add consensus checkpoint for block 370000 (zathras-crypto)
Merge pull request #180
e7eb805 Update seed blocks to 370000 (zathras-crypto)
Merge pull request #178
f3cc67c Fix Omni transaction count value passed into block end handler (zathras-crypto)
Update transaction count variables in msc_initial_scan
This is hopefully more clear, what they are referring to.
Support unconfirmed transactions via omni_gettransaction
The fields were slightly reordered, to group related values, and the fields "blockhash" and "block" were added.

Only if a transaction is confirmed, the fields "valid", "blockhash", "blocktime" and "block" are included. Unconfrimed DEx payments are rejected, indicating that the transaction is unconfrimed. Because the effect on the global state is only avaiable for confirmed transacitons, the extended mode, which is usually interacting with global state, is downgraded to basic mode, if the transaction is unconfirmed. This has impact on "omni_getsto" or "omni_gettrade", but in any case, the basic mode also returns at least the information that would be available via the pending map.
Fetch unconfirmed trasanction information for RPC/UI directly
There is no longer need to fetch pending transactions from the pending map, because the data can also directly be retrieved. The level of information is likely higher, and there is already support for all transaction types.
Remove description from pending transaction objects
Because unconfirmed transactions are now directly parsed, there is no longer need to store descriptions for pending transactions.

dexX7 added some commits Nov 4, 2015

Merge pull request #278
c881745 Replace splashes to remove OmniWallet branding (zathras-crypto)
Add release notes for Omni Core 0.0.10
Thanks to zathras-crypto, marvgmail and CraigSellars for input and review!
Merge pull request #269
17932ee Add release notes for Omni Core 0.0.10 (dexX7)
1e6f424 Document -omniseedblockfilter configuration option (dexX7)
e3ef010 Rename files of historical release notes (dexX7)
9c0f8b9 Remove pending features from README.md (dexX7)
ccf5955 Add historical release notes for 0.0.9.2 (dexX7)
Bump version to 0.0.10.0-rc1
The version schema was slightly changed, to ensure the resulting number is higher than the version number of Master Core v0.0.9.3.

OMNICORE_VERSION_BUILD pretty much serves as dummy/filler in this context.

The version number, used by the alert/notification system:

 - 1000000

The version string returned by "omni_getinfo":

 - "0.0.10-rc1"

This results in the following file names:

 - omnicore-0.0.10.0-rc1-linux32.tar.gz
 - omnicore-0.0.10.0-rc1-linux64.tar.gz
 - omnicore-0.0.10.0-rc1-osx-unsigned.tar.gz
 - omnicore-0.0.10.0-rc1-win32-setup.exe
 - omnicore-0.0.10.0-rc1-win32.zip
 - omnicore-0.0.10.0-rc1-win64-setup.exe
 - omnicore-0.0.10.0-rc1-win64.zip
 - omnicore-0.0.10.0-rc1.tar.gz
Merge pull request #162
3154ea6 Bump version to 0.0.10.0-rc1 (dexX7)
Merge upstream Bitcoin Core 0.10.4
c2e7baf Bump version to 0.10.4, add release notes (Wladimir J. van der Laan)
8b3311f *: alias -h for --help (Daniel Cousens)
97546fc Change URLs to https in debian/control (Matt Corallo)
38671bf Update debian/changelog and slight tweak to debian/control (Matt Corallo)
256321e Correct spelling mistakes in doc folder (Mitchell Cash)
eae0350 Clarification of unit test build instructions. (Eric Lombrozo)
90897ab Update bluematt-key, the old one is long-since revoked (Matt Corallo)
a2f2fb6 build: disable -Wself-assign (Wladimir J. van der Laan)
cf67d8b Bugfix: Allow mining on top of old tip blocks for testnet (fixes testnet-in-a-box use case) (Luke Dashjr)
b3964e3 Drop "with minimal dependencies" from description (Zak Wilcox)
43c2789 Split bitcoin-tx into its own package (Zak Wilcox)
dfe0d4d Include bitcoin-tx binary on Debian/Ubuntu (Zak Wilcox)
612efe8 [Qt] Raise debug window when requested (MarcoFalke)
3ad96bd Fix locking in GetTransaction. (Alex Morcos)
9c81005 Fix spelling of Qt (Diego Viola)
5216f3c Squashed 'src/leveldb/' changes from 7d41e6f..20ca81f (Pieter Wuille)
72a0adf qt: Final translations update on 0.10 branch (Wladimir J. van der Laan)
5dc72f8 CLTV: Add more tests to improve coverage (Esteban Ordano)
6a1343b Add RPC tests for the CHECKLOCKTIMEVERIFY (BIP65) soft-fork (Peter Todd)
4137248 Add CHECKLOCKTIMEVERIFY (BIP65) soft-fork logic (Peter Todd)
0e01d0f Enable CHECKLOCKTIMEVERIFY as a standard script verify flag (Peter Todd)
6d01325 Replace NOP2 with CHECKLOCKTIMEVERIFY (BIP65) (Peter Todd)
750d54f Move LOCKTIME_THRESHOLD to src/script/script.h (Peter Todd)
6897468 Make CScriptNum() take nMaxNumSize as an argument (Peter Todd)
5297194 Set TCP_NODELAY on P2P sockets. (Gregory Maxwell)
fb818b6 Bring historical release notes up to date (Micha)
0b3fd07 build: make sure OpenSSL heeds noexecstack (Wladimir J. van der Laan)

Conflicts:
	src/bitcoin-cli.cpp

```diff
diff --cc src/bitcoin-cli.cpp
index e15d940,9c85db8..0000000
--- a/src/bitcoin-cli.cpp
+++ b/src/bitcoin-cli.cpp
@@@ -66,13 -66,13 +66,18 @@@ static bool AppInitRPC(int argc, char*
      // Parameters
      //
      ParseParameters(argc, argv);
++<<<<<<< HEAD
 +    if (argc<2 || mapArgs.count("-?") || mapArgs.count("-help") || mapArgs.count("-version")) {
 +        std::string strUsage = _("Omni Core RPC client version") + " " + FormatFullVersion() + "\n";
++=======
+     if (argc<2 || mapArgs.count("-?") || mapArgs.count("-h") || mapArgs.count("-help") || mapArgs.count("-version")) {
+         std::string strUsage = _("Bitcoin Core RPC client version") + " " + FormatFullVersion() + "\n";
++>>>>>>> 0.10
          if (!mapArgs.count("-version")) {
              strUsage += "\n" + _("Usage:") + "\n" +
 -                  "  bitcoin-cli [options] <command> [params]  " + _("Send command to Bitcoin Core") + "\n" +
 -                  "  bitcoin-cli [options] help                " + _("List commands") + "\n" +
 -                  "  bitcoin-cli [options] help <command>      " + _("Get help for a command") + "\n";
 +                  "  omnicore-cli [options] <command> [params]  " + _("Send command to Omni Core") + "\n" +
 +                  "  omnicore-cli [options] help                " + _("List commands") + "\n" +
 +                  "  omnicore-cli [options] help <command>      " + _("Get help for a command") + "\n";

              strUsage += "\n" + HelpMessageCli();
          }
```
@dexX7

This comment has been minimized.

Copy link
Member

dexX7 commented Nov 10, 2015

This actually makes me wonder how we deal with Omni Core version numbers. I only bumped the release status:

define(_OMNICORE_VERSION_MILESTONE, 0)
define(_OMNICORE_VERSION_MAJOR, 0)
define(_OMNICORE_VERSION_MINOR, 10)
define(_OMNICORE_VERSION_PATCH, 0)
define(_OMNICORE_VERSION_BUILD, 0)
define(_OMNICORE_VERSION_STATUS, rc2)

However, I actually believe we should have also bumped the version number, but this doesn't currently work well with this schema. Would it be a build or patch bump? As result, we'd release 0.0.10.1, which also doesn't feel right..

@zathras-crypto

This comment has been minimized.

Copy link

zathras-crypto commented Nov 10, 2015

Well technically it would be a patch (or even minor) because we are changing the codebase but agree it doesn't really feel right since 0.0.10.0 is not released yet.

I think the way you have done it is good, but I'd also be happy with 0.0.10.1 if needed (nothing says we have to release every version we make - 0.0.10.1 could simply be our first 0.0.10 public release)

@zathras-crypto

This comment has been minimized.

Copy link

zathras-crypto commented Nov 10, 2015

Building to test now

@zathras-crypto

This comment has been minimized.

Copy link

zathras-crypto commented Nov 10, 2015

FYI

  CXX      omnicore/libbitcoin_server_a-activation.o
In file included from omnicore/activation.cpp:12:0:
./omnicore/version.h:51:37: error: ‘OMNICORE_VERSION_BUILD’ was not declared in this scope
                     +           1 * OMNICORE_VERSION_BUILD;
                                     ^
cc1plus: warning: unrecognized command line option "-Wno-self-assign" [enabled by default]
make[2]: *** [omnicore/libbitcoin_server_a-activation.o] Error 1
make[2]: Leaving directory `/home/zathras/github/build/omnicore/src'

Investigating now...

@dexX7

This comment has been minimized.

Copy link
Member

dexX7 commented Nov 10, 2015

I updated the unit tests, and at least the CI tests should pass now.

I'm not able to reproduce the error you described. Does it also happen, if you start from scratch, with make distclean, ./autogen.sh, ./configure, make?

@zathras-crypto

This comment has been minimized.

Copy link

zathras-crypto commented Nov 10, 2015

Same problem after a make clean and I'm just running another test after redoing autogen.sh & configure

@dexX7

This comment has been minimized.

Copy link
Member

dexX7 commented Nov 10, 2015

That's surprising. Besides the change from rc1 to rc2 I don't see how there is any change that may be related.

@zathras-crypto

This comment has been minimized.

Copy link

zathras-crypto commented Nov 10, 2015

Quick bit of testing, seems fine, all commands tested returned expected results & all checkpoints passed.

OK to merge bud, thanks :)

@dexX7

This comment has been minimized.

Copy link
Member

dexX7 commented Nov 10, 2015

Thanks! :) Will merge, and tag RC2 after the meeting.

@dexX7 dexX7 merged commit 8ee7139 into OmniLayer:omnicore-0.0.10 Nov 10, 2015

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

dexX7 added a commit that referenced this pull request Nov 10, 2015

Merge pull request #282
8ee7139 Update version unit tests for RC2 (dexX7)
a293fce Update Omni Core version to release candidate 2 (dexX7)
2de9bba Update release notes for Bitcoin Core 0.10.4 (dexX7)
9406da0 Update README to indicate Bitcoin Core 0.10.4 base (dexX7)
c2e7baf Bump version to 0.10.4, add release notes (Wladimir J. van der Laan)
8b3311f *: alias -h for --help (Daniel Cousens)
97546fc Change URLs to https in debian/control (Matt Corallo)
38671bf Update debian/changelog and slight tweak to debian/control (Matt Corallo)
256321e Correct spelling mistakes in doc folder (Mitchell Cash)
eae0350 Clarification of unit test build instructions. (Eric Lombrozo)
90897ab Update bluematt-key, the old one is long-since revoked (Matt Corallo)
a2f2fb6 build: disable -Wself-assign (Wladimir J. van der Laan)
cf67d8b Bugfix: Allow mining on top of old tip blocks for testnet (fixes testnet-in-a-box use case) (Luke Dashjr)
b3964e3 Drop "with minimal dependencies" from description (Zak Wilcox)
43c2789 Split bitcoin-tx into its own package (Zak Wilcox)
dfe0d4d Include bitcoin-tx binary on Debian/Ubuntu (Zak Wilcox)
612efe8 [Qt] Raise debug window when requested (MarcoFalke)
3ad96bd Fix locking in GetTransaction. (Alex Morcos)
9c81005 Fix spelling of Qt (Diego Viola)
5216f3c Squashed 'src/leveldb/' changes from 7d41e6f..20ca81f (Pieter Wuille)
72a0adf qt: Final translations update on 0.10 branch (Wladimir J. van der Laan)
5dc72f8 CLTV: Add more tests to improve coverage (Esteban Ordano)
6a1343b Add RPC tests for the CHECKLOCKTIMEVERIFY (BIP65) soft-fork (Peter Todd)
4137248 Add CHECKLOCKTIMEVERIFY (BIP65) soft-fork logic (Peter Todd)
0e01d0f Enable CHECKLOCKTIMEVERIFY as a standard script verify flag (Peter Todd)
6d01325 Replace NOP2 with CHECKLOCKTIMEVERIFY (BIP65) (Peter Todd)
750d54f Move LOCKTIME_THRESHOLD to src/script/script.h (Peter Todd)
6897468 Make CScriptNum() take nMaxNumSize as an argument (Peter Todd)
5297194 Set TCP_NODELAY on P2P sockets. (Gregory Maxwell)
fb818b6 Bring historical release notes up to date (Micha)
0b3fd07 build: make sure OpenSSL heeds noexecstack (Wladimir J. van der Laan)

@dexX7 dexX7 modified the milestone: 0.0.10.0 Dec 30, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment