refactoring RPC
refactoring dump protocol
update testcase