Fossil

Check-in [b765e65267]
Login

Check-in [b765e65267]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:An experiment in reducing the proof-of-work to a single operation. (This description is intentionally vague.)
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | robotck-instant
Files: files | file ages | folders
SHA3-256: b765e6526781ad6d8b9ed5578b1b1f22283b60af1c7028317aab4ab65c367a49
User & Date: stephan 2025-08-17 12:10:01.576
Context
2025-08-17
12:29
Fix the previous checkin to actually compute the work value. This slows it down by a tiny fraction of a second but it's still effectively instant. This calculation can be moved up a level into the C code to turn this back into an instant operation, but leaving it on the client seems like a reasonable choice. ... (check-in: c27cfa9f60 user: stephan tags: robotck-instant)
12:10
An experiment in reducing the proof-of-work to a single operation. (This description is intentionally vague.) ... (check-in: b765e65267 user: stephan tags: robotck-instant)
2025-08-16
16:48
Add a simple UI that allows any registered user (not "anonymous" or "nobody") to create access tokens. ... (check-in: 2a3d303124 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/robot.c.
99
100
101
102
103
104
105

106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
  @ <form method="GET" id="x6">
  @ <p id="x3" style="visibility:hidden;">\
  @ Press <input type="submit" id="x5" value="Ok" focus> to continue</p>
  cgi_query_parameters_to_hidden();
  @ <input id="x4" type="hidden" name="proof" value="0">
  @ </form>
  @ <script nonce='%s(style_nonce())'>

  @ function aaa(x){return document.getElementById(x);}
  @ function bbb(h,a){
  @   aaa("x4").value=h
  @   if((a%%75)==0){
  @     aaa("x2").textContent=aaa("x2").textContent+".";
  @   }
  @   if(a>0){
  @     setTimeout(bbb,1,h+a,a-1);
  @   }else{
  @     aaa("x3").style.visibility="visible";
  @     aaa("x2").textContent="";
  @     aaa("x1").textContent="All clear";
  @     aaa("x6").onsubmit=function(){aaa("x3").style.visibility="hidden";};
  @     aaa("x5").focus();
  @   }
  @ }   
  k = 800 + h2%99;
  h2 = (k*k + k)/2;
  @ setTimeout(function(){bbb(%u(h1-h2),%u(k));},10);
  @ </script>
  style_finish_page();
  return 1;
}

/*
** SETTING: robot-restrict                width=40 block-text







>
|
<
<
|
<
|
<
<
<
|
|
|
|
|

|
<
<
<







99
100
101
102
103
104
105
106
107


108

109



110
111
112
113
114
115
116



117
118
119
120
121
122
123
  @ <form method="GET" id="x6">
  @ <p id="x3" style="visibility:hidden;">\
  @ Press <input type="submit" id="x5" value="Ok" focus> to continue</p>
  cgi_query_parameters_to_hidden();
  @ <input id="x4" type="hidden" name="proof" value="0">
  @ </form>
  @ <script nonce='%s(style_nonce())'>
  @ window.addEventListener('load',function(ev){
  @    const E = (x)=>document.getElementById(x);


  @    const gcs = window.getComputedStyle(document.body);

  @    if( gcs.zIndex==='0' ) {



  @     E("x3").style.visibility="visible";
  @     E("x2").textContent="";
  @     E("x1").textContent="All clear";
  @     E("x6").onsubmit=function(){E("x3").style.visibility="hidden";};
  @     E("x5").focus();
  @   }
  @ },false);



  @ </script>
  style_finish_page();
  return 1;
}

/*
** SETTING: robot-restrict                width=40 block-text
Changes to src/style.c.
824
825
826
827
828
829
830

831
832
833
834
835
836
837
  headerHasBeenGenerated = 1;
  sideboxUsed = 0;
  if( g.perm.Debug && P("showqp") ){
    @ <div class="debug">
    cgi_print_all(0, 0, 0);
    @ </div>
  }

  fossil_free(zTitle);
}

#if INTERFACE
/* Allowed parameters for style_adunit() */
#define ADUNIT_OFF        0x0001       /* Do not allow ads on this page */
#define ADUNIT_RIGHT_OK   0x0002       /* Right-side vertical ads ok here */







>







824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
  headerHasBeenGenerated = 1;
  sideboxUsed = 0;
  if( g.perm.Debug && P("showqp") ){
    @ <div class="debug">
    cgi_print_all(0, 0, 0);
    @ </div>
  }
  @ <style>body { z-index: 0 }</style>
  fossil_free(zTitle);
}

#if INTERFACE
/* Allowed parameters for style_adunit() */
#define ADUNIT_OFF        0x0001       /* Do not allow ads on this page */
#define ADUNIT_RIGHT_OK   0x0002       /* Right-side vertical ads ok here */