Starting work on tx replay

Need to split out code in serve.go so it's sharable.