diff options
-rw-r--r-- | CMakeLists.txt | 16 | ||||
-rw-r--r-- | Dockerfile | 3 | ||||
-rw-r--r-- | README.md | 4 | ||||
-rw-r--r-- | contrib/gitian/DOCKRUN.md | 40 | ||||
-rw-r--r-- | docs/COMPILING_DEBUGGING_TESTING.md | 2 | ||||
-rw-r--r-- | docs/CONTRIBUTING.md | 2 | ||||
-rw-r--r-- | docs/LEVIN_PROTOCOL.md | 6 | ||||
-rw-r--r-- | src/wallet/node_rpc_proxy.cpp | 7 | ||||
-rw-r--r-- | src/wallet/wallet2.cpp | 9 |
9 files changed, 71 insertions, 18 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 5d510b853..e21fbb65b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -325,6 +325,16 @@ if(ARCH_ID STREQUAL "s390x") set(S390X 1) endif() +if(ARCH_ID STREQUAL "riscv64") +set(RISCV 1) +set(RISCV64 1) +endif() + +if(ARCH_ID STREQUAL "riscv32") +set(RISCV 1) +set(RISCV32 1) +endif() + if(WIN32 OR ARM OR PPC64LE OR PPC64 OR PPC) set(OPT_FLAGS_RELEASE "-O2") else() @@ -736,7 +746,7 @@ else() message(STATUS "AES support explicitly disabled") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DNO_AES") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DNO_AES") - elseif(NOT ARM AND NOT PPC64LE AND NOT PPC64 AND NOT PPC AND NOT S390X) + elseif(NOT ARM AND NOT PPC64LE AND NOT PPC64 AND NOT PPC AND NOT S390X AND NOT RISCV) message(STATUS "AES support enabled") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -maes") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -maes") @@ -744,6 +754,8 @@ else() message(STATUS "AES support not available on POWER") elseif(S390X) message(STATUS "AES support not available on s390x") + elseif(RISCV) + message(STATUS "AES support not available on RISC-V") elseif(ARM6) message(STATUS "AES support not available on ARMv6") elseif(ARM7) @@ -764,7 +776,7 @@ else() set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ARCH_FLAG}") set(WARNINGS "-Wall -Wextra -Wpointer-arith -Wundef -Wvla -Wwrite-strings -Wno-error=extra -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-error=unused-variable -Wno-error=undef -Wno-error=uninitialized") - if(CMAKE_C_COMPILER_ID MATCHES "Clang") + if(CMAKE_C_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") if(ARM) set(WARNINGS "${WARNINGS} -Wno-error=inline-asm") endif() diff --git a/Dockerfile b/Dockerfile index 587007470..1c373cbc9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -61,5 +61,6 @@ EXPOSE 18081 # switch to user monero USER monero -ENTRYPOINT ["monerod", "--p2p-bind-ip=0.0.0.0", "--p2p-bind-port=18080", "--rpc-bind-ip=0.0.0.0", "--rpc-bind-port=18081", "--non-interactive", "--confirm-external-bind"] +ENTRYPOINT ["monerod"] +CMD ["--p2p-bind-ip=0.0.0.0", "--p2p-bind-port=18080", "--rpc-bind-ip=0.0.0.0", "--rpc-bind-port=18081", "--non-interactive", "--confirm-external-bind"] @@ -612,10 +612,10 @@ More info and versions in the [Debian package tracker](https://tracker.debian.or docker build --build-arg NPROC=1 -t monero . # either run in foreground - docker run -it -v /monero/chain:/root/.bitmonero -v /monero/wallet:/wallet -p 18080:18080 monero + docker run -it -v /monero/chain:/home/monero/.bitmonero -v /monero/wallet:/wallet -p 18080:18080 monero # or in background - docker run -it -d -v /monero/chain:/root/.bitmonero -v /monero/wallet:/wallet -p 18080:18080 monero + docker run -it -d -v /monero/chain:/home/monero/.bitmonero -v /monero/wallet:/wallet -p 18080:18080 monero ``` * The build needs 3 GB space. diff --git a/contrib/gitian/DOCKRUN.md b/contrib/gitian/DOCKRUN.md index fa5e13c82..7f44b7914 100644 --- a/contrib/gitian/DOCKRUN.md +++ b/contrib/gitian/DOCKRUN.md @@ -23,6 +23,13 @@ su $USER The final `su` command is needed to start a new shell with your new group membership, since the `usermod` command doesn't affect any existing sessions. +You'll also need to clone the monero repository and navigate to the `contrib/gitian` directory: + +```bash +git clone https://github.com/monero-project/monero.git +cd monero/contrib/gitian +``` + If you want Mac binaries included in your build, you need to obtain the MacOS SDK: ```bash @@ -56,13 +63,15 @@ The dockrun.sh script will do everything to build the binaries. Just specify the version to build as its only argument, e.g. ```bash -./dockrun.sh v0.17.2.3 +./dockrun.sh v0.17.3.0 ``` The build should run to completion with no errors, and will display the SHA256 checksums of the resulting binaries. You'll be prompted to check if the sums look good, and if so then the results will be signed, and the signatures will be pushed to GitHub. +***Note: In order to publish the signed assertions via this script, you need to have your SSH key uploaded to Github beforehand. See https://docs.github.com/articles/generating-an-ssh-key/ for more info.*** + You can also look in the [gitian.sigs](https://github.com/monero-project/gitian.sigs/) repo and / or [getmonero.org release checksums](https://web.getmonero.org/downloads/hashes.txt) to see if others got the same checksum for the same version tag. If there is ever a mismatch -- **STOP! Something is wrong**. Contact others on IRC / GitHub to figure out what is going on. @@ -74,12 +83,37 @@ You can set other options for that script by setting the OPT variable when runni e.g. ```bash -OPT="-j 8" ./dockrun.sh v0.17.2.3 +# Run build processes with 8 threads +OPT="-j 8" ./dockrun.sh v0.17.3.0 ``` -You can also examine the build and install logs by running a shell in the container, e.g. +Post-build +---------- + +You can examine the build and install logs by running a shell in the container, e.g. ```bash +# Tail running logs +docker exec -it gitrun /bin/bash +tail -F builder/var/install.log +tail -F builder/var/build.log + +# Inspect logs, in format install-<OS>.log and build-<OS>.log docker exec -it gitrun /bin/bash more builder/var/install-linux.log +more builder/var/build-linux.log +``` + +You can find the compiled archives inside of the container at the following directory (be sure to replace `v0.17.3.0` with the version being built): + +```bash +docker exec -it gitrun /bin/bash +ls -la out/v0.17.3.0/ +``` + +To copy the compiled archives to the local host out of the Docker container, you can run the following (be sure to replace `v0.17.3.0` with the version being built): + +```bash +mkdir out +docker cp gitrun:/home/ubuntu/out/v0.17.3.0 out ``` diff --git a/docs/COMPILING_DEBUGGING_TESTING.md b/docs/COMPILING_DEBUGGING_TESTING.md index f5c202303..66555fa80 100644 --- a/docs/COMPILING_DEBUGGING_TESTING.md +++ b/docs/COMPILING_DEBUGGING_TESTING.md @@ -1,7 +1,7 @@ # Compiling, debugging and testing efficiently This document describes ways of compiling, debugging and testing efficiently for various use cases. -The intented audience are developers, who want to leverage newly added tricks to Monero via `CMake`. The document will lower the entry point for these developers. +The intended audience are developers, who want to leverage newly added tricks to Monero via `CMake`. The document will lower the entry point for these developers. Before reading this document, please consult section "Build instructions" in the main README.md. Some information from README.md will be repeated here, but the aim is to go beyond it. diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index e12295412..d60edc6a6 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -20,7 +20,7 @@ posted to #monero-dev on irc.libera.chat). Patches should be self contained. A good rule of thumb is to have one patch per separate issue, feature, or logical change. Also, no other changes, such as random whitespace changes, reindentation, -or fixing typoes, spelling, or wording, unless user visible. +or fixing typos, spelling, or wording, unless user visible. Following the code style of the particular chunk of code you're modifying is encouraged. Proper squashing should be done (eg, if you're making a buggy patch, then a later patch to fix the bug, diff --git a/docs/LEVIN_PROTOCOL.md b/docs/LEVIN_PROTOCOL.md index 43500fd06..81f6f52ee 100644 --- a/docs/LEVIN_PROTOCOL.md +++ b/docs/LEVIN_PROTOCOL.md @@ -75,7 +75,7 @@ An unsigned 32-bit little endian integer representing the Monero specific command being invoked. ### Return Code -A signed 32-bit little integer integer representing the response from the peer +A signed 32-bit little endian integer representing the response from the peer from the last command that was invoked. This is `0` for request messages. ### Flags @@ -131,7 +131,7 @@ be zero. The first fragment has the `B` bit set, neither `B` nor `E` is set for ### Dummy Dummy messages have the `B` and `E` bits set, the `Q` and `S` bits unset, and -the `Expect Reponse` field zeroed. When a message of this type is received, the +the `Expect Response` field zeroed. When a message of this type is received, the contents can be safely ignored. @@ -149,7 +149,7 @@ contents can be safely ignored. #### (`1005` Request) Network State #### (`1005` Response) Network State #### (`1006` Request) Peer ID -#### (`1006` Reponse) Peer ID +#### (`1006` Response) Peer ID #### (`1007` Request) Support Flags #### (`1007` Response) Support Flags diff --git a/src/wallet/node_rpc_proxy.cpp b/src/wallet/node_rpc_proxy.cpp index a576c267c..148f957eb 100644 --- a/src/wallet/node_rpc_proxy.cpp +++ b/src/wallet/node_rpc_proxy.cpp @@ -306,7 +306,12 @@ boost::optional<std::string> NodeRPCProxy::get_rpc_payment_info(bool mining, boo m_rpc_payment_seed_height = resp_t.seed_height; m_rpc_payment_cookie = resp_t.cookie; - if (!epee::string_tools::parse_hexstr_to_binbuff(resp_t.hashing_blob, m_rpc_payment_blob) || m_rpc_payment_blob.size() < 43) + if (m_rpc_payment_diff == 0) + { + // If no payment required daemon doesn't give us back a hashing blob + m_rpc_payment_blob.clear(); + } + else if (!epee::string_tools::parse_hexstr_to_binbuff(resp_t.hashing_blob, m_rpc_payment_blob) || m_rpc_payment_blob.size() < 43) { MERROR("Invalid hashing blob: " << resp_t.hashing_blob); return std::string("Invalid hashing blob"); diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index bdac3109f..f36fa73e0 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -5709,13 +5709,14 @@ void wallet2::load(const std::string& wallet_, const epee::wipeable_string& pass wallet_keys_unlocker unlocker(*this, m_ask_password == AskPasswordToDecrypt && !m_unattended && !m_watch_only, password); //keys loaded ok! - //try to load wallet file. but even if we failed, it is not big problem - if (use_fs && (!boost::filesystem::exists(m_wallet_file, e) || e)) + //try to load wallet cache. but even if we failed, it is not big problem + bool cache_missing = use_fs ? (!boost::filesystem::exists(m_wallet_file, e) || e) : cache_buf.empty(); + if (cache_missing) { - LOG_PRINT_L0("file not found: " << m_wallet_file << ", starting with empty blockchain"); + LOG_PRINT_L0("wallet cache missing: " << m_wallet_file << ", starting with empty blockchain"); m_account_public_address = m_account.get_keys().m_account_address; } - else if (use_fs || !cache_buf.empty()) + else { wallet2::cache_file_data cache_file_data; std::string cache_file_buf; |