Glasshouse by Charles Stross
When Robin wakes up in a clinic with most of his memories missing, it doesn't take him long to discover that someone is trying to kill him.
It's the twenty-seventh century, when interstellar travel is by teleport gate and conflicts are fought by network worms that censor refugees' personalities and target historians. The civil war is over and Robin has been demobilized, but someone wants him out of the picture because of something his earlier self knew.
On the run from a ruthless pursuer and searching for a place to hide, he volunteers to participate in a unique experimental polity, the Glasshouse. Constructed to simulate a pre-accelerated culture, participants are assigned anonymized identities: it looks like the ideal hiding place for a posthuman on the run. But in this escape-proof environment Robin will undergo an even more radical change, placing him at the mercy of the experimenters, and of his own unbalanced psyche . . .