scrypt and pos updates

(some commits from sdcdev/insight)