change attribute name 'layer' to 'type'

bump protocol to 4
bump version to 0.8