(lets call SIGHASH_ANYONECANPAY ACP for short)
ACP allows you to only sign your own input and ignore the rest.
[input_ACP] [output_1, output_2]
so if others can add their inputs to this transaction like so:
[input_ACP, input_1, input_2] [output_1, output_2]
or
[input_1, input_2, input_ACP, input_3] [output_1, output_2]
now this works fine with ALL and NONE since the index of the input_ACP doesn't matter at all.
but the problem is if it was signed with SINGLE:
[input_ACP] [output_1, output_2]
in this transaction you only sign output_1 from outputs since input_ACP index is 0.
and if someone added their input like this:
[input_ACP, input_1] [output_1, output_2]
it works fine.
but if someone added their input like this:
[input_1, input_ACP] [output_1, output_2]
then input_ACP signature would become invalid since now the index of it is 1 and should have signed output_2 instead!
so the question is, am i understanding the way SINGLE | ACP signhash works and is this a problem or am i mistaken?