How do proof-of-work and stake differ?