Generalised Replay Protection for Future Hard Forks



Summary:

The discussion revolves around the use of `nForkId` as a generic replay protection scheme to protect old transactions on multiple chains. Ad hoc schemes that break old transactions on one of the chains are not desirable, hence it's better to implement a generic scheme in advance. However, users need to be aware that `nForkId=0` transactions would be valid not only on future forks but also on past forks, which could potentially create minor pitfalls for them. When using `nForkId`, it's essential to protect the funding transaction to avoid replay attacks on past forks by setting `nForkId>=1`. For commitment transactions, `nForkId=0` can be used, making it valid on all chains, but users should note that the parent transaction exists only on two chains, the original one and the forked one.


Updated on: 2023-06-12T22:03:14.556496+00:00