Browse Source

Fix ALIGN16 build warning and remove more joinsplit dingleberriez

pull/32/head
Duke Leto 3 years ago
parent
commit
60108cf105
  1. 4
      doc/security-warnings.md
  2. 2
      src/main.cpp
  3. 4
      src/wallet/asyncrpcoperation_shieldcoinbase.cpp
  4. 21
      src/wallet/asyncrpcoperation_shieldcoinbase.h

4
doc/security-warnings.md

@ -28,7 +28,7 @@ Wallet encryption is disabled, for several reasons:
deducting the spent amount.
- While encrypted wallets prevent spending of funds, they do not maintain the
shielding properties of JoinSplits (due to the need to detect spends). That
shielding properties of ShieldedOutputs (due to the need to detect spends). That
is, someone with access to an encrypted wallet.dat has full visibility of
your entire transaction graph (other than newly-detected spends, which suffer
from the earlier issue).
@ -51,7 +51,7 @@ are physically near the hardware, that your `hushd` process is running on will
be able to:
- Determine the values of your secret spending keys, as well as which notes you
are spending, by observing cache side-channels as you perform a JoinSplit
are spending, by observing cache side-channels as you perform a SheildedSpend
operation. This is due to probable side-channel leakage in C++.
- Determine which notes you own by observing cache side-channel information

2
src/main.cpp

@ -55,6 +55,8 @@
#include <boost/algorithm/string/replace.hpp>
#include <boost/filesystem.hpp>
#include <boost/filesystem/fstream.hpp>
// boost and wolfSSL fight over defining this macro
#undef ALIGN16
#include <boost/math/distributions/poisson.hpp>
#include <boost/thread.hpp>
#include <boost/static_assert.hpp>

4
src/wallet/asyncrpcoperation_shieldcoinbase.cpp

@ -2,7 +2,6 @@
// Copyright (c) 2016-2020 The Hush developers
// Distributed under the GPLv3 software license, see the accompanying
// file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
/******************************************************************************
* Copyright © 2014-2019 The SuperNET Developers. *
* *
@ -17,7 +16,6 @@
* Removal or modification of this copyright notice is prohibited. *
* *
******************************************************************************/
#include "asyncrpcqueue.h"
#include "amount.h"
#include "consensus/upgrades.h"
@ -39,13 +37,11 @@
#include "zcash/IncrementalMerkleTree.hpp"
#include "sodium.h"
#include "miner.h"
#include <array>
#include <iostream>
#include <chrono>
#include <thread>
#include <string>
#include "asyncrpcoperation_shieldcoinbase.h"
using namespace libzcash;

21
src/wallet/asyncrpcoperation_shieldcoinbase.h

@ -2,7 +2,6 @@
// Copyright (c) 2016-2020 The Hush developers
// Distributed under the GPLv3 software license, see the accompanying
// file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
/******************************************************************************
* Copyright © 2014-2019 The SuperNET Developers. *
* *
@ -17,10 +16,8 @@
* Removal or modification of this copyright notice is prohibited. *
* *
******************************************************************************/
#ifndef ASYNCRPCOPERATION_SHIELDCOINBASE_H
#define ASYNCRPCOPERATION_SHIELDCOINBASE_H
#include "asyncrpcoperation.h"
#include "amount.h"
#include "primitives/transaction.h"
@ -28,10 +25,8 @@
#include "zcash/JoinSplit.hpp"
#include "zcash/Address.hpp"
#include "wallet.h"
#include <unordered_map>
#include <tuple>
#include <univalue.h>
// Default transaction fee if caller does not specify one.
@ -46,15 +41,6 @@ struct ShieldCoinbaseUTXO {
CAmount amount;
};
// Package of info which is passed to perform_joinsplit methods.
struct ShieldCoinbaseJSInfo
{
std::vector<JSInput> vjsin;
std::vector<JSOutput> vjsout;
CAmount vpub_old = 0;
CAmount vpub_new = 0;
};
class AsyncRPCOperation_shieldcoinbase : public AsyncRPCOperation {
public:
AsyncRPCOperation_shieldcoinbase(
@ -98,9 +84,6 @@ private:
bool main_impl();
// JoinSplit without any input notes to spend
UniValue perform_joinsplit(ShieldCoinbaseJSInfo &);
void sign_send_raw_transaction(UniValue obj); // throws exception if there was an error
void lock_utxos();
@ -143,10 +126,6 @@ public:
return delegate->main_impl();
}
UniValue perform_joinsplit(ShieldCoinbaseJSInfo &info) {
return delegate->perform_joinsplit(info);
}
void sign_send_raw_transaction(UniValue obj) {
delegate->sign_send_raw_transaction(obj);
}

Loading…
Cancel
Save