@@ -504,30 +504,30 @@ func (b *Biscuit) Serialize() ([]byte, error) {
504504
505505var ErrFactNotFound = errors .New ("biscuit: fact not found" )
506506
507- // GetBlockID returns the first block index containing a fact
508- // starting from the authority block and then each block in the order they were added.
509- // ErrFactNotFound is returned when no block contains the fact.
510- func (b * Biscuit ) GetBlockID (fact Fact ) (int , error ) {
511- // don't store symbols from searched fact in the verifier table
512- symbols := b .symbols .Clone ()
513- datalogFact := fact .Predicate .convert (symbols )
514-
515- for _ , f := range * b .authority .facts {
516- if f .Equal (datalogFact ) {
517- return 0 , nil
518- }
519- }
520-
521- for i , b := range b .blocks {
522- for _ , f := range * b .facts {
523- if f .Equal (datalogFact ) {
524- return i + 1 , nil
525- }
526- }
527- }
528-
529- return 0 , ErrFactNotFound
530- }
507+ // // GetBlockID returns the first block index containing a fact
508+ // // starting from the authority block and then each block in the order they were added.
509+ // // ErrFactNotFound is returned when no block contains the fact.
510+ // func (b *Biscuit) GetBlockID(fact Fact) (int, error) {
511+ // // don't store symbols from searched fact in the verifier table
512+ // symbols := b.symbols.Clone()
513+ // datalogFact := fact.Predicate.convert(symbols)
514+
515+ // for _, f := range *b.authority.facts {
516+ // if f.Equal(datalogFact) {
517+ // return 0, nil
518+ // }
519+ // }
520+
521+ // for i, b := range b.blocks {
522+ // for _, f := range *b.facts {
523+ // if f.Equal(datalogFact) {
524+ // return i + 1, nil
525+ // }
526+ // }
527+ // }
528+
529+ // return 0, ErrFactNotFound
530+ // }
531531
532532/*
533533// SHA256Sum returns a hash of `count` biscuit blocks + the authority block
@@ -609,33 +609,35 @@ func (b *Biscuit) checkRootKey(root ed25519.PublicKey) error {
609609 return nil
610610}*/
611611
612- func (b * Biscuit ) generateWorld (symbols * datalog.SymbolTable ) (* datalog.World , error ) {
613- world := datalog .NewWorld ()
612+ // func (b *Biscuit) generateWorld(symbols *datalog.SymbolTable) (*datalog.World, error) {
613+ // world := datalog.NewWorld()
614614
615- for _ , fact := range * b .authority .facts {
616- world .AddFact (fact )
617- }
615+ // authorityOrigin := datalog.AuthorityOrigin()
616+ // for _, fact := range b.authority.facts {
617+ // world.AddFact(authorityOrigin, fact)
618+ // }
618619
619- for _ , rule := range b .authority .rules {
620- world .AddRule (rule )
621- }
620+ // for _, rule := range b.authority.rules {
621+ // world.AddRule(0, rule)
622+ // }
622623
623- for _ , block := range b .blocks {
624- for _ , fact := range * block .facts {
625- world .AddFact (fact )
626- }
624+ // for index, block := range b.blocks {
625+ // blockOrigin := datalog.MakeOrigin([]uint64{uint64(index + 1)})
626+ // for _, fact := range block.facts {
627+ // world.AddFact(blockOrigin, fact)
628+ // }
627629
628- for _ , rule := range block .rules {
629- world .AddRule (rule )
630- }
631- }
630+ // for _, rule := range block.rules {
631+ // world.AddRule(datalog.SingleOrigin(index+1), rule)
632+ // }
633+ // }
632634
633- if err := world .Run (symbols ); err != nil {
634- return nil , err
635- }
635+ // if err := world.Run(symbols); err != nil {
636+ // return nil, err
637+ // }
636638
637- return world , nil
638- }
639+ // return world, nil
640+ // }
639641
640642func (b * Biscuit ) RevocationIds () [][]byte {
641643 result := make ([][]byte , 0 , len (b .blocks )+ 1 )
0 commit comments