Skip to content

Latest commit

 

History

History
38 lines (32 loc) · 2.32 KB

CONTRIBUTING.md

File metadata and controls

38 lines (32 loc) · 2.32 KB

Contribution Guidelines

Any contribution that you make to this repository will be under the Apache 2 License, as dictated by that license:

5. Submission of Contributions. Unless You explicitly state otherwise,
   any Contribution intentionally submitted for inclusion in the Work
   by You to the Licensor shall be under the terms and conditions of
   this License, without any additional terms or conditions.
   Notwithstanding the above, nothing herein shall supersede or modify
   the terms of any separate license agreement you may have executed
   with Licensor regarding such Contributions.

Contributors must sign-off each commit by adding a Signed-off-by: ... line to commit messages to certify that they have the right to submit the code they are contributing to the project according to the Developer Certificate of Origin (DCO).

Checklist for upgrading allora-chain dependency

  1. Update go.mod with the new version of allora-chain
  2. If a new version of Transaction types were created (e.g. vA gets updated to vB):
    1. Update defaultRegisterFuncs on codec/codec.go, adding the register function of old version to the list (e.g. vA)
    2. Update imports on codec/codec.go (at "OLD VERSIONS of MINT TRANSACTIONS" or "OLD VERSIONS of EMISSIONS TRANSACTIONS" sections)
    3. Update TestCodec_DefaultRegisterFuncs test on codec/codec_test.go, inserting the new types (e.g. vB) to ensure full coverage.
    4. Update the config files under config/ with the new versions (e.g. vB)
    5. Update app/service/query.go
      1. Update EmissionsServicePrefix and MintServicePrefix constants
      2. Check if the names of the types did not change
  3. If a new version of Event types were created (e.g. vA gets updated to vB):
    1. Copy the old version of events.pb.go under codec/allora-chain/x (follow the structure of existing versions)
    2. Add a silent import on codec/codec.go` (at "OLD VERSIONS of MINT EVENTS" or "OLD VERSIONS of EMISSIONS EVENTS" sections)
    3. Add a new test at TestAllEventsAreRegistered, on tests/integration/codec/codec_test.go to ensure all event types are recognized.
    4. Update the config files under config/ with the new versions (e.g. vB)