Mastodon protocol contains many departures from ActivityPub specification, mostly in the form of additional requirements.
The point is that the following is a non-zero list of differences. Compliant ActivityPub gets dropped by Mastodon all the time. I'm probably missing things here, since there are a ton of issues I haven't looked through, but this is what I could find just reading through the spec. I maintain that reading https://docs.joinmastodon.org/spec/activitypub/ is more useful than reading https://www.w3.org/TR/activitypub/ if your goal is to talk to Mastodon.
- The primary unit of content is a Note, not an Activity.
- You MUST compact your documents against the same context as Mastodon's internal context. URIs are not expanded to become unambiguous.
- Actors MUST have a type of Person, Group, Organization, Application, Service. (AP says that actors can have any type.)
- Actors MUST have a preferredUsername (instead of MAY). Performing a WebFinger