The testimony of Papias that the Gospel of Mark was written by Mark out of Peter’s anecdotes is recorded by Eusebius (HE 3.39.15):
And the elder used to say this: ‘Mark, having become Peter’s interpreter, wrote down accurately everything he remembered, though not in order, of the things either said or done by Christ. For he neither heard the Lord nor followed him, but afterwards, as I said, followed Peter, who adapted his teachings as needed but had no intention of giving an ordered account of the Lord’s sayings. Consequently Mark did nothing wrong in writing down some things as he remembered them, for he made it his one concern not to omit anything that he heard or take any false statement in them’ (trans. M. Holmes).