Commit Graph

5 Commits

Author SHA1 Message Date
swimricky 9fea461174
feat(accumulator-updater): add funding account for AccumulatorInput creation (#771) 2023-04-19 09:51:27 -07:00
swimricky 0ac771266c
[accumulator-updater 5/x] Single PDA (#760)
* feat(accumulator-updater): write accumulator messages into one account

* chore(accumulator-updater): clean up commented out code

* chore(accumulator-updater): remove unused feature for cargo

* chore(accumulator-updater): minor comment fix

* feat(accumulator-updater): update implementation of AccumulatorInput header

Removed InputIndex in header, updated to use end_offsets & include header_len

* feat(accumulator-updater): add MessageHeader to all PriceMessages and include in serialization

* fix(accumulator-updater): fix AccumulatorInput size & unit tests

* feat(accumulator-updater): update put_all to write as much data as possible

put_all will write up to the limit of the accumulator_input.data.len(). this ix must not fail even
when the data being written exceeds the size of the account. in this situation, we will write as
many *COMPLETE* messages as possible

* docs(accumulator-updater): update put_all ix documentation

* chore(accumulator-updater): addressed PR feedback

fixed comments, added test, renamed accumulatorInput.data to messages

* fix(accumulator-updater): fix ts test
2023-04-18 12:48:28 -07:00
swimricky 4502c6dcf9
[accumulator-updater 3/x] Update Inputs Ix (#741)
* feat(accumulator_updater): initial skeleton for accumulator_udpater program

Initial layout for accumulator updater program. Includes mock-cpi-caller which is meant to represent
pyth oracle(or any future allowed program) that will call the accumulator updater program. All
implementation details are open for discussion/subject to change

* test(accumulator_updater): add additional checks in tests and minor clean up

* chore(accumulator_updater): misc clean-up

* refactor(accumulator_updater): added comments & to-dos and minor refactoring to address PR comments

* feat(accumulator_updater): nmanual serialization for mock-cpi-caller schemas & use zero-copy

* chore(accumulator-updater): misc clean-up

* refactor(accumulator-updater): rename parameter in accumulator-updater::initalize ix for consistency

* style(accumulator-updater): switch PriceAccountType enum variants to camelcase

* refactor(accumulator-updater): address PR comments

rename schema to message & associated price messages, remove unncessary
comments, changed addAllowedProgram to setAllowedPrograms

* refactor(accumulator-updater): address more PR comments

consolidate SetAllowedPrograms and UpdateWhitelistAuthority into one context

* style(accumulator-updater): minor style fixes to address PR comments

* feat(accumulator-updater): implement update-inputs ix, add bump to AccumulatorInput header

* feat(accumulator-updater): implement update ix

* refactor(accumulator-updater): refactor ixs & state into modules

* docs(accumulator-updater): add comments for ixs

* feat(accumulator-updater): consolidate add/update_inputs into emit_inputs ix (#743)

* refactor(accumulator-updater): clean up unused fn, rename fns

* fix(accumulator-updater): fix error from resolving merge conflicts

* refactor(accumulator_updater): address PR comments

Remove account_type, rename emit_inputs to put_all to be more similar to a Map interface, added
AccumulatorHeader::CURRENT_VERSION

* docs(accumulator_updater): add docs for AccumulatorInput struct
2023-04-05 16:33:12 -07:00
swimricky cb44e15f33
[accumulator-updater 2/x] Manual Serialization & Zero-copy for Mock-cpi-program (#729)
* feat(accumulator_updater): initial skeleton for accumulator_udpater program

Initial layout for accumulator updater program. Includes mock-cpi-caller which is meant to represent
pyth oracle(or any future allowed program) that will call the accumulator updater program. All
implementation details are open for discussion/subject to change

* test(accumulator_updater): add additional checks in tests and minor clean up

* chore(accumulator_updater): misc clean-up

* refactor(accumulator_updater): added comments & to-dos and minor refactoring to address PR comments

* feat(accumulator_updater): nmanual serialization for mock-cpi-caller schemas & use zero-copy

* chore(accumulator-updater): misc clean-up

* refactor(accumulator-updater): rename parameter in accumulator-updater::initalize ix for consistency

* style(accumulator-updater): switch PriceAccountType enum variants to camelcase

* refactor(accumulator-updater): address PR comments

rename schema to message & associated price messages, remove unncessary
comments, changed addAllowedProgram to setAllowedPrograms

* refactor(accumulator-updater): address more PR comments

consolidate SetAllowedPrograms and UpdateWhitelistAuthority into one context

* style(accumulator-updater): minor style fixes to address PR comments
2023-04-04 06:34:14 -07:00
swimricky 49d150acc2
Accumulator Updater Program (#712)
* feat(accumulator_updater): initial skeleton for accumulator_udpater program

Initial layout for accumulator updater program. Includes mock-cpi-caller which is meant to represent
pyth oracle(or any future allowed program) that will call the accumulator updater program. All
implementation details are open for discussion/subject to change

* test(accumulator_updater): add additional checks in tests and minor clean up

* chore(accumulator_updater): misc clean-up

* refactor(accumulator_updater): added comments & to-dos and minor refactoring to address PR comments
2023-03-29 09:56:03 -07:00