profile
viewpoint
Jon Atack jonatack @sqcrypto https://jonatack.github.io Bitcoin Core open source. Wrote pro games in assembly for a few years. C/C++, Lisp, Ruby, Python, Linux. https://x0f.org/@jon

bitcoinops/bitcoinops.github.io 82

Bitcoin Optech website

jonatack/bitcoin-development 77

Various notes and ideas for development work on Bitcoin

bitcoin-core-review-club/website 47

Bitcoin Core PR Review club website

jonatack/cl-kraken 10

A Common Lisp API wrapper for the Kraken cryptocurrency exchange.

bitcoin-core/bitcoin-acks 9

Bitcoin ACKs is a PR review dashboard web app for Bitcoin Core.

jonatack/common-lisp 2

A smattering of various Common Lisp code

bitcoin-core-review-club/bitcoin 1

Bitcoin Core integration/staging tree

jonatack/administrate 0

A Rails engine that helps you put together a super-flexible admin dashboard.

jonatack/benchmark-ips 0

Provides iteration per second benchmarking for Ruby

pull request commentbitcoin/bitcoin

doc: fix broken link to whitepaper in README

Probably it will be hard for anybody to get this link down? https://www.ussc.gov/sites/default/files/pdf/training/annual-national-training-seminar/2018/Emerging_Tech_Bitcoin_Crypto.pdf

ben-kaufman

comment created time in 5 minutes

issue commentbitcoin/bitcoin

Compilation fails on Debian 10 (libboost-1.67)

@pdrobek

./configure LDFLAGS="-L/usr/include"

Why LDFLAGS is passed?

pdrobek

comment created time in 7 minutes

PR opened bitcoin-core/gui

Save/restore RPCConsole geometry only for window

After using the GUI with -disablewallet the "Node window" inherits the geometry of the main window, that could be unexpected for users.

This PR provides independent geometry settings for RPCConsole in both modes:

  • window sizes and QSplitter sizes when -disablewallet=0
  • only QSplitter sizes when -disablewallet=1
+19 -7

0 comment

1 changed file

pr created time in 13 minutes

Pull request review commentbitcoin/bitcoin

fuzz: Consolidate fuzzing TestingSetup initialization

 inline void FillNode(FuzzedDataProvider& fuzzed_data_provider, CNode& node, cons     } } -inline void InitializeFuzzingContext(const std::string& chain_name = CBaseChainParams::REGTEST)+template <class T = const BasicTestingSetup>+inline std::unique_ptr<T> MakeFuzzingContext(const std::string& chain_name = CBaseChainParams::REGTEST, const std::vector<const char*>& extra_args = {})

w/re returning T, I think I'm going to keep the unique_ptr just because in the future we might do something in MakeFuzzingContext that doesn't trigger RVO and I'm not sure about the copy semantics of our *TestingSetup classes...

dongcarl

comment created time in 14 minutes

pull request commentbitcoin/bitcoin

doc: fix broken link to whitepaper in README

@ben-kaufman: It means we then have to monitor a link on an external site that attracts drama on a regular basis. Reduce the time wasting attack surface and just not link to it at all.

ben-kaufman

comment created time in 20 minutes

pull request commentbitcoin/bitcoin

doc: fix broken link to whitepaper in README

@michaelfolkson That would make sense too. I don't see a reason to completely remove it tbh, but I could do that (practically revert https://github.com/bitcoin/bitcoin/commit/67958519fe22105dff84a3a8118bfc23a8035fb0) if that's what most prefer.

ben-kaufman

comment created time in 24 minutes

pull request commentbitcoin/bitcoin

doc: fix broken link to whitepaper in README

Personally I would prefer to just remove any reference to the white paper in this repo and not waste any more valuable time of the maintainers and regular contributors.

ben-kaufman

comment created time in 27 minutes

pull request commentbitcoin/bitcoin

doc: fix broken link to whitepaper in README

Craig Wright is a Fraud

ben-kaufman

comment created time in 30 minutes

PR opened bitcoin/bitcoin

doc: fix broken link to whitepaper in README

Earlier today the Bitcoin whitepaper has been removed from the bitcoincore.org website. A decision I strongly disagree with but nevertheless fully respect and understand.

I hope the Core maintainers would reconsider this decision, but in case it is final, this PR fixes the link which the README.md has to the whitepaper by targeting the bitcoin.org website instead of the bitcoincore.org, where the page no longer exists.

+1 -1

0 comment

1 changed file

pr created time in 41 minutes

issue commentbitcoin/bitcoin

Small memory leak when BerkeleyEnvironment::Open fails

Opened #20974 to test this. Leak does still happen https://cirrus-ci.com/task/5428735379767296?command=ci#L4680

==36296==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 65840 byte(s) in 2 object(s) allocated from:
    #0 0x55fe2c45d3bd in malloc (/tmp/cirrus-ci-build/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/src/bitcoind+0x17733bd)
    #1 0x7f03e35788c4 in __os_malloc (/lib/x86_64-linux-gnu/libdb_cxx-5.3.so+0x1698c4)
SUMMARY: AddressSanitizer: 65840 byte(s) leaked in 2 allocation(s). 
ryanofsky

comment created time in an hour

issue commentbitcoin/bitcoin

Can I make readme.md and other introduction files in another language?

I'd like to help.

This sounds like a good idea. If this is to be done it should be done as a coordinated effort to include translations in other languages as well. One issue will be maintainability as documentation changes. I suppose one thing to ease that could be to include the docs on Transifex.

So what's the plan? How about adding README.xx.md besides README.md and doc_xx besides doc, with the help of Transifex?

programmer1017

comment created time in an hour

pull request commentbitcoin/bitcoin

locks: Annotate CTxMemPool::check to require cs_main

Happy to re-ACK if you add documentation or update the commit message with the info in #20972 (comment).

I wasn't really suggesting that we add documentation, just that we don't add misleading documentation that cs_main is only needed for GetSpendHeight. I can see the benefit to documenting the reasoning in the commit log, and would be happy to reACK a push that adds that commit message.

I'd prefer to add the lock annotations (to GetSpendHeight and maybe others), so that the code is self-documenting.

I'll commit to reviewing this (here or in a follow-up PR).

dongcarl

comment created time in an hour

issue commentlightningnetwork/lightning-rfc

Ability to set inbound and outbound fees

Sorry but no, that makes absolutely no sense to me (unless I'm missing something).

Are you saying that you are in a situation like A <---> B where you are A and most of the funds are on B's side? And you'd like to lower the relay fees B -> A to incentivize funds to flow back to A?

If that's the case it's a NACK from me. If all the funds are on B's side, it's their money, not yours (you have received the same amount of money in another channel before sending it to them on this channel). Since it's their money, it's 100% their decision, you should have absolutely no business deciding what relay fees they should set for their money. They will update their relay fees when they see fit; if you're complaining because you feel they're not managing their relay fees correctly, then simply don't open other channels to them (you don't care about this one, since all the money is on their side, you don't have anything at stake). If it makes sense in their strategy to get the funds to flow back to you, they'll lower their relay fees, but that should be entirely their decision.

AbelLykens

comment created time in an hour

Pull request review commentbitcoin/bitcoin

zmq: deduplicate 'sequence' publisher message creation/sending

 bool CZMQPublishRawTransactionNotifier::NotifyTransaction(const CTransaction &tr     return SendZmqMessage(MSG_RAWTX, &(*ss.begin()), ss.size()); } +// Helper function to send a 'sequence' topic message  with the following structure:+//    <32-byte hash> | <1-byte label> | <8-byte LE sequence> (optional)+static bool SendSequenceMsg(CZMQAbstractPublishNotifier& notifier, uint256 hash, char label, std::optional<uint64_t> sequence = {})+{+    unsigned char data[sizeof(hash)+sizeof(label)+sizeof(uint64_t)];

Done.

theStack

comment created time in an hour

Pull request review commentbitcoin/bitcoin

zmq: deduplicate 'sequence' publisher message creation/sending

 bool CZMQPublishRawTransactionNotifier::NotifyTransaction(const CTransaction &tr     return SendZmqMessage(MSG_RAWTX, &(*ss.begin()), ss.size()); } +// Helper function to send a 'sequence' topic message  with the following structure:+//    <32-byte hash> | <1-byte label> | <8-byte LE sequence> (optional)+static bool SendSequenceMsg(CZMQAbstractPublishNotifier& notifier, uint256 hash, char label, std::optional<uint64_t> sequence = {})+{+    unsigned char data[sizeof(hash)+sizeof(label)+sizeof(uint64_t)];+    for (unsigned int i = 0; i < sizeof(hash); ++i) {+        data[sizeof(hash) - 1 - i] = hash.begin()[i];+    }+    data[sizeof(hash)] = label;+    if (sequence) WriteLE64(data+sizeof(hash)+sizeof(label), *sequence);+    return notifier.SendZmqMessage(MSG_SEQUENCE, data, sequence ? sizeof(data) : sizeof(hash)+sizeof(label));

Done.

theStack

comment created time in an hour

pull request commentbitcoin/bitcoin

zmq: deduplicate 'sequence' publisher message creation/sending

Thanks for your reviews! Force-pushed with the suggestions of @jonatack.

theStack

comment created time in an hour

Pull request review commentbitcoin/bitcoin

zmq: deduplicate 'sequence' publisher message creation/sending

 bool CZMQPublishRawTransactionNotifier::NotifyTransaction(const CTransaction &tr     return SendZmqMessage(MSG_RAWTX, &(*ss.begin()), ss.size()); } +// Helper function to send a 'sequence' topic message  with the following structure:

Good eye! :) Done.

theStack

comment created time in an hour

startedrakyll/pprof-merge

started time in an hour

issue commentAnthonyCalandra/modern-cpp-features

C++ need help!!!

I am sorry, I'm just new. Thank you.

On Thu, Jan 21, 2021 at 12:42 AM Anthony Calandra notifications@github.com wrote:

Hi there, I'm afraid this isn't the right place to ask for C++ help. I recommend posting on a forum or Q&A site for your question.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/AnthonyCalandra/modern-cpp-features/issues/93#issuecomment-763774020, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASRBVBYIH7VRHN5RNU4NP4LS24BVTANCNFSM4WKUK4HQ .

geekpranker

comment created time in 2 hours

Pull request review commentbitcoin/bitcoin

util: Add ArgsManager::GetCommand() and use it in bitcoin-wallet

 int main(int argc, char* argv[])         return EXIT_FAILURE;     } -    std::string method {};-    for(int i = 1; i < argc; ++i) {-        if (!IsSwitchChar(argv[i][0])) {-            if (!method.empty()) {-                tfm::format(std::cerr, "Error: two methods provided (%s and %s). Only one method should be provided.\n", method, argv[i]);-                return EXIT_FAILURE;-            }-            method = argv[i];-        }-    }--    if (method.empty()) {+    std::string method;+    std::vector<std::string> cmdargs;+    if (!args.GetCommand(method, cmdargs)) {         tfm::format(std::cerr, "No method provided. Run `bitcoin-wallet -help` for valid methods.\n");

Seems unrelated, so I am going to leave as is for now to minimize the diff

MarcoFalke

comment created time in 2 hours

Pull request review commentbitcoin/bitcoin

util: Add ArgsManager::GetCommand() and use it in bitcoin-wallet

 int main(int argc, char* argv[])         return EXIT_FAILURE;     } -    std::string method {};-    for(int i = 1; i < argc; ++i) {-        if (!IsSwitchChar(argv[i][0])) {-            if (!method.empty()) {-                tfm::format(std::cerr, "Error: two methods provided (%s and %s). Only one method should be provided.\n", method, argv[i]);-                return EXIT_FAILURE;-            }-            method = argv[i];-        }-    }--    if (method.empty()) {+    std::string method;

Thanks, fixed

MarcoFalke

comment created time in 2 hours

Pull request review commentbitcoin/bitcoin

util: Add ArgsManager::GetCommand() and use it in bitcoin-wallet

 int main(int argc, char* argv[])         return EXIT_FAILURE;     } -    std::string method {};-    for(int i = 1; i < argc; ++i) {-        if (!IsSwitchChar(argv[i][0])) {-            if (!method.empty()) {-                tfm::format(std::cerr, "Error: two methods provided (%s and %s). Only one method should be provided.\n", method, argv[i]);-                return EXIT_FAILURE;-            }-            method = argv[i];-        }-    }--    if (method.empty()) {+    std::string method;+    std::vector<std::string> cmdargs;+    if (!args.GetCommand(method, cmdargs)) {         tfm::format(std::cerr, "No method provided. Run `bitcoin-wallet -help` for valid methods.\n");         return EXIT_FAILURE;     }+    if (cmdargs.size() != 0) {+        tfm::format(std::cerr, "Error: Additional arguments provided (%s). Please refer to `-help`. Commands do not take arguments.\n", Join(cmdargs, ", "));

Thanks, fixed

MarcoFalke

comment created time in 2 hours

Pull request review commentbitcoin/bitcoin

util: Add ArgsManager::GetCommand() and use it in bitcoin-wallet

 int main(int argc, char* argv[])         return EXIT_FAILURE;     } -    std::string method {};-    for(int i = 1; i < argc; ++i) {-        if (!IsSwitchChar(argv[i][0])) {-            if (!method.empty()) {-                tfm::format(std::cerr, "Error: two methods provided (%s and %s). Only one method should be provided.\n", method, argv[i]);-                return EXIT_FAILURE;-            }-            method = argv[i];-        }-    }--    if (method.empty()) {+    std::string method;+    std::vector<std::string> cmdargs;+    if (!args.GetCommand(method, cmdargs)) {

Thanks. Fixed, I think

MarcoFalke

comment created time in 2 hours

Pull request review commentbitcoin/bitcoin

util: Add ArgsManager::GetCommand() and use it in bitcoin-wallet

 Optional<unsigned int> ArgsManager::GetArgFlags(const std::string& name) const     return nullopt; } +bool ArgsManager::GetCommand(std::string& cmd, std::vector<std::string>& args) const+{+    LOCK(cs_args);+    assert(!m_accept_any_command); // AddCmd must have been called before this

Thanks. Fixed, I think

MarcoFalke

comment created time in 2 hours

Pull request review commentbitcoin/bitcoin

util: Add ArgsManager::GetCommand() and use it in bitcoin-wallet

 Optional<unsigned int> ArgsManager::GetArgFlags(const std::string& name) const     return nullopt; } +bool ArgsManager::GetCommand(std::string& cmd, std::vector<std::string>& args) const

I took the naming from https://github.com/ajtowns/bitcoin/commit/ff48eb93bd485fb5e722d47690508f2a3506d30c. Nonetheless, changed in the latest force push.

MarcoFalke

comment created time in 2 hours

CommitCommentEvent

Pull request review commentbitcoin-core/gui

Add information to "Confirm fee bump" window

 bool WalletModel::bumpFee(uint256 hash, uint256& new_hash)     questionString.append("</td><td>");     questionString.append(BitcoinUnits::formatHtmlWithUnit(getOptionsModel()->getDisplayUnit(), new_fee));     questionString.append("</td></tr></table>");+    questionString.append("<br><br>");+    questionString.append(tr("WARNING: New inputs and outputs can be added in replacement transaction if necessary which affects privacy."));

No extra inputs or outputs were added in this: https://tbtc.bitaps.com/f35a69b066d1ff79cb13bc6dba2eb345f239b2bfa268e3fb0ee06b28748bea99 when I didn't use "custom change address" for initial transaction

prayank23

comment created time in 2 hours

Pull request review commentbitcoin-core/gui

Add information to "Confirm fee bump" window

 bool WalletModel::bumpFee(uint256 hash, uint256& new_hash)     questionString.append("</td><td>");     questionString.append(BitcoinUnits::formatHtmlWithUnit(getOptionsModel()->getDisplayUnit(), new_fee));     questionString.append("</td></tr></table>");+    questionString.append("<br><br>");+    questionString.append(tr("WARNING: New inputs and outputs can be added in replacement transaction if necessary which affects privacy."));

But the message will be incorrect because the issue is more than just user not aware of how RBF works in bitcoin core wallet. It is also the coin selections algorithm when using a custom change address in the initial transaction. Original Issue: https://github.com/bitcoin/bitcoin/issues/20795

prayank23

comment created time in 2 hours

CommitCommentEvent

Pull request review commentbitcoin-core/gui

Add information to "Confirm fee bump" window

 bool WalletModel::bumpFee(uint256 hash, uint256& new_hash)     questionString.append("</td><td>");     questionString.append(BitcoinUnits::formatHtmlWithUnit(getOptionsModel()->getDisplayUnit(), new_fee));     questionString.append("</td></tr></table>");+    questionString.append("<br><br>");+    questionString.append(tr("WARNING: New inputs and outputs can be added in replacement transaction if necessary which affects privacy."));

can you squash to one commit?

Sure will do once we finalize the warning message. Does the below mentioned thing look okay?

WARNING: This will pay the additional fee by reducing change outputs or adding inputs when necessary. It may add a new change output if one does not already exist. These may potentially leak privacy.

prayank23

comment created time in 2 hours

more