I asked chatgpt to make it
I guess that is the reason why those things are not properly aligned. Usually, in human-generated ASCII-arts, there are proper amount of spaces or tabs in all places. Also, usually too high temperature can dramatically change those things.
There are places that can explain it better, for example:
https://en.bitcoin.it/wiki/Transaction#General_format_of_a_Bitcoin_transaction_.28inside_a_block.29Also, you can look at some BIPs, there are also better examples than that, for example here:
https://github.com/bitcoin/bips/blob/master/bip-0143.mediawikiBoxes look crappy for this reason
Not necessarily. Even in simple cases like "draw me a sample sudoku" or "write a xor table for hexadecimal characters", it is quite easy to get non-aligned rectangles, not to mention that you can play some simple game with 4x4 boxes, and it can suddenly become 4x5, because those bots don't understand those things at all. It is similar case as with 6 fingers. Not to mention that if you try some basic maths like "5a827999^2", multiplied in a traditional way, as taught in school, then those AI models simply explode with random results.
Specifically, is the Witness part of the transaction in the correct place, and are the sizes all good?
Definitely not.
1. Input Count (4 bytes) - not really, it is
VarInt2. Output Count (4 bytes) - the same as above
3. Script Length (1 byte) - also VarInt
4. Witness (Variable Size) - yes, it is present, but not in inputs, it is placed before locktime
5. PK Script Len (1 byte) - not necessarily public key, and also VarInt
Should Witness be in the Inputs section or in it's own place in the transactions struct?
Start from this:
https://en.bitcoin.it/wiki/Transaction#General_format_of_a_Bitcoin_transaction_.28inside_a_block.29There are two places you have to check. One is "Flag", always set to "0001", and another is "Witnesses", just before locktime.