avoid generating redundant code
- avoid generating types not used by the protocol enabled extensions
- the encode/decode helpers are to cover all situations but certain code path won't be hit with just the enabled extensions
- there're synchronouts calls which are making no sense to be synchronous, and are safe to remove
- could have more