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

New API call with filter criteria for AT selection #150

Closed
frankTheTank72 opened this issue May 29, 2019 · 6 comments
Closed

New API call with filter criteria for AT selection #150

frankTheTank72 opened this issue May 29, 2019 · 6 comments
Assignees
Labels
enhancement New feature or request priority-high

Comments

@frankTheTank72
Copy link
Member

frankTheTank72 commented May 29, 2019

Atm we can only request for AT-IDs in general via http://at-testnet.burst-alliance.org:6876/burst?requestType=getATIds

If we will have in the near future more ATs on the chain, we should be able to give filter criteria within a new call to get a pre-filtered AT-ID list.

The maximum details for an ATS are the following:

{
"creator": "5219831338759933722",
"creatorRS": "BURST-TMSU-YBH5-RVC7-6J6WJ",
"at": "15869142951140617004",
"atRS": "BURST-4UTE-FY8C-PSUE-F7NGS",
"atVersion": 2,
"name": "OddsGame1557668323155",
"description": "OddsGame1557668323155",
"machineCode": "300000035000000020b00000005000000100b000000110600000033160107000000330204060000001a7c0200",
"machineData": "",
"balanceNQT": "589548670000",
"prevBalanceNQT": "589548670000",
"nextBlock": 76258,
"frozen": true,
"running": false,
"stopped": false,
"finished": true,
"dead": false,
"minActivation": "1000000000",
"creationBlock": 57588,
"requestProcessingTime": 2
}

For a start it would be nice to be able to filter on the following attributes :

  • creatorRS,
  • atVersion
  • Name
  • machineCode,
  • creationBlock

Request : Please introduce a new call in BRS which allows to request for a filtered list of ATs.

OpenPoint
Do we need new indexe on the DB for that ?

@jjos2372
Copy link

jjos2372 commented Jun 2, 2019

Filtering by creator is already available by getAccountATs. However, filtering by name, creationBlock (after some given block) is very desirable. Filtering by machineCode is probably more complicated since the code can be long.

@harryjph harryjph self-assigned this Jun 3, 2019
@ohager
Copy link
Member

ohager commented Jun 17, 2019

Additionally, I suggest to add pagination also. To be consistent with Tx, the params should be firstIndex and lastIndex

@jjos2372
Copy link

Another interesting feature on this subject would be to retrieve the AT machineData for a given block in the past and not only its current state. This way we easily can reconstruct the contract history.

@ohager
Copy link
Member

ohager commented May 24, 2021

@jjos2372 sounds like something we/me want to address soon ;)

@ohager ohager added priority-high enhancement New feature or request labels May 24, 2021
@ohager ohager assigned ohager and jjos2372 and unassigned harryjph May 24, 2021
@frankTheTank72
Copy link
Member Author

We should introduce a new entry on the table for a hash value of the maschine code. Every node is hasing it by it self.
Via BRS you can get all smart contracts wiht the same hash, which makes it easy for NFTs for example

@jjos2372
Copy link

jjos2372 commented Oct 3, 2021

Filtering by machine code hash id is now available.

@jjos2372 jjos2372 closed this as completed Oct 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request priority-high
Projects
None yet
Development

No branches or pull requests

4 participants