Bitcoin Forum
May 24, 2024, 10:03:49 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: « 1 2 3 4 5 6 7 8 9 [10] 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 »
181  Bitcoin / Bitcoin Technical Support / Re: C# - From hexadecimal to mnemonic? on: December 01, 2020, 09:28:58 AM
I didn't fully understand this. Do you have a function that does that in your library? Because it seems that the link you gave me doesn't do that. (Tbh, I don't understand what exactly public BIP0039 does)
This constructor instantiates BIP-39 (and 32) from a given mnemonic string, it first validates the string which requires converting the words to the entropy, computing its checksum and comparing it with the given checksum. The part of the code I posted is what you want (from mnemonic to entropy which can be converted to hex).
There is no public method for this since this not needed in any real world scenario, however you can copy the code and add a final line at the end using the ToBase16() extension on the entropy like string hex = entropy.ToBase16();

Quote
I'm really stuck on that! I don't know how to do it and yes I would like you to give me some code or a link to your library. I had started this thread asking how to implement it, but didn't understand. Fortunately, I achieved the signing/verifying part, which I was searching too.
There is no code for it yet, I'll have to read how it works and then implement it.
182  Bitcoin / Bitcoin Technical Support / Re: C# - From hexadecimal to mnemonic? on: December 01, 2020, 08:32:16 AM
Is there any simple way to go backwards? From mnemonic to hexadecimal?
Take index of each word (an integer), convert it to binary, drop the highest bits and only keep the first 11, repeat this for each word and concatenate the bits to each other. Assume 1, 2 and 3 are the bits (0 or 1) of first, second and third word respectively:
Code:
11111111 11122222 22222233 33333333 3...
https://github.com/Autarkysoft/Denovo/blob/c5e741f76aa9318fc853b75f7a5270effebcc4ba/Src/Autarkysoft.Bitcoin/ImprovementProposals/BIP0039.cs#L121-L167

Quote
I think that this, along with finding a way to encrypt messages with ECC on c#, are the only things that have remained to finish my work.
I could implement ECIES if you are stuck.
183  Bitcoin / Bitcoin Technical Support / Re: C# - From hexadecimal to mnemonic? on: November 29, 2020, 09:24:20 PM
Do you have any e-books to suggest me that you believe are perfect for a beginner?
I prefer videos myself, there is a free course by Microsoft here: https://channel9.msdn.com/Series/CSharp-Fundamentals-for-Absolute-Beginners
There are paid ones on Udemy which I hear are good.
For XAML: https://docs.microsoft.com/en-us/dotnet/desktop/wpf/fundamentals/xaml?view=netdesktop-5.0
For MVVM (an architectural pattern that goes well with XAML and C# following the IoC principle): https://www.tutorialspoint.com/mvvm/index.htm
For everything else just Google or feel free to ask me, I'll answer to the best of my abilities.

Quote
To clear up, once I say amateurly I mean that I don't have an important knowledge. If I ever have a query like how to insert a button that opens Windows Explorer onclick to choose a file, I'll have to google it. Because I simply don't know how to do it.
If you want to become familiar with XAML (the language used in UI) you could start a WPF project and then use the designer to simply draw any item such as a button (like you'd do in MS paint) then look at the XAML code that it generates. It may seem overwhelming at first but eventually you'll just type all of that in a much cleaner and more flexible way.

Quote
To prevent any misunderstandings, console app means that it is only available on cmd? It means that it has no UI?
Yes, it is a text-only interface similar to command line in windows. Technically this is a UI (user interface), but is not a GUI (graphical user interface).
184  Bitcoin / Bitcoin Technical Support / Re: C# - From hexadecimal to mnemonic? on: November 29, 2020, 07:40:54 PM
Edit: It's a windows forms app, not a console app.
You should be able to migrate the app to .net 5: https://docs.microsoft.com/en-us/dotnet/desktop/winforms/migration/?view=netdesktop-5.0

If this is a new project and if you are new to c# and .net I strongly suggest getting more familiar with XAML instead of winforms. The later is windows only and is old and limited while the former is a lot better and there are UI projects such as Avalonia that run on any OS.
If you want to try things out then using a console app is the easiest way to go, otherwise if you want UI install Avalonia and start from there. There is also WPF which is windows only but is ported to .net core and .net too.
185  Bitcoin / Bitcoin Technical Support / Re: C# - From hexadecimal to mnemonic? on: November 29, 2020, 06:53:45 PM
And choose what framework? I was on 4.7.2, it has 2.0, 3.0 etc. I changed it to 3.0, then tried to install, same error.
Are you sure you set it to .net core 3.0 and not .net framework 3.0?
Try creating a new project like this:
186  Bitcoin / Bitcoin Technical Support / Re: C# - From hexadecimal to mnemonic? on: November 29, 2020, 04:40:22 PM
I upgraded to 3, then I tried to install your library, same error.
If you get the "same error" saying "...into a project that targets '.NETFramework,Version=v4.7.2',..." it means you have not changed your target framework. Go to your project properties (select the project from solution explorer then from menu Project > {project name} properties) then in Application tab you should see a Target framework combobox where you can select the available frameworks. You can also manually modify your .csproj file if you are familiar with it, I'm already using the package in another project of mine targeting netcoreapp3.1 like this:
https://github.com/Coding-Enthusiast/FinderOuter/blob/b35b843987541dac24f8577342d287fd49f9dad7/Src/FinderOuter/FinderOuter.csproj#L58

Should I download .net framework 4.8?
No version of .net framework would work, they are kind of obsolete. There are certain improvements that were added to .net core and are present only in .net standard 2.1 which I'm taking advantage of in the library, so you have to target .net core 3.0+.
187  Bitcoin / Bitcoin Technical Support / Re: C# - From hexadecimal to mnemonic? on: November 29, 2020, 03:39:40 PM
That error is because .net standard 2.1 (the library's target framework) is not compatible with the very old .net framework 4.7.2, you should upgrade to .net core 3.0+ (3.1 is LTS). See this table on MSDN.
188  Bitcoin / Bitcoin Technical Support / Re: C# - From hexadecimal to mnemonic? on: November 29, 2020, 02:25:54 PM
I guess that Autarkysoft.Bitcoin is one of your projects.
Yes it is, you can find it in my signature too. Keep in mind that the library is in beta and you can find my versioning convention here

Quote
Unfortunately, it seems that I can't install it. (Visual studio 2017 on windows 10)
This is a known bug with old visual studio, it will be fixed if you upgrade to VS2019. Until then check out this SE reply which should help.
189  Bitcoin / Bitcoin Technical Support / Re: C# - From hexadecimal to mnemonic? on: November 29, 2020, 01:53:59 PM
The conversion is pretty simple and straight forward. As you already know you treat the entropy (your hex) as an octet string and have to select 11 bits at a time. It appears that NBitcoin uses .net's BitArray class which I find very inefficient way of working with bits so I simply put the bits with the padding in a uint[] and then select the bits from there. You can see it here with sufficient comments.

What you want can be achieved from the following single line method:
Code:
using Autarkysoft.Bitcoin.Encoders;
using Autarkysoft.Bitcoin.ImprovementProposals;

public BIP0039 GetBip39FromHex(string hex) => new BIP0039(Base16.Decode(hex));
190  Bitcoin / Development & Technical Discussion / Re: Having coinbase TX troubles on RegTest on: November 26, 2020, 07:26:47 AM
Since fPowNoRetargeting is set to true for RegTest the nBits (target) never changes in blocks. I don't think you can change this anywhere apart from editing the code itself.
191  Bitcoin / Development & Technical Discussion / Re: Having coinbase TX troubles on RegTest on: November 26, 2020, 06:09:14 AM
It is because you have been applying BIP-34 wrongly. The block height has to be pushed with the minimal number of bytes:
Code:
1 -> OP_1
2 -> OP_2
...
499 -> 0x02f301
500 -> 0x02f401
Since BIP-34 activates at block 500 on RegTest, this is ignored on all blocks from height 1 to 499 and from block height 500 it starts being enforced and the invalid push is rejected.
192  Bitcoin / Bitcoin Technical Support / Re: problem with testing phrases for wallet on: November 25, 2020, 04:28:01 PM
73,475,850,794.252 TB
would be the size of that file though (assuming a letter is 5 bits in length and a word is 5 letters and not including spaces).
Technically you shouldn't even build the mnemonic itself while performing brute force and it is not stored anywhere, only a bit string for each round is constructed on the fly and discarded/changed for next step.
For instance I allocate about 300 bytes per core when recovering BIP-39 or Electrum mnemonics in FinderOuter which keeps being reused.
193  Bitcoin / Bitcoin Technical Support / Re: problem with testing phrases for wallet on: November 25, 2020, 02:38:14 PM
and In the second step, Takes a test of this 24 phrases and asks s to order them correctly.
then I have only the phrases of second step (screen shot) ( they are not in correct order )
I believe Coinomi sorts the words alphabetically in the second window which for all intents and purposes makes it scrambled and impossible to recover due to enormous number of possible combinations to check.
194  Bitcoin / Development & Technical Discussion / Re: Academic question about mining on the testnet on: November 25, 2020, 04:51:44 AM
It is not easy to guess the problem you are having without seeing the block header you submitted, but one similar mistake I was making when I wrote my miner in early stages was that I was changing the difficulty of the already mined block which in turn changed the hash that was found and made it incorrect.

You also keep saying "leading zeros", we don't deal with "leading zeros" at all in difficulty. Instead we deal with numbers. 05 is bigger than 03 but both have 1 leading zero, which could be another reason why your block was rejected.
You have to convert your hash to an integer in little-endian format and your target to its 256-form and then compare these two integers.

Also if you want to get rid of the complications and high difficulty of TestNet simply use RegTest instead. The difficulty is already low and you can mine the blocks in a blinking of an eye. Then submit it to your local blockchain and see if it is accepted or not.
195  Bitcoin / Bitcoin Technical Support / Re: Ledger Nano, one lost word of the 24 on: November 22, 2020, 05:44:05 AM
If that's all too complicated, than an easier method may be to use this: The FinderOuter, a bitcoin recovery tool (v0.5.0 2020-09-17)

I don't think it supports the case where you do not know which location your word is missing from, but with only 24 possibilities you can just run it 24 times until you find the correct one.
It does not support it yet, since I'm still working on issue #9 haven't been able to add any new features.
Recovery is quite fast though (~1 second for 1 missing word), the whole thing (2048 * 24) shouldn't take more than 10 seconds if the path is hardened which I believe it is for Ledger Nano.
196  Bitcoin / Bitcoin Technical Support / Re: [~1 BTC Bounty] on: November 22, 2020, 05:18:37 AM
Certain nodes not running Bitcoin Core allow for non-standard transactions.
Most alternative nodes are either built on top of bitcoin core or are translated line-by-line from bitcoin core which means they do exactly what core does.
I sent the tx to the nodes with the following user agents, some of them rejected it but most didn't reply (same behavior as core since reject messages were removed):
Code:
Statoshi
CKCoind
btcwire/btcd -> rejects (reason= using uncompressed pubkey)
BitcoinUnlimited -> rejects as bad txns
therealbitcoin.org -> these are some broken ass nodes that violate the P2P protocol but some seem to be accepting it
KIT-DSN -> rejects (reason= using uncompressed pubkey)
bcoin -> terminates connection
197  Bitcoin / Bitcoin Technical Support / Re: [~1 BTC Bounty] on: November 15, 2020, 04:04:30 AM
https://live.blockcypher.com/btc/pushtx/ continues to accept the TX - but only holds the TX in their mempool for about eighteen hours, so there are occasions when the rebroadcast misses a couple of hours.
If you had the IP address of any of the nodes that accept this transaction you could directly send the tx to them without needing to go through a block explorer.
P.S. The IP address shown on blockcypher (3.95.194.185) is not reachable.
198  Bitcoin / Electrum / Re: Looking for derivation paths used for different Electrum mnemonic types on: November 07, 2020, 12:04:45 PM
I dug around in the code again today and I believe this is where the paths are set:
https://github.com/spesmilo/electrum/blob/1c07777e135d28fffa157019f90ccdaa002b614e/electrum/keystore.py#L984-L1003
199  Bitcoin / Development & Technical Discussion / Re: BIP-39 List of words in Portuguese submitted! on: November 06, 2020, 04:01:00 PM
Edit 2: Someone tested our wordlist here:
https://travis-ci.org/github/bitcoin/bips/builds/730941730

The Travis CI build. I don't know what it is, maybe something similar to your tool?
It is not testing your wordlist. Tools such as travis-ci are "hosted continuous integration service" which are automatically called each time there is a new commit (or if it is set, a new pull request) and they run a script (the .yml file) that is sent to their server on each call to run. The script is usually defined to build and run tests but it can be anything.
For example I use it to build my projects on Linux-x64 and also run all my tests there; it helps catch any problems with the build or any bugs in the code that tests can catch.
In case of bips they are running this script that performs some basic checks.
200  Bitcoin / Electrum / Re: Looking for derivation paths used for different Electrum mnemonic types on: November 06, 2020, 08:26:42 AM
The derivation_and_script_type_dialog seems to be called when the wallet is being created using a hardware wallet not from an Electrum seed phrase. That is why path for eg. 'standard', 'legacy (p2pkh)' is being set to m/44'/0'/0' and I know for a fact that it is m/0 for Electrum mnemonics.
Pages: « 1 2 3 4 5 6 7 8 9 [10] 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 »
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!