Hello !
First of all, thank your documentation ! It helped me a lot while building this library -> Kteepass
I found a mistake in one of your images explaining the HMAC-SHA256 check process for KDBX block stream:

At the top right of this diagram, you have to concat the block payload (n bytes), n (4 bytes), and i (8 bytes). computing the HMAC only on the block is not enough and lead to an inexact HMAC-SHA256.
Example of working process: here