save block to db