Chain.ds_serialize_block: new method.
Made encode_script a method.