goat-systems / go-tezos

Go Tezos Is a Go library that exposes and builds upon the Tezos RPC.
MIT License
71 stars 45 forks source link

Add Support for Creating/Signing Endorsements #156

Closed utdrmac closed 3 years ago

utdrmac commented 4 years ago

There's a bunch of junk commits on this because of a lot of stuff I did on v1 that I never PR'd. The PR itself should be pretty clean and only adds functionality; doesn't modify anything else.

SignOperation does not work on endorsements because endorsements have a different watermark value (3) and also require the chainID as part of the contents to sign.

DefinitelyNotAGoat commented 3 years ago

Thanks @utdrmac!

You've always been a great help. I actually have been working on this myself and have successfully completed the forging of all operations locally including michelson in transactions/originations. These features are to be included in go-tezos/v3 which is on target to release at the end of September.

Take a look at the forge package here: https://github.com/goat-systems/go-tezos/blob/v3/forge/operations_prototype.go

utdrmac commented 3 years ago

Sweet. I'll take a look. My custom endorser has been running solid on carthagenet since Jan'20. I've been putting off working on block creation until now. I really want a custom baker so I can do various logic improvements.

DefinitelyNotAGoat commented 3 years ago

@utdrmac I actually have been wanting to do the same thing for a while now. Specifically I would like to create a failover system integrated within a custom baker, which as you know carries a lot of risk. Maybe once this grant is done, we can collaborate on our mutual goal?

utdrmac commented 3 years ago

Ha. Great minds think alike. I've been wanting to make a baker that uses something like Paxos or Raft for consensus. That way I could have multiple bakers running, but only 1 can be leader at any given time. Yes, extremely risky for double-bake.

DefinitelyNotAGoat commented 3 years ago

Going to close this. Supported in V4 including your suggested bug fix.