Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add txn construction and get endpoints for lockups #526

Conversation

lazynina
Copy link
Member

@lazynina lazynina commented Jan 8, 2024

No description provided.

@lazynina lazynina force-pushed the ln/add-extra-data-to-txn-construction-for-lockups branch 6 times, most recently from 893e17c to f10d6dc Compare January 10, 2024 20:01
@lazynina lazynina force-pushed the ln/add-extra-data-to-txn-construction-for-lockups branch 2 times, most recently from 77491f1 to a1a8193 Compare January 23, 2024 19:55
@lazynina lazynina changed the base branch from feature/proof-of-stake to stake-unstake-unlock-stake-spending-limits January 23, 2024 19:55
@lazynina lazynina force-pushed the stake-unstake-unlock-stake-spending-limits branch from 0c18162 to add3301 Compare January 24, 2024 16:05
@lazynina lazynina force-pushed the ln/add-extra-data-to-txn-construction-for-lockups branch from a1a8193 to 5c4a0d4 Compare January 24, 2024 16:05
Base automatically changed from stake-unstake-unlock-stake-spending-limits to feature/proof-of-stake January 24, 2024 16:07
@lazynina lazynina force-pushed the ln/add-extra-data-to-txn-construction-for-lockups branch from 5c4a0d4 to a5e3c15 Compare January 29, 2024 21:36
@lazynina lazynina marked this pull request as ready for review January 29, 2024 22:41
@lazynina lazynina requested a review from a team as a code owner January 29, 2024 22:41
scripts/nodes/n0 Outdated Show resolved Hide resolved
scripts/nodes/n0 Outdated Show resolved Hide resolved
scripts/nodes/n0 Outdated Show resolved Hide resolved
routes/transaction.go Outdated Show resolved Hide resolved
@lazynina lazynina merged commit 734d12e into feature/proof-of-stake Feb 2, 2024
1 of 2 checks passed
@lazynina lazynina deleted the ln/add-extra-data-to-txn-construction-for-lockups branch February 2, 2024 20:41
lazynina added a commit that referenced this pull request Jun 17, 2024
* Test backend CI against core with relic dependency.

* Checkout specific branch just for testing purposes.

* Update test Dockerfile.

* Fix failing build stages.

* Add new deps.

* Allow ParamUpdater to update PoS consensus params (#499)

* Allow ParamUpdater to update PoS GlobalParams.

* Add epoch number to get pos params call.

* Change core branch in test Dockerfile.

* Add test for updating global params.

* Fix bugs in testing updating global params.

* Checkout correct core branch.

* Change core branch.

* Mf/add validator registration endpoints (#500)

* Add validator registration endpoints.

* Allow ExtraData to be logged.

* Add relic dependency to prod dockerfile.

* Mf/add get validator by public key endpoint (#501)

* Add get validator by PublicKey route.

* Address PR review feedback.

* Rename VotingPublicKeySignature to VotingAuthorization. (#502)

* Rename VotingPublicKeySignature to VotingAuthorization.

* Checkout corresponding core branch.

* Change core branch in test CI.

* Refactor merging GlobalParamsEntry defaults. (#503)

* Refactor merging GlobalParamsEntry defaults.

* Change core branch in test dockerfile.

* Update test.Dockerfile core branch. (#504)

* Initial backend updates to conform to new function signatures in core (#512)

Co-authored-by: Lazy Nina <>

* Update backend to use BackendMempool interface instead of DeSoMempool (#513)

Co-authored-by: Lazy Nina <>

* Add fee estimator arg to all txn construction calls (#514)

Co-authored-by: Lazy Nina <>

* merge main into feature pos (#519)

* [stable] Release 3.4.4

* add node version endpoint (#505)

Co-authored-by: Lazy Nina <>

* [stable] Release 3.4.5

* hotfix to exchange test

* Add captcha verification (#509)

* Updates to captcha verification

* Updates to backend

* Updates to captcha verify

* Update captcha verification

* Cleanup logs

* Add routes to store reward amount in global state, track usage via data dog

* Update verify captcha validation ordering, add back comp profile config bool

* Update badger sync settings to optimize memory usage during hypersync (#506)

* Update hypersync to use default badger settings, switch to performance settings once hypersync completes

* Update test dockerfile to accept core branch name as parameter

* Blank commit to trigger build

* ln/fix-transaction-info-mempool (#510)

Co-authored-by: Lazy Nina <>

* ln/no-comp-when-0-create-profile-fee (#511)

Co-authored-by: Lazy Nina <>

* Empty commit to trigger build (#515)

* Add extra data to basic transfer and diamond txn construction endpoints (#516)

* trigger build (#517)

Co-authored-by: Lazy Nina <>

* trigger build

* Add RWLock around AllCountryLevelSignUpBonuses (#518)

Co-authored-by: Lazy Nina <>

---------

Co-authored-by: Lazy Nina <>
Co-authored-by: superzordon <88362450+superzordon@users.noreply.github.com>

* Remove fee estimator from txn construction calls (#520)

Co-authored-by: Lazy Nina <>

* Fix compilation errors (#521)

Co-authored-by: Lazy Nina <>

* Fix validator test (#522)

Co-authored-by: Lazy Nina <>

* Add DelegatedStakeCommissionBasisPoints to RegisterAsValidator txn construction endpoint (#523)

Co-authored-by: Lazy Nina <>

* Add stake, unstake, and unlock stake txn construction endpoints (#524)

* Add stake, unstake, and unlock stake txn construction endpoints

* Add stake, unstake, and unlock stake txn construction endpoints

---------

Co-authored-by: Lazy Nina <>

* Add GET endpoints for stake and locked stake entries (#525)

Co-authored-by: Lazy Nina <>

* Add spending limits backend support for stake, unstake, unlock stake (#529)

* Update Block Header Timestamps to int64 (#535)

* Fix Backend To Run With Regtest PoS Node (#536)

* Add txn construction and get endpoints for lockups (#526)

* Add spending limits backend support for stake, unstake, unlock stake

* Add txn construction and get endpoints for lockups

* Add additional sanity checks to lockup endpoint.

* Add txn construction and get endpoints for lockups

* Add additional sanity checks to lockup endpoint.

* Remove redundant profile entry response from LockedBalanceEntryResponse.

* Add proper timestamp to simulateSubmitTransaction.

* Apply suggestions from code review

---------

Co-authored-by: Lazy Nina <>
Co-authored-by: Jon Pollock <jon@deso.org>

* Add Unjail Validator endpoint (#532)

* feature/pos-syncing-and-steady-state (#537)

* Regtest PoS Validator Support

* Fix n0_test script

* Fix compile error

* Fix CI (#540)

* Only set public keys if not the zero pkid (#533)

* Level 2 glog for price fetching logic (#541)

* Remove datadir deletion from n0_test

* Update miner to pass params into RecomputeBlockRewardWithBlockRewardOutputPublicKey (#542)

* feature/pos-networking-and-syncing (#556)

* Fix Compile Errors For Networking (#543)

* Fix broken unit test (#546)

* Add endpoint to get fee rate and block height for local txn construction (#544)

* Fix NetworkManager Access (#550)

* Reduce logging (#547)

* Validator Registration Script (#552)

* Validator Registration Script

* Fix validator domain

* Update flow crypto dependency (#554)

---------

Co-authored-by: Lazy Nina <81658138+lazynina@users.noreply.github.com>

* Update usages of EnumerateKeysForPrefix (#559)

* Remove relic tag from validator test (#561)

* Allow orphans in block index (#567)

* Fix max block size logic (#568)

* Empty commit to trigger CI

* Upgrade Badger version (#566)

* Fix Update global params tests (#571)

* trigger build (#572)

* trigger build (#573)

* trigger build (#574)

* Empty commit to trigger CI

* bls pub key enhancements build (#576)

* allow txn relay in needs blocks build (#577)

* fix txn relay pos check build (#578)

* Empty commit to trigger CI

* Fix backend CI

* Use GetCurrentGlobalParamsEntry instead of GlobalParamsEntry (#580)

* Empty commit for CI

* Empty commit for CI

* Atomic Transaction Support for Backend (#560)

* Update usage of CreateAtomicTxnsWrapper (#581)

* Add a Preceding Transaction Field to Transaction Endpoints. (#570)

* Simple CreateAtomicTxnsWrapper scaffolding.

* Update method on CreateAtomicTxnsWrapper.

* Use lib.GetAugmentedUniversalViewWithAdditionalTransactions for UpdateProfile.

* Use MaxTxnSizeBytesPoS for atomic transaction construction.

* Use updated lib.GetAugmentedUniversalViewWithAdditionalTransactions parameters.

* Gate preceding transactions middleware on POST requests.

* Use anonymous struct to simplify preceding transaction middleware.

* Update stateful transaction endpoints to use GetAugmentedUniversalViewWithAdditionalTransactions.

* Simple CreateAtomicTxnsWrapper scaffolding.

* Update method on CreateAtomicTxnsWrapper.

* Use MaxTxnSizeBytesPoS for atomic transaction construction.

* Fix MaxTxnSizeBytes bug

---------

Co-authored-by: diamondhands <diamondhands@bitcloutdev.com>
Co-authored-by: Lazy Nina <81658138+lazynina@users.noreply.github.com>

* Add all new global params attributes to update global params txn construction endpoint (#583)

* Trigger CI

* Add get committed tip info endpoint (#582)

* Trigger CI

* Empty commit for CI

* Update node info endpoint to return info about connections to validators (#586)

* Upgrade go to 1.22 (#585)

* Upgrade deps (#569)

* Empty commit for CI

* Fix remote node to response (#587)

* trigger build 04-11-24 (#588)

* Empty commit to trigger CI

* Block until read only view regenerates in afterProcessSubmitPostTransaction (#590)

* Add LatestView to CheckpointBlockInfo endpoint (#589)

* Empty trigger for CI

* Empty commit to trigger CI

* Empty commit to trigger CI

* Update usage of EstimateFeeRate (#592)

* Submit atomic transactions endpoint. (#594)

* Simple CreateAtomicTxnsWrapper scaffolding.

* Update method on CreateAtomicTxnsWrapper.

* Use MaxTxnSizeBytesPoS for atomic transaction construction.

* Subsidized Update Profile Scaffolding

* Simple CreateAtomicTxnsWrapper scaffolding.

* Update method on CreateAtomicTxnsWrapper.

* Use MaxTxnSizeBytesPoS for atomic transaction construction.

* Fix MaxTxnSizeBytes bug

* Implemented Subsidized Update Profile.

* Add an endpoint for easily submitting incomplete atomic transactions.

* Fix submit-atomic-transaction by using incomplete atomic hex.

* Use mempool is update profile subsidization.

* Remove subsidized update profile.

---------

Co-authored-by: diamondhands <diamondhands@bitcloutdev.com>

* Empty commit to trigger CI

* Make utxo ops nil on APITransactionToResponse for inner txns (#595)

* Empty commit to trigger CI

* Empty commit to CI

* Add Script To Make Global Params Changes on Regtest Node (#597)

* Add Script To Make Global Params Changes on Regtest Node

* Remove public key

* trigger build 041924 (#599)

* Fix update_glboal_params package

* Support MinFeeRateNanosPerKB in atomic txn construction (#602)

* update call site for EstimateFeeRate (#603)

* trigger build 042324

* trigger build 042324

* Gracefully Handle RemoteNode Response When Peer Is Not a Registered Validator (#604)

* Empty commit to trigger CI

* Empty commit to trigger CI

* Gracefully Handle Nil Peer in RemoteNodeToResponse (#605)

* Empty commit to trigger CI

* Fix panic in get block template (#606)

* Empty commit to trigger CI

* Fix Failing Unit Tests (#607)

* Add simple status check for node to backend (#608)

* wip

* wip

* Upgrades to support DeSo AMMs and CCV2 (#609)

This PR contains several SAFE upgrades to backend to support the various things we need for DeSo AMMs:
- Add a `TxnStatus` field that can be provided as an argument to `GetDAOCoinLimitOrders`, `GetTxn`, and `GetTransactorDAOCoinLimitOrders`. This param allows the caller to either consider *unconfirmed txns*, which was the existing behavior before the introduction of this field, or to only consider *confirmed* txns. The latter is what we need for the AMM since we only want to be reacting to things that are finalized. Note that this change is SAFE because the default value is TxnStatusUnconfirmed, which was the pre-existing behavior. If you don't pass the argument, as none of the existing callers do, you will get the exact same result. It's only if you pass TxnStatusConfirmed, as the AMM code does, that you will get a different result than before.
- Make it so that you can provide a list of OrderIds to `GetDAOCoinLimitOrdersRequest` and get back the ones that are currently on the book. Needed for the main loop of the AMM.
- Introduce a new function called `IsDesoPkid` that flexibly allows the caller of backend endpoints to specify any of {"DESO", MiannetZeroPkidBase58Check, TestnetZeroPkidBase58Check} and get the same behavior. This change is needed because some things rely on using a ZeroPkid while other things rely on the "DESO" string being passed. This change is SAFE because it makes these functions LESS restrictive, and all pre-existing code that calls the endpoints with "DESO" are unaffected.
- Allow for filtering by buying/selling pkid in `GetTransactorDAOCoinLimitOrders` . This is needed for the main loop of the AMM. This change is SAFE because the params are optional, and leaving them out gives you the exact same behavior as before.

* Add GetDaoCaoinLimitOrdersById (#610)

* Empty commit to trigger CI

* empty commit to trigger build

* Get JWT for update global params script (#615)

* Empty commit to trigger CI

* fix update global params scripts (#616)

* empty commit to trigger build

* Add GetCurrentEpochProgress API Endpoint to Return Leader Schedule and Current View (#617)

* Add GetCurrentEpochProgress API Endpoint to Return Leader Schedule and Current View

* Use currentView value from consensus

* Empty Commit to Trigger CI

* Update checksum script (#618)

* Empty commit to trigger CI

* Add Uint256Hex struct to hex encode old uint256 usages (#620)

* Fix unmarshal nil pointer (#621)

* Fix CheckPrecedingTransactions (#623)

* Empty commit to trigger CI

* Empty commit to trigger build

* Add simple balance endpoint (for amm usage) (#628)

* wip

* Fix CheckPrecedingTransactions (#623)

* Rename vars

---------

Co-authored-by: Lazy Nina <81658138+lazynina@users.noreply.github.com>

* Downgrade uint256 to 1.2.3 (#627)

* Revert "Upgrade deps (#569)" (#630)

This reverts commit 9f10808.

* Revert "Upgrade go to 1.22 (#585)" (#634)

This reverts commit 53adfee.

* Revert Badger version from v4 to v3 (#636)

* Empty commit to trigger CI

* Empty commit to trigger build (#638)

* Add blockheight check before GetSpendableUtxos (#639)

* Update NodeVersion (#641)

* Fix test.Dockerfile (#642)

---------

Co-authored-by: mattfoley8 <isaac@deso.org>
Co-authored-by: Matt Foley <100429827+mattfoley8@users.noreply.github.com>
Co-authored-by: superzordon <88362450+superzordon@users.noreply.github.com>
Co-authored-by: tholonious <99746187+tholonious@users.noreply.github.com>
Co-authored-by: Jon Pollock <jon@deso.org>
Co-authored-by: iamsofonias <sofonias@deso.org>
Co-authored-by: diamondhands0 <81935176+diamondhands0@users.noreply.github.com>
Co-authored-by: Jon Pollock <135658176+poolcoke@users.noreply.github.com>
Co-authored-by: diamondhands <diamondhands@bitcloutdev.com>
Co-authored-by: superzordon <zordonclout@gmail.com>
diamondhands0 added a commit that referenced this pull request Jul 13, 2024
… Focus (#640)

* Test backend CI against core with relic dependency.

* Checkout specific branch just for testing purposes.

* Update test Dockerfile.

* Fix failing build stages.

* Add new deps.

* Allow ParamUpdater to update PoS consensus params (#499)

* Allow ParamUpdater to update PoS GlobalParams.

* Add epoch number to get pos params call.

* Change core branch in test Dockerfile.

* Add test for updating global params.

* Fix bugs in testing updating global params.

* Checkout correct core branch.

* Change core branch.

* Mf/add validator registration endpoints (#500)

* Add validator registration endpoints.

* Allow ExtraData to be logged.

* Add relic dependency to prod dockerfile.

* Mf/add get validator by public key endpoint (#501)

* Add get validator by PublicKey route.

* Address PR review feedback.

* Rename VotingPublicKeySignature to VotingAuthorization. (#502)

* Rename VotingPublicKeySignature to VotingAuthorization.

* Checkout corresponding core branch.

* Change core branch in test CI.

* Refactor merging GlobalParamsEntry defaults. (#503)

* Refactor merging GlobalParamsEntry defaults.

* Change core branch in test dockerfile.

* Update test.Dockerfile core branch. (#504)

* Initial backend updates to conform to new function signatures in core (#512)

Co-authored-by: Lazy Nina <>

* Update backend to use BackendMempool interface instead of DeSoMempool (#513)

Co-authored-by: Lazy Nina <>

* Add fee estimator arg to all txn construction calls (#514)

Co-authored-by: Lazy Nina <>

* merge main into feature pos (#519)

* [stable] Release 3.4.4

* add node version endpoint (#505)

Co-authored-by: Lazy Nina <>

* [stable] Release 3.4.5

* hotfix to exchange test

* Add captcha verification (#509)

* Updates to captcha verification

* Updates to backend

* Updates to captcha verify

* Update captcha verification

* Cleanup logs

* Add routes to store reward amount in global state, track usage via data dog

* Update verify captcha validation ordering, add back comp profile config bool

* Update badger sync settings to optimize memory usage during hypersync (#506)

* Update hypersync to use default badger settings, switch to performance settings once hypersync completes

* Update test dockerfile to accept core branch name as parameter

* Blank commit to trigger build

* ln/fix-transaction-info-mempool (#510)

Co-authored-by: Lazy Nina <>

* ln/no-comp-when-0-create-profile-fee (#511)

Co-authored-by: Lazy Nina <>

* Empty commit to trigger build (#515)

* Add extra data to basic transfer and diamond txn construction endpoints (#516)

* trigger build (#517)

Co-authored-by: Lazy Nina <>

* trigger build

* Add RWLock around AllCountryLevelSignUpBonuses (#518)

Co-authored-by: Lazy Nina <>

---------

Co-authored-by: Lazy Nina <>
Co-authored-by: superzordon <88362450+superzordon@users.noreply.github.com>

* Remove fee estimator from txn construction calls (#520)

Co-authored-by: Lazy Nina <>

* Fix compilation errors (#521)

Co-authored-by: Lazy Nina <>

* Fix validator test (#522)

Co-authored-by: Lazy Nina <>

* Add DelegatedStakeCommissionBasisPoints to RegisterAsValidator txn construction endpoint (#523)

Co-authored-by: Lazy Nina <>

* Add stake, unstake, and unlock stake txn construction endpoints (#524)

* Add stake, unstake, and unlock stake txn construction endpoints

* Add stake, unstake, and unlock stake txn construction endpoints

---------

Co-authored-by: Lazy Nina <>

* Add GET endpoints for stake and locked stake entries (#525)

Co-authored-by: Lazy Nina <>

* Add spending limits backend support for stake, unstake, unlock stake (#529)

* Update Block Header Timestamps to int64 (#535)

* Fix Backend To Run With Regtest PoS Node (#536)

* Add txn construction and get endpoints for lockups (#526)

* Add spending limits backend support for stake, unstake, unlock stake

* Add txn construction and get endpoints for lockups

* Add additional sanity checks to lockup endpoint.

* Add txn construction and get endpoints for lockups

* Add additional sanity checks to lockup endpoint.

* Remove redundant profile entry response from LockedBalanceEntryResponse.

* Add proper timestamp to simulateSubmitTransaction.

* Apply suggestions from code review

---------

Co-authored-by: Lazy Nina <>
Co-authored-by: Jon Pollock <jon@deso.org>

* Add Unjail Validator endpoint (#532)

* feature/pos-syncing-and-steady-state (#537)

* Regtest PoS Validator Support

* Fix n0_test script

* Fix compile error

* Fix CI (#540)

* Only set public keys if not the zero pkid (#533)

* Level 2 glog for price fetching logic (#541)

* Remove datadir deletion from n0_test

* Update miner to pass params into RecomputeBlockRewardWithBlockRewardOutputPublicKey (#542)

* feature/pos-networking-and-syncing (#556)

* Fix Compile Errors For Networking (#543)

* Fix broken unit test (#546)

* Add endpoint to get fee rate and block height for local txn construction (#544)

* Fix NetworkManager Access (#550)

* Reduce logging (#547)

* Validator Registration Script (#552)

* Validator Registration Script

* Fix validator domain

* Update flow crypto dependency (#554)

---------

Co-authored-by: Lazy Nina <81658138+lazynina@users.noreply.github.com>

* Update usages of EnumerateKeysForPrefix (#559)

* Remove relic tag from validator test (#561)

* Allow orphans in block index (#567)

* Fix max block size logic (#568)

* Empty commit to trigger CI

* Upgrade Badger version (#566)

* Fix Update global params tests (#571)

* trigger build (#572)

* trigger build (#573)

* trigger build (#574)

* Empty commit to trigger CI

* bls pub key enhancements build (#576)

* allow txn relay in needs blocks build (#577)

* fix txn relay pos check build (#578)

* Empty commit to trigger CI

* Fix backend CI

* Use GetCurrentGlobalParamsEntry instead of GlobalParamsEntry (#580)

* Empty commit for CI

* Empty commit for CI

* Atomic Transaction Support for Backend (#560)

* Update usage of CreateAtomicTxnsWrapper (#581)

* Add a Preceding Transaction Field to Transaction Endpoints. (#570)

* Simple CreateAtomicTxnsWrapper scaffolding.

* Update method on CreateAtomicTxnsWrapper.

* Use lib.GetAugmentedUniversalViewWithAdditionalTransactions for UpdateProfile.

* Use MaxTxnSizeBytesPoS for atomic transaction construction.

* Use updated lib.GetAugmentedUniversalViewWithAdditionalTransactions parameters.

* Gate preceding transactions middleware on POST requests.

* Use anonymous struct to simplify preceding transaction middleware.

* Update stateful transaction endpoints to use GetAugmentedUniversalViewWithAdditionalTransactions.

* Simple CreateAtomicTxnsWrapper scaffolding.

* Update method on CreateAtomicTxnsWrapper.

* Use MaxTxnSizeBytesPoS for atomic transaction construction.

* Fix MaxTxnSizeBytes bug

---------

Co-authored-by: diamondhands <diamondhands@bitcloutdev.com>
Co-authored-by: Lazy Nina <81658138+lazynina@users.noreply.github.com>

* Add all new global params attributes to update global params txn construction endpoint (#583)

* Trigger CI

* Add get committed tip info endpoint (#582)

* Trigger CI

* Empty commit for CI

* Update node info endpoint to return info about connections to validators (#586)

* Upgrade go to 1.22 (#585)

* Upgrade deps (#569)

* Empty commit for CI

* Fix remote node to response (#587)

* trigger build 04-11-24 (#588)

* Empty commit to trigger CI

* Block until read only view regenerates in afterProcessSubmitPostTransaction (#590)

* Add LatestView to CheckpointBlockInfo endpoint (#589)

* Empty trigger for CI

* Empty commit to trigger CI

* Empty commit to trigger CI

* Update usage of EstimateFeeRate (#592)

* Submit atomic transactions endpoint. (#594)

* Simple CreateAtomicTxnsWrapper scaffolding.

* Update method on CreateAtomicTxnsWrapper.

* Use MaxTxnSizeBytesPoS for atomic transaction construction.

* Subsidized Update Profile Scaffolding

* Simple CreateAtomicTxnsWrapper scaffolding.

* Update method on CreateAtomicTxnsWrapper.

* Use MaxTxnSizeBytesPoS for atomic transaction construction.

* Fix MaxTxnSizeBytes bug

* Implemented Subsidized Update Profile.

* Add an endpoint for easily submitting incomplete atomic transactions.

* Fix submit-atomic-transaction by using incomplete atomic hex.

* Use mempool is update profile subsidization.

* Remove subsidized update profile.

---------

Co-authored-by: diamondhands <diamondhands@bitcloutdev.com>

* Empty commit to trigger CI

* Make utxo ops nil on APITransactionToResponse for inner txns (#595)

* Empty commit to trigger CI

* Empty commit to CI

* Add Script To Make Global Params Changes on Regtest Node (#597)

* Add Script To Make Global Params Changes on Regtest Node

* Remove public key

* trigger build 041924 (#599)

* Fix update_glboal_params package

* Support MinFeeRateNanosPerKB in atomic txn construction (#602)

* update call site for EstimateFeeRate (#603)

* trigger build 042324

* trigger build 042324

* Gracefully Handle RemoteNode Response When Peer Is Not a Registered Validator (#604)

* Empty commit to trigger CI

* Empty commit to trigger CI

* Gracefully Handle Nil Peer in RemoteNodeToResponse (#605)

* Empty commit to trigger CI

* Fix panic in get block template (#606)

* Empty commit to trigger CI

* Fix Failing Unit Tests (#607)

* Add simple status check for node to backend (#608)

* wip

* wip

* Upgrades to support DeSo AMMs and CCV2 (#609)

This PR contains several SAFE upgrades to backend to support the various things we need for DeSo AMMs:
- Add a `TxnStatus` field that can be provided as an argument to `GetDAOCoinLimitOrders`, `GetTxn`, and `GetTransactorDAOCoinLimitOrders`. This param allows the caller to either consider *unconfirmed txns*, which was the existing behavior before the introduction of this field, or to only consider *confirmed* txns. The latter is what we need for the AMM since we only want to be reacting to things that are finalized. Note that this change is SAFE because the default value is TxnStatusUnconfirmed, which was the pre-existing behavior. If you don't pass the argument, as none of the existing callers do, you will get the exact same result. It's only if you pass TxnStatusConfirmed, as the AMM code does, that you will get a different result than before.
- Make it so that you can provide a list of OrderIds to `GetDAOCoinLimitOrdersRequest` and get back the ones that are currently on the book. Needed for the main loop of the AMM.
- Introduce a new function called `IsDesoPkid` that flexibly allows the caller of backend endpoints to specify any of {"DESO", MiannetZeroPkidBase58Check, TestnetZeroPkidBase58Check} and get the same behavior. This change is needed because some things rely on using a ZeroPkid while other things rely on the "DESO" string being passed. This change is SAFE because it makes these functions LESS restrictive, and all pre-existing code that calls the endpoints with "DESO" are unaffected.
- Allow for filtering by buying/selling pkid in `GetTransactorDAOCoinLimitOrders` . This is needed for the main loop of the AMM. This change is SAFE because the params are optional, and leaving them out gives you the exact same behavior as before.

* Add GetDaoCaoinLimitOrdersById (#610)

* Empty commit to trigger CI

* empty commit to trigger build

* Get JWT for update global params script (#615)

* Empty commit to trigger CI

* fix update global params scripts (#616)

* empty commit to trigger build

* Add GetCurrentEpochProgress API Endpoint to Return Leader Schedule and Current View (#617)

* Add GetCurrentEpochProgress API Endpoint to Return Leader Schedule and Current View

* Use currentView value from consensus

* Empty Commit to Trigger CI

* Update checksum script (#618)

* Empty commit to trigger CI

* Add Uint256Hex struct to hex encode old uint256 usages (#620)

* Fix unmarshal nil pointer (#621)

* Fix CheckPrecedingTransactions (#623)

* Empty commit to trigger CI

* Empty commit to trigger build

* Add simple balance endpoint (for amm usage) (#628)

* wip

* Fix CheckPrecedingTransactions (#623)

* Rename vars

---------

Co-authored-by: Lazy Nina <81658138+lazynina@users.noreply.github.com>

* Downgrade uint256 to 1.2.3 (#627)

* Revert "Upgrade deps (#569)" (#630)

This reverts commit 9f10808.

* Revert "Upgrade go to 1.22 (#585)" (#634)

This reverts commit 53adfee.

* Revert Badger version from v4 to v3 (#636)

* Empty commit to trigger CI

* Empty commit to trigger build (#638)

* Add blockheight check before GetSpendableUtxos (#639)

* wip

* wip

* Bunch of upgrades

* fix revert version errors

* Incorporate core changes

* fix nit

* Fix deps and minor bug fixes

* fix test.Dockerfile

* Trigger build

* Fix usd price computation in market order and add price endpoint

* Fix bug around quantity currency

* Fix txindex bug

* Trigger rebuild

* fix gettxn

* review comments

* Review fixes

* Patch last pkid issue

---------

Co-authored-by: mattfoley8 <isaac@deso.org>
Co-authored-by: Matt Foley <100429827+mattfoley8@users.noreply.github.com>
Co-authored-by: Lazy Nina <81658138+lazynina@users.noreply.github.com>
Co-authored-by: superzordon <88362450+superzordon@users.noreply.github.com>
Co-authored-by: tholonious <99746187+tholonious@users.noreply.github.com>
Co-authored-by: Jon Pollock <jon@deso.org>
Co-authored-by: iamsofonias <sofonias@deso.org>
Co-authored-by: Jon Pollock <135658176+poolcoke@users.noreply.github.com>
Co-authored-by: Lazy Nina <lazynina84@gmail.com>
Co-authored-by: superzordon <zordonclout@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants