Skip to content

Commit

Permalink
Merge branch 'blank_slate'
Browse files Browse the repository at this point in the history
  • Loading branch information
FiveMovesAhead committed Jan 18, 2025
2 parents bd6616d + ec5e09d commit 0b3a68e
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 489 deletions.
39 changes: 39 additions & 0 deletions tig-benchmarker/master/master/client_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,45 @@ async def get_jobs():
headers = {"Accept-Encoding": "gzip"}
)

@self.app.get("/get-batch-data/{batch_id}")
async def get_batch_data(batch_id: str):
benchmark_id, batch_idx = batch_id.split("_")
result = get_db_conn().fetch_one(
f"""
SELECT
JSONB_BUILD_OBJECT(
'id', A.benchmark_id || '_' || A.batch_idx,
'benchmark_id', A.benchmark_id,
'start_nonce', A.batch_idx * B.batch_size,
'num_nonces', LEAST(B.batch_size, B.num_nonces - A.batch_idx * B.batch_size),
'settings', B.settings,
'sampled_nonces', NULL,
'runtime_config', B.runtime_config,
'download_url', B.download_url,
'rand_hash', B.rand_hash,
'batch_size', B.batch_size,
'batch_idx', A.batch_idx
) AS batch,
C.merkle_root,
C.solution_nonces,
C.merkle_proofs
FROM root_batch A
INNER JOIN job B
ON A.benchmark_id = '{benchmark_id}'
AND A.batch_idx = {batch_idx}
AND A.benchmark_id = B.benchmark_id
INNER JOIN batch_data C
ON A.benchmark_id = C.benchmark_id
AND A.batch_idx = C.batch_idx
"""
)

return JSONResponse(
content=dict(result),
status_code=200,
headers = {"Accept-Encoding": "gzip"}
)

def start(self):
def run():
self.app = FastAPI()
Expand Down
2 changes: 1 addition & 1 deletion tig-benchmarker/nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ http {
server_name localhost;

# Master Service - specific endpoints
location ~ ^/(get-config|stop|update-config|get-jobs|get-latest-data) {
location ~ ^/(get-config|stop|update-config|get-batch-data|get-jobs|get-latest-data) {
proxy_pass http://master:3336;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
Expand Down
2 changes: 1 addition & 1 deletion tig-breakthroughs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Each submissions is committed to their own branch with the naming pattern:
* [Voting Guidelines for Token Holders](../docs/guides/voting.md)

2. Email the following to `[email protected]` with subject "Breakthrough Submission (`<breakthrough_name>`)":
* **Evidence form**: copy & fill in `evidence.md` from the relevant challenges folder (e.g. [`knapsack/evidence.md`](./knapsack/evidence.md)). Of particular importance is Section 1 which describes your breakthrough
* **Evidence form**: copy & fill in [`evidence.md`](./evidence.md). Of particular importance is Section 1 which describes your breakthrough

* **Invention assignment**: copy & replace [invention_assignment.doc](../docs/agreements/invention_assignment.doc) the highlighted parts. Inventor and witness must sign.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ IT IS IMPORTANT THAT THIS SECTION IS COMPLETED IN SUFFICIENT DETAIL TO FULLY DES

PLEASE IDENTIFY WHICH TIG CHALLENGE THE ALGORITHMIC METHOD ADDRESSES.

> knapsack
> YOUR RESPONSE HERE (options are satisfiability, vehicle_routing, knapsack, or vector_search)
PLEASE DESCRIBE THE ALGORITHMIC METHOD AND THE PROBLEM THAT IT SOLVES.

Expand All @@ -51,18 +51,6 @@ TO THE EXTENT THAT YOU HAVE IMPLEMENTED THE ALGORITHMIC METHOD IN CODE YOU SHOUL
## SECTION 3

### ATTRIBUTION

PLEASE PROVIDE THE IDENTITY OF THE CREATOR OF THE ALGORITHMIC METHOD (this should be a natural person or legal entity. If an artificial intelligence has been used to assist in the creation of the algorithmic method then the creator is the operator of the artificial intelligence)

> YOUR RESPONSE HERE
PLEASE PROVIDE EVIDENCE OF AUTHORSHIP WHERE IT IS AVAILABLE.

> YOUR RESPONSE HERE
## SECTION 4

### NOVELTY AND INVENTIVENESS

To support your claim that an algorithmic method is novel and inventive, you should provide evidence that demonstrates both its uniqueness (novelty) and its non-obviousness (inventiveness) in relation to the existing state of the art.
Expand Down Expand Up @@ -132,23 +120,23 @@ To support your claim that an algorithmic method is novel and inventive, you sho

> YOUR RESPONSE HERE
## SECTION 5
## SECTION 4

### EVIDENCE TO SUPPORT PATENTABILITY

- **Development Records:** Please provide documentation of the invention process, including notes, sketches, and software versions, to establish a timeline of your innovation.

> YOUR RESPONSE HERE
## SECTION 6
## SECTION 5

### SUGGESTED APPLICATIONS

- Please provide suggestions for any real world applications of your abstract algorithmic method that occur to you.

> YOUR RESPONSE HERE
## SECTION 7
## SECTION 6

### ANY OTHER INFORMATION

Expand Down
157 changes: 0 additions & 157 deletions tig-breakthroughs/satisfiability/evidence.md

This file was deleted.

Loading

0 comments on commit 0b3a68e

Please sign in to comment.