You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Borsh was built for being deterministic and bijective with no upgradability in mind (see near/nearcore#1166). This is not ideal for Solana programs that may want to expand state in future upgrades.
Protobuf is also great because it is already compatible with a lot of programming languages. The downside is that state must now be defined in a separate programming language, but this is not an uncommon practice when building distributed systems.
Protobuf also makes it easy to read any account without having to import a crate. This type of read will never get outdated because Protobuf is able to be reverse compatible with previous state definitions.
Theoretically, programs can even define their instructions and methods using an IDL similar to grpc. This would allow programs to expose their "headers" without revealing their source code.
The text was updated successfully, but these errors were encountered:
As discussed offline, although this is an important issue, it's a major breaking change that will be punted for consideration for v2.0.0.
The main benefit I can tell that we get from proto is upgradeability baked into the IDL. The other benefits mentioned here w.r.t. being agnostic to programming languages and reading accounts without having to import a crate is also achieved with Borsh + IDL as currently implemented in Anchor.
Borsh was built for being deterministic and bijective with no upgradability in mind (see near/nearcore#1166). This is not ideal for Solana programs that may want to expand state in future upgrades.
Protobuf is also great because it is already compatible with a lot of programming languages. The downside is that state must now be defined in a separate programming language, but this is not an uncommon practice when building distributed systems.
Protobuf also makes it easy to read any account without having to import a crate. This type of read will never get outdated because Protobuf is able to be reverse compatible with previous state definitions.
Theoretically, programs can even define their instructions and methods using an IDL similar to grpc. This would allow programs to expose their "headers" without revealing their source code.
The text was updated successfully, but these errors were encountered: