hash – Why is it impossible to modify a transaction in the blockchain?

Keep in mind two things:

  • Digest functions or hash functions ((see here))1

  • proof of work – Finding a hash that satisfies some conditions (see here)

Briefly, hash functions take a data structure (of any length) and give it a “fingerprint” in a default size. Minor changes to the input info change the fingerprint wildly.

Proof of work, in Bitcoin requires that you assemble a block (with all the transactions AND the previous block hash) and try out values (in the nounce field) until you reach a valid hash. It is called proof of work because the only way to reach a valid hash is by trying different inputs (thus working) until you reach it.

So, it is hard to change a tx after it has been confirmed as the latest block references the previous block’s hash, which in turn references the previous block and so on. If any data changes in any of those blocks, all subsequent hashes will change, leading the proof of work on all these blocks to become invalid.

The only way is to go all the way back and solve the PoW again for all blocks that had hashes affected.

In order to change a transactions confirmed 2 blocks ago (let´s call it block t-2), you would need to reassemble that block (t-2), solve the proof of work for it, then reassemble the subsequent block (t-1), solve it’s proof of work and only then you would be able to start working on block t. While you were spending energy/work on your new version of block t-2, other miners were already working hard on block t.

This race to revert something becomes exponentially more difficult the further back you go in the blockchain. In order to even start such an attack the attacker will need, at least 51% of the hashing power and probably way more the deeper “changing the record” goes.

malware – Is it impossible to have a PDF file execute a command without abusing any exploits?

We are running a purple team which includes attempting to run a malicious PDF on the target system. The targeted user is well aware of the exercise so there is no concerns about an AV picking the payload up, or about prompts (the user can simply agree to them). However, they have the latest version of Adobe Reader installed. It was my impression that there were ways to execute commands or files using PDF files, similar to how a macro can execute commands within Word or Excel. However all of the information I have found online targets specific vulnerabilities within readers, rather than abusing legitimate built in functionality. Is it impossible to run arbitrary code using a PDF file without abusing any specific vulnerability?

wallet – I made a transaction 7 hours ago, the transfer has not yet arrived. I didn’t know that it’s impossible to choose a low commissio

Good afternoon, I made a transaction 7 hours ago,0.0059 BTC, commission 0.0002 the transfer has not yet arrived. I didn’t know that it’s impossible to choose a low commission, because I did it for the first time, how long will I have to wait for my transaction now? She was in the mempool, did it through bitcoinru.org

hardware failure – XBOX ONE S shutdown after 1 minute, impossible to get into Troubleshoot menu

I’ve got this XBOX ONE S console that doesn’t work anymore.

Symptoms :

  • Power on OK, light is working
  • After about 1 minute, the console shuts itself down
  • Impossible to get into the Troubleshoot menu : no beep after I press the power button while holding the sync and eject buttons
  • No display at all on any screen tested

Any idea what the issue might be ? Should I replace the power supply ? Not sure the symptoms indicate that might be the root cause.

Thanks in advance for any clue.


python – Using >= even though it’s impossible for > to be true

I can’t find an answer to this question either because it doesn’t exist or because I am incapable of searching for it correctly.

Consider this code which prints out the numbers from 1 to 12 ad infinitum:

month = 1
while True:
    month += 1
    if month == 13:  # month >= 13 ? month > 12 ?
        month = 1

Is there any reason that the line if month == 13 shouldn’t be written as if month > 12, you know, “just in case?” I feel like it’s “safer” to write if month > 12 or if month >= 13, but I know that month > 13 will never be true. Is there any agreed-upon best practice in a situation like this? Thank you.

If a decision problem’s solution is exponentially large, then is it impossible for it to be in $NP$?

Decision Problem: Is $2^k$ + $M$ a prime?

The inputs for both $K$ and $M$ are integers only. The solution is an integer only.

The powers of 2 have approximately $2^n$ digits. Consider $2^k$ where $K$ = 100000. Compare the amount of digits in $K$ to the amount of digits in it’s solution!


Could the solution be verified in polynomial time even though the solution is exponentially large?

If no, can I say it is not in $NP$?

centos – Impossible to boot due to corrupted and/or missing logical volume

I am facing a big LVM trouble with a cluster I have to administrate after departure of our beloved colleague. The cluster has 10 nodes under CentOS 6.5 with a single volume group. On top of this group, he defined (I guess) several logical volume, including lv_root and lv_home. I have to say I never used LVM or so. While I was configuring network due to change in the routes, I decided to reboot the system and here the troubles begin:

First, the system refuse to boot because a fsck failure on /dev/vg_shared-lv_root. It proposed to log as root, which I did, and I ran e2fsck on it and it seemed to work. After that, I ctr-alt-suppr to restart that node and then, system refused to boot due to a corrupted file-system error on /dev/vg_shared-lv_home. But I cannot find any lv_home inside /dev/vg_shared, while lv_root is here.

I seach for troubleshooting guides that all propose to use tools like vgscan, which I can’t use with error File-based locking initialisation failed

My main concern is with the data on that filesystem, which represent several months of computations: is there a way to access that lv_home?
My second concern is reparing that file-system, but I have no idea where to start.

I don’t know what to tell more. I could give as much details as needed to get some help… Thank you for any hint.

Best regards


I cannot run things like vgscan due to file system mounted in read-only mode.

In fact, I have no idea where to start.

lighting – Continuous drive mode with a flash- impossible?

It is quite possible within certain parameters. Those parameters would include the ability of the camera body to regulate the continuous drive rate, the ability of the flash to provide the needed light at a power level setting that allows for a fast recycle rate, and the ability of the photographer to find the rate where the capabilities of the camera and flash can work together for the best combined results.

If you can combine the ability to control your burst rate to something around 3 or 4 frames per second and can light the scene adequately with a very low power setting, with many speedlight models it is possible to have the flash fire for every frame in such a burst. You just need to play around with the components you are using and see where your “sweet spot” is.

Some cameras will allow the user to set a continuous drive mode rate that is slower than the maximum for the camera. I’ve had cameras that gave a choice between, say, 8fps high speed continuous or 3 fps low speed continuous. I also have a camera that will allow me to set the rate from between 1 fps and 8 fps for the low speed continuous setting and from between 2 fps and 10 fps for the high speed continuous setting. There are also quiet modes on some cameras that will reduce the maximum frame rate.

How long a flash takes to recharge after a particular discharge is dependent upon the total capacity of the flash’s capacitors and the amount of power used for a particular strobe. Most speedlights control flash power by controlling the duration of the flash. When set to very low power only a fraction of the flash’s total capacity is actually discharged. This allows the capacitors to be raised back to full capacity much faster than if a full power discharge had been used. If the flash is capable of drawing power from an external battery pack this will also usually speed up the time needed to recycle.

This is what the external battery pack port looks like on your YN560 II flashes:
Battery Pack Plug
It’s on the left (That’s the PC Sync connector on the right). It is a fairly standard pin arrangement that most generic external battery packs will fit.

A few flashes will allow the flash to refire as soon as the shutter is pressed with whatever amount of energy is stored in the capacitors. Most won’t fire, though, until at least the amount of energy needed for the power to which the flash is set is stored in the capacitors. Some won’t fire until the capacitors are fully charged, even if power is set to a low level.

reference request – From Zurab’s integral representation for the Apéry’s constant to almost impossible integrals

I would like to know if the following integrals are known, or in case that aren’t in the literature we can calculate these in closed-form (in terms of elementary and standard functions). I wondered about it when I tried to get variants of an integral representation from a paper of Zurab (identity $(22)$ from (1), that I refer as Zurab’s integral in the title), in next two contexts. If my post is more suitable for Mathematics Stack Exchange or you’ve feedback (in particular if you know these integrals) please add your feedback in comments.

Question 1. The first, just as comparison to (1), calculate if possible $$int_0^{pi}frac{J_0(x)}{binom{1}{x/pi}}dx,tag{1}$$
where $J_0(x)$ denotes the Bessel function. Many thanks.

For Question 1 I tried to combine an integral representation from the Wikipedia Bessel function and calculations from Wolfram Alpha online calculator, in particular I did an attempt to exploit the section Bessel’s integral that refers previous Wikipedia (reference Nico M. Temme, Special Functions: An introduction to the classical functions of mathematical physics (2nd print ed.). New York: Wiley, (1996) pp. 228–231), and the output int x(pi-x)/sin(x) cos(a x) dx that provides me Wolfram Alpha online calculator.

Question 2. I would like to know as reference request or in other case if it is possible to compute the integrals $$c_{n,m}:=int_0^{1/2}frac{x(x-1/2)}{sin^2(2pi x)}, sin(2pi(2m+1)nx)dxtag{2}$$
for integers $mgeq 0$ and integers $ngeq 1$. Many thanks.

Thus for Question 2 if you know a reduction formula or reference for these integrals $(2)$ from the literature helpful here, answer my question as a reference request and I try to search and read from the literature their closed-forms.

If I remember well I could to find just a choice of integration by parts that was suitable in the computations that I did few months ago, but it doesn’t solve the problem, since I didn’t know how to finish my (tedious) calculation to get in closed-form $(2)$. This is just a curiosity that I wondered few months ago, again from Zurab’s integral as starting point in an attempt to combine his integral and a definition of a certain function (and arithmetical functions that I omit here from page 79 of (2)) I wrote $$-frac{7zeta(3)}{8pi^3}=sum_{n=1}^inftysum_{m=0}^inftyfrac{mu(n)chi_1(n)}{n^2}cdotfrac{(-1)^m c_{n,m}}{(2m+1)^2},$$ where $zeta(s)$ is the Riemann zeta function (and those other arithmetic functions from the mentioned article (2)).


(1) Zurab Silagadze, Sums of Generalized Harmonic Series. For Kids from Five to Fifteen, RESONANCE, September 2015.

(2) Manuel Benito, Luis M. Navas and Juan Luis Varona, Möbius inversion from the point of view of arithmetical semigroup flows, Biblioteca de la Revista Matemática Iberoamericana, Proceedings of the “Segundas Jornadas de Teoría de Números” (Madrid, 2007), pp. 63-81.