Tagged release v3.40.0

f0c44ef revert(db): return get_history_list logic
9f21dd8 feat(db): move history logic to archivist service