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

Proposed 1.3.0-b3 #2919

Closed
wants to merge 23 commits into from
Closed

Proposed 1.3.0-b3 #2919

wants to merge 23 commits into from

Conversation

seelabs and others added 23 commits March 28, 2019 17:47
* Prevent null pointer dereferences
* Alway check for correct sle type before returning sle
* Reformat code
Clean up some code relating to unknown fields and avoid
allocate/copy/free cycles for Json objects containing
serialized field names.
* Use a private_access_tag_t to prevent other files from
  instantiating an SField.
* Delete SField move constructor and make helper.
Formerly an SOTemplate was default constructed and its elements
added using push_back().  This left open the possibility of a
malformed SOTemplate if adding one of the elements caused a throw.

With this commit the SOTemplate requires an initializer_list of
its elements at construction.  Elements may not be added after
construction.  With this approach either the SOTemplate is fully
constructed with all of its elements or the constructor throws,
which prevents an invalid SOTemplate from even existing.

This change requires all SOTemplate construction to be adjusted
at the call site.  Those changes are also in this commit.

The SOE_Flags enum is also renamed to SOEStyle, which harmonizes
the name with other uses in the code base.  SOEStyle elements
are renamed (slightly) to have an "soe" prefix rather than "SOE_".
This heads toward reserving identifiers with all upper case for
macros.  The new style also aligns with other prominent enums in
the code base like the collection of TER identifiers.

SOElement is adjusted so it can be stored directly in an STL
container, rather than requiring storage in a unique_ptr.
Correspondingly, unique_ptr usage is removed from both
SOTemplate and KnownFormats.
At this point all of the jss::* names are defined in the same
file.  That file has been named JsonFields.h.  That file name
has little to do with either JsonStaticStrings (which is what
jss is short for) or with jss.  The file is renamed to jss.h
so the file name better reflects what the file contains.

All includes of that file are fixed.  A few include order
issues are tidied up along the way.
Before this patch, jtx allowed non-invocable functions to be passed to
operator(). However, these arguments are ignored. This caused erronious code
code such as:

```
env (offer (account_to_test, BTC (250), XRP (1000)),
         offers (account_to_test, 1));
```

While it looks like the number of offers are checked, they are not. The `offers`
funclet is never run. While we could modify jtx to make the above code correct,
a cleaner solution is to run post conditions in a `require` statement after a
transasction runs.
This patch removes calls to several deprecated asio functions.

* `io_service::post` becomes `post` (free function)
* `io_service::work` becomes `executor_work_guard`
* `io_service::wrap` becomes `bind_executor`
* `get_io_context`   becomes `get_executor` or `get_executor().context()`

This patch was tested with boost 1.69 and 1.70. The functions
`ripple::get_lowest_layer` and `beast::create_waitable_timer` are required to
handle a breaking difference between these versions. When rippled no longer
needs to support pre 1.70 boost versions, both of these functions may be
removed, and the waitable timer injections may also be removed.
* fix include order for macos/homebrew
* use static jemalloc for static builds
* set CMP0074 for using <pkgname>_ROOT variables
* add manual approval option before push to prod
* Use new public repo DNS name
* add distros to smoketest
The XRP Ledger allows an account to authorize a secondary key pair,
called a regular key pair, to sign future transactions, while keeping
the master key pair offline.

The regular key pair can be changed as often as desired, without
requiring other changes on the account.

If merged, this commit corrects a minor technical flaw which would
allow an account holder to specify the master key as the account's
new regular key.

The change is controlled by the `fixMasterKeyAsRegularKey` amendment
which, if enabled, will:

1. Prevent specifying an account's master key as the account's
   regular key.
2. Prevent the "Disable Master Key" flag from incorrectly affecting
   regular keys.
@ripplelabs-jenkins
Copy link
Collaborator

ripplelabs-jenkins commented Apr 27, 2019

Jenkins Build Summary

Built from this commit

Built at 20190427 - 20:41:51

Test Results

Build Type Log Result Status
rpm logfile 1177 cases, 0 failed, t: n/a PASS ✅
msvc.Debug logfile 1177 cases, 0 failed, t: 564s PASS ✅
gcc.Release
-Dassert=ON,
MANUAL_TESTS=true
logfile 915 cases, 0 failed, t: 4m49s PASS ✅
docs,
TARGET=docs
logfile 1 cases, 0 failed, t: 0m1s PASS ✅
msvc.Debug,
NINJA_BUILD=true
logfile 1177 cases, 0 failed, t: 589s PASS ✅
clang.Debug logfile 1177 cases, 0 failed, t: 2m46s PASS ✅
gcc.Debug
-Dcoverage=ON,
TARGET=coverage_report,
SKIP_TESTS=true
logfile 1177 cases, 0 failed, t: 16m35s PASS ✅
gcc.Debug logfile 1177 cases, 0 failed, t: 2m51s PASS ✅
clang.Debug
-Dunity=OFF
logfile 1176 cases, 0 failed, t: 10m0s PASS ✅
msvc.Debug
-Dunity=OFF
logfile 1176 cases, 0 failed, t: 1086s PASS ✅
clang.Release
-Dassert=ON
logfile 1177 cases, 0 failed, t: 8m21s PASS ✅
msvc.Release logfile 1177 cases, 0 failed, t: 397s PASS ✅
gcc.Debug
-Dunity=OFF
logfile 1176 cases, 0 failed, t: 11m20s PASS ✅
gcc.Release
-Dassert=ON
logfile 1177 cases, 0 failed, t: 4m50s PASS ✅
gcc.Debug
-Dstatic=OFF
logfile 1177 cases, 0 failed, t: 2m51s PASS ✅
gcc.Debug
-Dstatic=OFF -DBUILD_SHARED_LIBS=ON
logfile 1177 cases, 0 failed, t: 2m49s PASS ✅
gcc.Debug,
NINJA_BUILD=true
logfile 1177 cases, 0 failed, t: 2m44s PASS ✅
clang.Debug
-Dunity=OFF -Dsan=address,
PARALLEL_TESTS=false,
DEBUGGER=false
logfile 1176 cases, 0 failed, t: 1m2s PASS ✅
clang.Debug
-Dunity=OFF -Dsan=undefined,
PARALLEL_TESTS=false
logfile 1176 cases, 0 failed, t: 6m17s PASS ✅

@seelabs seelabs closed this Apr 29, 2019
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.

10 participants