Page MenuHomePhabricator

[backport#17617] doc: unify unix epoch time descriptions
ClosedPublic

Authored by majcosta on Oct 1 2020, 17:00.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABC807ed300fa95: [backport#17617] doc: unify unix epoch time descriptions
Summary

d94d34f05f4ae3efa07de409489d68bbcc216346 doc: update developer notes wrt unix epoch time (Jon Atack)
e2f32cb5c5c7f2b1d1fc7003587b6573fb59526a qa: unify unix epoch time descriptions (Jon Atack)

Pull request description:

Closes #17613.

Updated call sites: mocktime, getblockheader, getblock, pruneblockchain,
getchaintxstats, getblocktemplate, setmocktime, getpeerinfo, setban,
getnodeaddresses, getrawtransaction, importmulti, listtransactions,
listsinceblock, gettransaction, getwalletinfo, getaddressinfo

Commands for testing manually:
```
bitcoind -help-debug | grep -A1 mocktime
bitcoin-cli help getblockheader
bitcoin-cli help getblock
bitcoin-cli help pruneblockchain
bitcoin-cli help getchaintxstats
bitcoin-cli help getblocktemplate
bitcoin-cli help setmocktime
bitcoin-cli help getpeerinfo
bitcoin-cli help setban
bitcoin-cli help getnodeaddresses
bitcoin-cli help getrawtransaction
bitcoin-cli help importmulti
bitcoin-cli help listtransactions
bitcoin-cli help listsinceblock
bitcoin-cli help gettransaction
bitcoin-cli help getwalletinfo
bitcoin-cli help getaddressinfo
```

Backport of Core PR17617 and PR14981

Note: used the newly introduced constant in two instances not covered in the backport, specifically in getrawtransaction and getblocktemplate

Test Plan
ninja all check check-functional

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

majcosta requested review of this revision.Oct 1 2020, 17:00

[Bot Message]
One or more PR numbers were detected in the summary.
Links to those PRs have been inserted into the summary for reference.

Snippet of first build failure:

[319/482] Building CXX object src/test/CMakeFiles/testutil.dir/util/str.cpp.o
[320/482] Building C object src/secp256k1/CMakeFiles/secp256k1.dir/src/secp256k1.c.o
[321/482] Linking C static library src/secp256k1/libsecp256k1.a
[322/482] Linking CXX static library src/libscript.a
[323/482] Linking C executable src/secp256k1/ecmult-bench
[324/482] Linking C executable src/secp256k1/internal-bench
[325/482] Building CXX object src/test/CMakeFiles/testutil.dir/util/transaction_utils.cpp.o
[326/482] Building CXX object src/test/CMakeFiles/testutil.dir/util/logging.cpp.o
[327/482] Building CXX object src/CMakeFiles/bitcoin-tx.dir/bitcoin-tx.cpp.o
[328/482] Linking C executable src/secp256k1/verify-bench
[329/482] Linking C executable src/secp256k1/sign-bench
[330/482] Linking C executable src/secp256k1/recover-bench
[331/482] Building CXX object src/wallet/CMakeFiles/wallet.dir/coinselection.cpp.o
[332/482] Building CXX object src/CMakeFiles/common.dir/rpc/rawtransaction_util.cpp.o
[333/482] Building CXX object src/CMakeFiles/server.dir/init.cpp.o
[334/482] Building CXX object src/CMakeFiles/common.dir/rpc/util.cpp.o
[335/482] Building CXX object src/test/CMakeFiles/testutil.dir/util/mining.cpp.o
[336/482] Linking CXX static library src/libcommon.a
[337/482] Building CXX object src/test/CMakeFiles/testutil.dir/util/blockfilter.cpp.o
[338/482] Building CXX object src/wallet/CMakeFiles/wallet.dir/coincontrol.cpp.o
[339/482] Building CXX object src/wallet/CMakeFiles/wallet.dir/crypter.cpp.o
[340/482] Linking CXX static library src/libbitcoinconsensus.a
[341/482] Linking CXX executable src/bitcoin-cli
[342/482] Linking CXX shared library src/libbitcoinconsensus.so.0.22.4
[343/482] Creating library symlink src/libbitcoinconsensus.so.0 src/libbitcoinconsensus.so
[344/482] Building CXX object src/test/CMakeFiles/testutil.dir/util/wallet.cpp.o
[345/482] Linking CXX executable src/bitcoin-tx
[346/482] Building CXX object src/wallet/CMakeFiles/wallet-tool.dir/wallettool.cpp.o
[347/482] Building CXX object src/test/CMakeFiles/testutil.dir/util/setup_common.cpp.o
[348/482] Building CXX object src/wallet/CMakeFiles/wallet.dir/__/interfaces/wallet.cpp.o
[349/482] Building CXX object src/wallet/CMakeFiles/wallet.dir/db.cpp.o
FAILED: src/wallet/CMakeFiles/wallet.dir/db.cpp.o 
/usr/bin/cmake -E __run_co_compile --launcher=/usr/bin/ccache --tidy="/usr/bin/clang-tidy-8;-warnings-as-errors=*" --source=../../src/wallet/db.cpp -- /usr/bin/clang++  -DBOOST_AC_USE_STD_ATOMIC -DBOOST_SP_USE_STD_ATOMIC -DBUILD_BITCOIN_INTERNAL -DENABLE_AVX2 -DENABLE_SHANI -DENABLE_SSE41 -DHAVE_BUILD_INFO -DHAVE_CONFIG_H -DHAVE_CONSENSUS_LIB -I../../src/. -Isrc -I../../src/univalue/include -Isrc/crypto/.. -I../../src/secp256k1/include -isystem /usr/include/jemalloc -g -O2 -fPIC -fvisibility=hidden   -fstack-protector-all -Wstack-protector -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Wall -Wextra -Wformat -Wvla -Wcast-align -Wunused-parameter -Wmissing-braces -Wthread-safety-analysis -Wshadow -Wshadow-field -Wrange-loop-analysis -Wredundant-decls -Wformat-security -Wredundant-move -Wno-unused-parameter -Wno-implicit-fallthrough -pthread -std=gnu++14 -MD -MT src/wallet/CMakeFiles/wallet.dir/db.cpp.o -MF src/wallet/CMakeFiles/wallet.dir/db.cpp.o.d -o src/wallet/CMakeFiles/wallet.dir/db.cpp.o -c ../../src/wallet/db.cpp
/work/abc-ci-builds/build-clang-tidy/../../src/wallet/db.cpp:869:30: error: statement should be inside braces [readability-braces-around-statements,-warnings-as-errors]
                if (!fMockDb) dbenv->lsn_reset(strFile.c_str(), 0);
                             ^
                              {
2458 warnings generated.
Suppressed 2457 warnings (2457 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
1 warning treated as error
[350/482] Building CXX object src/seeder/CMakeFiles/seeder.dir/bitcoin.cpp.o
[351/482] Building CXX object src/wallet/CMakeFiles/wallet.dir/walletutil.cpp.o
[352/482] Building CXX object src/seeder/CMakeFiles/seeder.dir/dns.cpp.o
[353/482] Building CXX object src/CMakeFiles/server.dir/rpc/blockchain.cpp.o
[354/482] Building CXX object src/CMakeFiles/server.dir/rpc/rawtransaction.cpp.o
[355/482] Building CXX object src/wallet/CMakeFiles/wallet.dir/load.cpp.o
[356/482] Building CXX object src/seeder/CMakeFiles/seeder.dir/db.cpp.o
[357/482] Linking CXX static library src/seeder/libseeder.a
[358/482] Building CXX object src/wallet/CMakeFiles/wallet.dir/fees.cpp.o
[359/482] Building CXX object src/wallet/CMakeFiles/wallet.dir/psbtwallet.cpp.o
[360/482] Building CXX object src/seeder/CMakeFiles/bitcoin-seeder.dir/main.cpp.o
[361/482] Linking CXX executable src/seeder/bitcoin-seeder
[362/482] Building CXX object src/wallet/CMakeFiles/wallet.dir/scriptpubkeyman.cpp.o
[363/482] Building CXX object src/wallet/CMakeFiles/wallet.dir/walletdb.cpp.o
[364/482] Building CXX object src/wallet/CMakeFiles/wallet.dir/wallet.cpp.o
[365/482] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpcdump.cpp.o
[366/482] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpcwallet.cpp.o
ninja: build stopped: cannot make progress due to previous errors.
Build build-clang-tidy failed with exit code 1
Fabien requested changes to this revision.Oct 1 2020, 18:56
Fabien added a subscriber: Fabien.
Fabien added inline comments.
src/rpc/blockchain.cpp
838 ↗(On Diff #24157)

layout

843 ↗(On Diff #24157)

dito

846 ↗(On Diff #24157)

dito

980 ↗(On Diff #24157)

dito

983 ↗(On Diff #24157)

dito

src/rpc/rawtransaction.cpp
163 ↗(On Diff #24157)

Why is it different from the PR ? Is there a missing dependency ?

src/wallet/rpcdump.cpp
1582 ↗(On Diff #24157)

dito

1586 ↗(On Diff #24157)

dito

1588 ↗(On Diff #24157)

dito

1593 ↗(On Diff #24157)

dito

1597 ↗(On Diff #24157)

dito

1599 ↗(On Diff #24157)

dito

1603 ↗(On Diff #24157)

dito

This revision now requires changes to proceed.Oct 1 2020, 18:56
majcosta edited the summary of this revision. (Show Details)
majcosta removed a reviewer: Fabien.

fixed formatting and squashed one-liner PR14981 into the diff

Snippet of first build failure:

wallet_hd.py                                     | ○ Skipped | 0 s
wallet_import_rescan.py                          | ○ Skipped | 0 s
wallet_import_with_label.py                      | ○ Skipped | 0 s
wallet_importmulti.py                            | ○ Skipped | 0 s
wallet_importprunedfunds.py                      | ○ Skipped | 0 s
wallet_keypool.py                                | ○ Skipped | 0 s
wallet_keypool_topup.py                          | ○ Skipped | 0 s
wallet_labels.py                                 | ○ Skipped | 0 s
wallet_listreceivedby.py                         | ○ Skipped | 0 s
wallet_listsinceblock.py                         | ○ Skipped | 0 s
wallet_listtransactions.py                       | ○ Skipped | 0 s
wallet_multiwallet.py                            | ○ Skipped | 0 s
wallet_multiwallet.py --usecli                   | ○ Skipped | 0 s
wallet_reorgsrestore.py                          | ○ Skipped | 0 s
wallet_resendwallettransactions.py               | ○ Skipped | 0 s
wallet_txn_clone.py                              | ○ Skipped | 0 s
wallet_txn_clone.py --mineblock                  | ○ Skipped | 0 s
wallet_txn_doublespend.py                        | ○ Skipped | 0 s
wallet_txn_doublespend.py --mineblock            | ○ Skipped | 0 s
wallet_watchonly.py                              | ○ Skipped | 0 s
wallet_watchonly.py --usecli                     | ○ Skipped | 0 s
wallet_zapwallettxes.py                          | ○ Skipped | 0 s
p2p_timeouts.py                                  | ✖ Failed  | 9 s

ALL                                              | ✖ Failed  | 352 s (accumulated) 
Runtime: 71 s

[139/373] Running avalanche test suite
PASSED: avalanche test suite
[140/373] Running seeder test suite
PASSED: seeder test suite
[141/373] Test Bitcoin RPC authentication...
...
----------------------------------------------------------------------
Ran 3 tests in 0.005s

OK
[142/373] cd /work/contrib/devtools/chainparams && /usr/bin/python3.7 ./test_make_chainparams.py
.....
----------------------------------------------------------------------
Ran 5 tests in 0.001s

OK
[158/373] Running pow test suite
PASSED: pow test suite
[166/373] Running bitcoin-qt test suite
PASSED: bitcoin-qt test suite
[168/373] Building CXX object src/test/CMakeFiles/test_bitcoin.dir/script_tests.cpp.o
In file included from /usr/include/boost/test/unit_test.hpp:19,
                 from ../../src/test/script_tests.cpp:30:
../../src/test/script_tests.cpp: In member function ‘void script_tests::script_build::test_method()’:
../../src/test/script_tests.cpp:541:22: note: variable tracking size limit exceeded with -fvar-tracking-assignments, retrying without
 BOOST_AUTO_TEST_CASE(script_build) {
                      ^~~~~~~~~~~~
[372/373] Running bitcoin test suite
PASSED: bitcoin test suite
FAILED: test/CMakeFiles/check-functional 
cd /work/abc-ci-builds/build-without-wallet/test && /usr/bin/cmake -E make_directory /work/abc-ci-builds/build-without-wallet/test/junit && /usr/bin/cmake -E make_directory /work/abc-ci-builds/build-without-wallet/test/log && /usr/bin/cmake -E env /usr/bin/python3.7 ./functional/test_runner.py "--testsuitename=Bitcoin ABC functional tests" --junitoutput=/work/abc-ci-builds/build-without-wallet/test/junit/functional_tests.xml
ninja: build stopped: cannot make progress due to previous errors.
Build build-without-wallet failed with exit code 1

Each failure log is accessible here:
Bitcoin ABC functional tests: p2p_timeouts.py

Snippet of first build failure:

[348/409] bitcoin: testing streams_tests
[349/409] Running utility command for check-bitcoin-settings_tests
[350/409] bitcoin: testing timedata_tests
[351/409] bitcoin: testing checkdatasig_tests
[352/409] Running utility command for check-bitcoin-streams_tests
[353/409] Running utility command for check-bitcoin-timedata_tests
[354/409] Running utility command for check-bitcoin-checkdatasig_tests
[355/409] bitcoin: testing checkqueue_tests
[356/409] bitcoin: testing uint256_tests
[357/409] Running utility command for check-bitcoin-checkqueue_tests
[358/409] Running utility command for check-bitcoin-uint256_tests
[359/409] bitcoin: testing serialize_tests
[360/409] bitcoin: testing sigencoding_tests
[361/409] Running utility command for check-bitcoin-serialize_tests
[362/409] bitcoin: testing walletdb_tests
[363/409] Running utility command for check-bitcoin-sigencoding_tests
[364/409] Running utility command for check-bitcoin-walletdb_tests
[365/409] bitcoin: testing undo_tests
[366/409] bitcoin: testing radix_tests
[367/409] bitcoin: testing util_threadnames_tests
[368/409] Running utility command for check-bitcoin-undo_tests
[369/409] Running utility command for check-bitcoin-util_threadnames_tests
[370/409] Running utility command for check-bitcoin-radix_tests
[371/409] bitcoin: testing blockcheck_tests
[372/409] bitcoin: testing script_standard_tests
[373/409] Running utility command for check-bitcoin-blockcheck_tests
[374/409] bitcoin: testing crypto_tests
[375/409] Running utility command for check-bitcoin-script_standard_tests
[376/409] Running utility command for check-bitcoin-crypto_tests
[377/409] bitcoin: testing ismine_tests
[378/409] bitcoin: testing blockstatus_tests
[379/409] Running utility command for check-bitcoin-ismine_tests
[380/409] Running utility command for check-bitcoin-blockstatus_tests
[381/409] bitcoin: testing cashaddr_tests
[382/409] Running utility command for check-bitcoin-cashaddr_tests
[383/409] bitcoin: testing getarg_tests
[384/409] bitcoin: testing versionbits_tests
[385/409] bitcoin: testing bswap_tests
[386/409] Running utility command for check-bitcoin-getarg_tests
[387/409] Running utility command for check-bitcoin-versionbits_tests
[388/409] bitcoin: testing script_tests
[389/409] Running utility command for check-bitcoin-bswap_tests
[390/409] Running utility command for check-bitcoin-script_tests
[391/409] bitcoin: testing validation_block_tests
[392/409] Running utility command for check-bitcoin-validation_block_tests
[393/409] bitcoin: testing validation_tests
[394/409] Running utility command for check-bitcoin-validation_tests
[395/409] bitcoin: testing skiplist_tests
[396/409] Running utility command for check-bitcoin-skiplist_tests
[397/409] bitcoin: testing util_tests
[398/409] Running utility command for check-bitcoin-util_tests
[399/409] bitcoin: testing op_reversebytes_tests
[400/409] bitcoin: testing cuckoocache_tests
[401/409] Running utility command for check-bitcoin-op_reversebytes_tests
[402/409] Running utility command for check-bitcoin-cuckoocache_tests
[403/409] bitcoin: testing coins_tests
[404/409] Running utility command for check-bitcoin-coins_tests
[405/409] bitcoin: testing transaction_tests
[406/409] Running utility command for check-bitcoin-transaction_tests
Build build-clang timed out after 1200.0s
This revision is now accepted and ready to land.Oct 2 2020, 05:58
This revision was landed with ongoing or failed builds.Oct 2 2020, 08:59
This revision was automatically updated to reflect the committed changes.